Forum Stats

  • 3,758,181 Users
  • 2,251,350 Discussions
  • 7,870,094 Comments

Discussions

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

User_4HQ5N
User_4HQ5N Member Posts: 1 Green Ribbon
edited Jul 7, 2021 7:26AM in Oracle Call Interface (OCI)

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>  <-- exception
}

MyType is mapped to a sql type that looks like this:

create or replace type my_varchar_table as table of varchar2(512);
create or replace type my_type_t as object (
  id number,
  names my_varchar_table
};


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.

Are there some changes we need to make to our readSQL method to support the new occi version? Or this is known regression with the v21 libs?

--

I have just verified that this issue also occurs in all versions of occi since (and including) 12.1. Was there some change in the AnyData serialization callback requirements between 11.2 and 12.1?