Why am i getting OCI-30757 during `getVector` in my `readSQL` method?

170 Views Asked by At

I'm upgrading our application to use the latest Oracle Instant Client libraries (linux-x64 v21.1.0.0.0), and I'm running into a new exception that we haven't seen before.

OCI-30757: Message 30757 not found;  product=RDBMS; facility=OCI

It's occurring during a call to oracle::occi::getVector in one of our types' readSQL methods:

void MyType::readSQL(AnyData& stream)
{
    mId = stream.getNumber(); // oracle::occi::Number
    oracle::occi::getVector(stream, mNames); // std::vector<std::string>
}

Are there some changes we need to make to our readSQL method to support the new occi version?

Here's the callstack:

oracle::occi::SQLException::SQLException(oracle::occi::SQLExceptionImpl*)@plt
oracle::occi::SQLExceptionCreate(void*, int)
oracle::occi::ErrorCheck(int, OCIError*)
oracle::occi::getVector(oracle::occi::AnyData const&, std::vector<std::string, std::allocator<std::string> >&)
MyDataType::readSQL(MyDataType * const this, oracle::occi::AnyData & stream)
MyDataType::readSQL(void * ctx)
libclntsh.so.21.1!kodpunp
libclntsh.so.21.1!kokoupkl
kokoicvtgen
kosimgconv
kosicvt
libclntsh.so.21.1!kosibegin
libclntsh.so.21.1!kpctos
ttca2p
ttcacs
ttcdrv
nioqwa
upirtrc
kpurcsc
kpuexec
OCIStmtExecute
oracle::occi::StatementImpl::doOCIExecute()
oracle::occi::StatementImpl::do_execute()
oracle::occi::StatementImpl::executeUpdate(std::string const&)
main(int argc, char ** argv)

I'm not even sure why it's calling readSQL here, the SP doesn't return an object of that type, and the SP isn't even executed before it crashes.

This works fine with v11 of the occi libs: readSQL isn't called, the SP is executed and everything is fine.

3

There are 3 best solutions below

2
krismohan On

Has the compiler also been updated? What version of compiler is being used?

1
krismohan On

Hmm. Which libocci shared library are you using? The default libocci.so is compatible only with g++4.x STLs.

0
krismohan On

OCCI is not certified with gcc10. Certainly not the default libocci.so.21.1. But you can try to use a new library meant to work with g++5/6/7/8. It is named libocci_gcc53.so.21.1 that you see when you install the regular client (21c), not the instant client.