Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

I was emailed an interesting error recently at work that I've not seen previously. It was to do with the DBMS_PICKLER package being missing when using JDBC drivers from a WebLogic application. In this case we were upgrading from an earlier version of WebLogic to the latest (12.2) and that's where we started to see these errors.

This is what the stacktrace looked like...
 Exception
java.sql.SQLException: ORA-06550: line 1, column 17:
PLS-00302: component 'DBMS_PICKLER' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:223)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:56)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:907)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780)
at oracle.jdbc.driver.T4CCallableStatement.executeInternal(T4CCallableStatement.java:1300)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3887)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4230)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1079)
at oracle.jdbc.oracore.OracleTypeADT.initMetadata12(OracleTypeADT.java:537)
at oracle.jdbc.oracore.OracleTypeADT.initMetadata(OracleTypeADT.java:477)
at oracle.jdbc.oracore.OracleTypeADT.init(OracleTypeADT.java:443)
at oracle.sql.ArrayDescriptor.initPickler(ArrayDescriptor.java:1499)
at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java:259)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:124)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:79)


That indicated that this had something to do with Array bindings, which I knew were used quite heavily in this case. However that wasn't the real issue. The earlier version of WebLogic we had didn't use JDBC drivers that made use of DBMS_PICKLER (11gR2 onwards), but WebLogic 12.2 has JDBC drivers that certainly do make use of it.

What the package does it no really relevant, it's an internal package that's to do with array and custom type binding. What is relevant is that it's owned by SYS. And JDBC appears to call the procedure as if it was in the SYS schema.

The trouble was...we had a table with the name 'SYS' that was inside the schema that the application was accessing. This table was created as part of some patching bug, but wasn't rolled back, so once we moved to new JDBC drivers, it all broke.

The solution was to rename that table to something other than SYS and everything went back to normal!



-i

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.