Referring to this SO thread - Java: Returning XMLType Data from StoredProcedure, Usage of ojdbc6.jar xdb6.jar xmlparserv2.jar for Java to PLSQL interaction [ojdbc6.jar, xdb6.jar, xmlparserv2-11.1.1.jar]
The application works perfectly[able to retrieve the data without any exceptions] when it is deployed in my local tomcat server on my PC with JDK1.6 installed, but when deployed in JBOSS EAP 6.2 server running with JDK 1.7, it throws exception when trying to retrieve the XML through the OJDBC bridge.
java.lang.NullPointerException
13:53:51,265 ERROR [stderr] (http-/0.0.0.0:8080-1) at oracle.jdbc.driver.NamedTypeAccessor.getOracleObject(NamedTypeAccessor.java:320)
13:53:51,268 ERROR [stderr] (http-/0.0.0.0:8080-1) at oracle.jdbc.driver.NamedTypeAccessor.getObject(NamedTypeAccessor.java:217)
13:53:51,270 ERROR [stderr] (http-/0.0.0.0:8080-1) at oracle.jdbc.driver.NamedTypeAccessor.getObject(NamedTypeAccessor.java:123)
13:53:51,273 ERROR [stderr] (http-/0.0.0.0:8080-1) at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:2049)
13:53:51,275 ERROR [stderr] (http-/0.0.0.0:8080-1) at oracle.jdbc.driver.OracleCallableStatementWrapper.getObject(OracleCallableStatementWrapper.java:818)
I tried changing my local compiler settings and installed JRE from 1.6 to 1.7, still the local runs good.
Please throw your inputs on this error I am getting on the JBOSS server in remote PC. Is JBOSS trying to override the ojdbc jar that I already put in the application war file?
updates: Downgraded the JDK version from 1.7 to 1.6 in the remote server where JBoss is installed. Still getting this error while running in JBoss server. Looking for someone who might have came across this problem or knows what is the reason for this issue. Please share your inputs
DriverManager.registerDriver(new OracleDriver());
conn = DriverManager.getConnection(DB_CONNECTION_URL);
– Gallinule