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
Instead of editing the question, I am adding as answer as to what worked in my case; Kudos to @mendieta
(1)
I tried marking driver as a dependency in MANIFEST.MF [Dependencies: com.oracle
] ;
and creating the module.xml inside /jboss/jboss-eap-6.2/modules/system/layers/base/com/oracle/main
and placing both module.xml and the ojdbc6.jar inside the main directory.
This worked :)
hence issue was with referring the correct jdbc driver. Tomcat could[probably tomcat has its version of jdbc(?)], jetty could, but jboss need this way of installing the jdbc driver.
(2)
Added the following entries in pom.xml to add the manifest entry while creating the war file, and also to exclude the ojdbc.jar from the manifest classpath(if you set classpath true, I did not) and to exclude from WEB-INF/lib
org.apache.maven.plugins
maven-war-plugin
2.5
com.oracle
com.oracle
ojdbc6
11.2.0.4
provided
References for maven pom.xml : http://maven.apache.org/guides/mini/guide-archive-configuration.html
note: Removing the ojdbc.jar from war file might prevent the application from running in tomcat server. It's removed from the war assuming its gonna run in jboss server, where we already installed the driver as a jboss module.