Error when creating R library on vertica : "basic_string::_S_construct NULL not valid" - c++

I'm trying to create a R language library in HP Vertica.
I've been able to do it on a different machine, but now when I try to do it on a different machine I get this error messsage :
create library rhlib as 'foo.r' language 'R';
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::_S_construct NULL not valid
What can be the issue? Is my R language pack not installed correctly?

Related

Instanciation of OCX Object with Qt

Hi I'm trying to use an OCX object called "dctl.ocx" in Qt so as to communicate with a numerical Command (Siemens). I followed this page to intergrat it to Qt :
https://blog.actorsfit.com/a?ID=00850-73c6e586-bcc5-4119-95d5-7cdc1bff3d49
And I'm having this error with this code :
Code :
_DDctl readObj;
readObj.SetLinkTopic("ncdde|ncu840d");
The error :
QAxBase::qt_metacall: Object is not initialized, or initialization failed
I Noticed that this page shows the same problem that I have :
https://forum.qt.io/topic/69584/connecting-to-com-object-requested-control-could-not-be-instantiated
But I already Use , so it doesn't solve my problem
Please help me to find a solution

DLL / Typelib / COM

I have a C++ DLL which holds COM code. When trying to access the interface with VBA code, I am getting these error messages:
atlTraceCOM - ERROR : Unable to load Typelibrary. (HRESULT = 0x8002801d)
atlTraceCOM - Verify TypelibID and major version specified with
atlTraceCOM - IDispatchImpl, CStockPropImpl, IProvideClassInfoImpl or IProvideCLassInfo2Impl
I checked everthing - esp. version numbers - with OLEVIEW and the registry editor and cannot find something wrong. The COM is also working perfectly from another C++ client application (where I imported the .TLB first), but I cannot access from VBA ?!?
Any ideas?

Issue on ocilib error handling, how to correctly catch logs errors with ocilib?

I have a problem with error handling on ocilib.
I am currently using the OCILIB provides two mechanisms for error handling:
Global error handling through callbacks.
Contextual thread error handling
How I am initializing :
if (!isInit && !OCI_Initialize(&OracleManager::errorHandler, NULL, OCI_ENV_DEFAULT | OCI_ENV_CONTEXT))
throw ibs::exceptions::trace::db(61400, mManager.getMessage(61400));
My error handling callback :
static void errorHandler(OCI_Error *error)
{
LOG_(ibs::io::log::IN_CONSOLE, plog::debug) << OCI_GetSql(OCI_ErrorGetStatement(error));
LOG_(ibs::io::log::IN_FILE, plog::debug) << OCI_GetSql(OCI_ErrorGetStatement(error));
throw ibs::exceptions::trace::db(61403, "code: " + std::to_string(OCI_ErrorGetOCICode(error)) + ", " + OCI_ErrorGetString(error));
}
Contextual thread error handling :
if (!OCI_ExecuteStmt(mSt, query.c_str()))
{
OCI_Error *err = OCI_GetLastError();
if (err == nullptr || OCI_ErrorGetOCICode(err) == 0)
{
LOG_(ibs::io::log::IN_CONSOLE, plog::debug) << query;
LOG_(ibs::io::log::IN_FILE, plog::debug) << query;
throw ibs::exceptions::trace::db(61407, mManager.getMessage(61407));
}
errorHandler(err);
}
My problem is :
On my first insertion (on database) error : Ocilib call my callback with the correct error description.
On my second (and more) insertion error : Ocilib does not call my callback BUT OCI_ExecuteStmt() return me "false" and my data is not inserted into the database.
The fact that an error is detected is correct, it must be. But, for my second (and more) error, I have no information's about my error.
For traceability purpose, I need to known : Why my data are rejected ?
My problem is that I have this information only for the first error.
And even for the contextual thread error handling, the OCI_GetLastError() function return me a null pointer even if the data was rejected and OCI_ExecuteStmt() return me "false".
For example :
I am inserting incorrect data with ocilib.
Ocilib tell me that the data is incorrect and why (through the callback).
I am inserting the same incorrect data with ocilib.
Ocilib tell me that there is something wrong without calling the callback and ocilib does not tell me why (this is the problem).
I am inserting another incorrect data with ocilib.
Ocilib tell me that there is something wrong without calling the callback and ocilib does not tell me why.
Maybe I am doing something wrong on how I handle errors. Help would be appreciated.
Using 4.6.2 ocilib version on a C++11 application.
Can you open an issue on ocilib GitHub repo with a sample code
reproducting the issue?
Btw, as you're coding in C++, why not using Ocilib C++ API?

suppress wxFileName::Normalize error messages

I have the following c++ code that used to normalize user supplied file path:
wxString orig_path;
wxFileName res_path(orig_path);
res_path.Normalize(wxPATH_NORM_DOTS);
Refs:
wxFileName::Normalize
wxFileName::Normalize flags
When:
orig_path = "../../dir1/f.csv"
I get annoying error messages:
Error: The path 'f.csv' contains too many ".."!
When:
orig_path = "dir1/../dir2/f.csv"
everything works as expected.
Question
Any way I can suppress those error messages? (silent flag?).
I guess I can do some processing myself before calling Normailze but what's the point? I prefer not to do anything or know anything about orig_path before calling Normailze
Use wxLogNull. All calls to the log functions during the life time of an object of this class are just ignored.
See documentation.
wxLogNull noLogsPlease;
wxString orig_path;
wxFileName res_path(orig_path);
res_path.Normalize(wxPATH_NORM_DOTS);

C++ Windows Forms application unhandled exception error when textbox empty

I'm building a temperature conversion application in Visual Studio for a C++ course. It's a Windows Forms application.
My problem is, when I run the application if I don't have anything entered into either the txtFahrenheit or txtCelsius2 textboxes I get the following error:
"An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll"
The application only works right now when a number is entered into both of the textboxes.
I was told to try and use this:
Double::TryParse()
but I'm brand new to C++ and can't figure out how to use it, even after checking the MSDN library.
This will check that the entry in your textbox is convertible to a number.
double val;
bool result = System::Double::TryParse(txtFahrenheit->Text,val);
if (result)
{
//Converted successfully, you can use val
}
else
{
//Error
}