basic_string:lithiumS_construct NULL not valid

I'm trying to create an R library which I've been able to create in a different Vertica server.

I run :

create library rhlib as 'foo.r' language 'R';

And get this error:

ROLLBACK 3399:  Failure in UDx RPC call InvokeSetExecContext(): Error calling setupContext() in User Defined Object [] at [/scratch_a/release/vbuild/vertica/UDxFence/vertica-udx-R.cpp:112], error code: 0, message: Exception in Validate Library:basic_string:lithiumS_construct NULL not valid

But it works perfectly on the other server, what can be the problem?

Comments

  • PRanaPRana Employee
    Hi Aviad,
    This error pops up when there is an error in the R script. Can you check if your R function works okay on the R console. If it works fine, can you provide the following details
    1. Which Vertica version are you using
    2. A small reproducer so that I can reproduce it on my machine

    HTH,
    Pratibha

  • Hi Rana (hope I got your name right)

    You're right, it is the R code. Apparently one of the R libraries fails to load : 

    But this is very strange since both machines have the same library versions and the same dependencies : 
    >ip <- installed.packages()  >ip[c("forecast","Rcpp","RcppArmadillo"),c("Package","Version")]                Package         Version  forecast      "forecast"      "4.8"  Rcpp          "Rcpp"          "0.10.2"  RcppArmadillo "RcppArmadillo" "0.4.000.4"
    The error I get in the code is below - again, it works on 1 server but fails on the other.
    >library(forecast)  Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[<I>]) :    namespace ‘Rcpp’ 0.10.2 is already loaded, but >= 0.11.0 is required  Error: package or namespace load failed for ‘forecast<SPAN>’    What do you think can be the issue?</SPAN></I>
  • PRanaPRana Employee
    Hi Carlos,

    Rana is my last name :) My first name is Pratibha.

    So the error that I see in the second snippet of the code is that forecast requires Rcpp 0.11.0 or higher and you have Rcpp 0.10.2. Please check the Rcpp version on the other server where the library loads correctly. I'm pretty sure that it must be 0.11.0 or higher.

    Pratibha
  • Hi Pratibha,

    First, my name is not Carlos :), its Aviad, although Carlos is cool...

    Second, both servers have exactly the same versions. I think I have isolated the issue a little further. I will update tomorrow again.

    Thanks, and now we are even ;)
  • PRanaPRana Employee
    Oops!! I'm sorry. That wasn't on purpose.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file