2 Replies Latest reply: Apr 10, 2014 1:15 PM by user10199246 RSS

    Error using XMLType with 12c JDBC Driver

    user10199246

      All:

       

      We are attempting to enqueue an XML message onto an AQ queue.  We are creating the payload as an XMLType.  This works fine with 10g, 11g JDBC drivers, but runs into trouble with the 12c JDBC driver.  During runtime a ClassDefNotFound exception is thrown for oracle.xdb.XMLType.  Does XMLType work with the 12c thin JDBC driver?  Snippet below:

       

      public Message createMessage (Connection conn, Session session, String xmlMessage) {

       

      XMLType payload = null;

      AdtMessage msg = null;

       

      payload =XMLType.createXML((java.sql.Connection) conn, xmlMessage);

      msg = ((AQjmsSession) session).createORAMessage(payload);

       

      return msg;

        • 1. Re: Error using XMLType with 12c JDBC Driver
          Renu-Oracle

          Hi provide more detail on exception reported .

           

          Thanks

          • 2. Re: Error using XMLType with 12c JDBC Driver
            user10199246

            StackTrace is below.  Running in a WebSphere 8.5 app server.  Looks a lot like a JAR conflict issue, but we haven't been able to figure out the right JAR combination.


            Exception:java.lang.NoClassDefFoundError SourceId:com.ibm.ejs.container.BusinessExceptionMappingStrategy.setUncheckedException ProbeId:506 Reporter:com.ibm.ejs.container.BusinessExceptionMappingStrategy@f4461508

            java.lang.NoClassDefFoundError: oracle.xdb.XMLType

            at java.lang.J9VMInternals.verifyImpl(Native Method)

            at java.lang.J9VMInternals.verify(J9VMInternals.java:93)

            at java.lang.J9VMInternals.initialize(J9VMInternals.java:170)

            at oracle.jdbc.oracore.OracleTypeADT.applyTDSpatches(OracleTypeADT.java:1081)

            at oracle.jdbc.oracore.OracleTypeADT.parseTDSrec(OracleTypeADT.java:1002)

            at oracle.jdbc.oracore.OracleTypeADT.parseTDS(OracleTypeADT.java:936)

            at oracle.jdbc.oracore.OracleTypeADT.init(OracleTypeADT.java:489)

            at oracle.jdbc.oracore.OracleTypeADT.init(OracleTypeADT.java:470)

            at oracle.sql.OpaqueDescriptor.initPickler(OpaqueDescriptor.java:258)

            at oracle.sql.OpaqueDescriptor.<init>(OpaqueDescriptor.java:75)

            at oracle.sql.OpaqueDescriptor.createDescriptor(OpaqueDescriptor.java:180)

            at oracle.xdb.XMLType.<init>(XMLType.java:951)

            at oracle.xdb.XMLType.createXML(XMLType.java:1082)

            at oracle.xdb.XMLType.createXML(XMLType.java:1072)

            at <..>.jms.aq.AQMessageCreator.createPayload(Unknown Source)

            at <..>.jms.aq.AQMessageCreator.createMessage(Unknown Source)

            at <..>.jms.aq.AQMessageSender.send(Unknown Source)

            ... 153 more

            Caused by: java.lang.ClassNotFoundException: oracle.xdb.XMLType

            at java.net.URLClassLoader.findClass(URLClassLoader.java:599)

            at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:204)

            at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:743)

            at java.lang.ClassLoader.loadClass(ClassLoader.java:720)

            at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:119)

            at java.lang.ClassLoader.loadClass(ClassLoader.java:690)

            ... 170 more