6 Replies Latest reply on Nov 11, 2002 9:29 PM by Viktor Mikho

    Oracle9i oci driver

    Hemang Newbie

      Hi,

      I am using jboss3.0.4 and oracle9i with oci driver and CMP2.0 ,but when application try to create first entity it throws the following error.It does work with thin driver but main reason to go for oci driver is to store CLOB.Please help.Thanks in advance.


      2002-11-04 15:18:49,296 WARN [org.jboss.tm.TxCapsule] XAException: tx=XidImpl [FormatId=257, GlobalId=APPL070307//0, BranchQual=] errorCode=XAER_PROTO
      javax.transaction.xa.XAException
      at oracle.jdbc.xa.OracleXAResource.disallowLocalTxnMode(OracleXAResource.java:1045)
      at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:153)
      at org.jboss.tm.TxCapsule.startResource(TxCapsule.java:1232)
      at org.jboss.tm.TxCapsule.enlistResource(TxCapsule.java:726)
      at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:102)
      at org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener.enlist(XATxConnectionManager.java:262)
      at org.jboss.resource.connectionmanager.XATxConnectionManager.managedConnectionReconnected(XATxConnectionManager.java:202)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:534)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.JDBCDataSource.getConnection(JDBCDataSource.java:110)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:92)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:44)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:541)
      at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:336)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:301)
      at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:636)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:206)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy35.findByPrimaryKey(Unknown Source)
      at airline.ejb.SequenceSessionBean.getNextSequenceNumber(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:81)
      at $Proxy38.getNextSequenceNumber(Unknown Source)
      at airline.ejb.TestclobBean.ejbCreate(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:221)

        • 1. Re: Oracle9i oci driver
          Stephen Coy Novice

          I have non-trivial test cases that show that Oracle CLOBs work.

          Can you tell me if your classes12.jar file contains the following in its manifest?

          Implementation-Title: "classes12 archives"
          Implementation-Version: "Oracle JDBC Driver version - 9.0.2.0.0"
          Implementation-Vendor: "Oracle Corporation"
          Implementation-Time: "Thu Apr 25 23:06:00 2002"


          If the above is OK, then the only other thing that I can think of is that you have your data source "half" configured to use XA transactions. What is the URL that you are using in your oracle-service.xml file? The reason I ask this is because it looks like the driver is attempting to start an XA transaction for some reason, and you have set up a "Local" data source.

          It might be easier to post your oracle-service.xml so that I can have a gander at it.

          Steve

          • 2. Re: Oracle9i oci driver
            Stephen Coy Novice

            I have non-trivial test cases that show that Oracle CLOBs work.

            Can you tell me if your classes12.jar file contains the following in its manifest?

            Implementation-Title: "classes12 archives"
            Implementation-Version: "Oracle JDBC Driver version - 9.0.2.0.0"
            Implementation-Vendor: "Oracle Corporation"
            Implementation-Time: "Thu Apr 25 23:06:00 2002"


            If the above is OK, then the only other thing that I can think of is that you have your data source "half" configured to use XA transactions. What is the URL that you are using in your oracle-service.xml file? The reason I ask this is because it looks like the driver is attempting to start an XA transaction for some reason, and you have set up a "Local" data source.

            It might be easier to post your oracle-service.xml so that I can have a gander at it.

            Steve

            • 3. Re: Oracle9i oci driver
              Hemang Newbie

              Got it , it worked.

              Thanks very much

              • 4. Re: Oracle9i oci driver
                Viktor Mikho Newbie

                I am trying to use BLOBs in exactly the same setup -
                jboss3.0.4 and oracle9i with CMP2.0.

                It does not work for me - Oracle crashes on insert from JBoss if BLOB size exceeds 4K. After that JBoss complains:

                12:10:02,414 ERROR [MsgBody] Could not create entity
                java.sql.SQLException: Io exception: Connection reset by peer: JVM_recv in socket input stream read....

                Could anyone enlighten me whether

                - is OCI driver just classes12.jar? (my version as described in this topic)
                - what Java type should I use (I am using byte[] at the moment)
                - what should be my mapping in the standardjbosscmp-jdbc.xml?

                Cheers

                • 5. Re: Oracle9i oci driver
                  Viktor Mikho Newbie

                  I am trying to use BLOBs in exactly the same setup -
                  jboss3.0.4 and oracle9i with CMP2.0.

                  It does not work for me - Oracle crashes on insert from JBoss if BLOB size exceeds 4K.
                  After that JBoss complains:

                  12:10:02,414 ERROR [MsgBody] Could not create entity
                  java.sql.SQLException: Io exception: Connection reset by peer: JVM_recv in socket input stream read....

                  Could anyone enlighten me whether

                  - is OCI driver located in classes12.jar? (my version as described in this topic). Do I need to do anything special to invoke it apart from putting in the lib directory?
                  - what Java type should I use (I am using byte[] at the moment)
                  - what should be my mapping in the standardjbosscmp-jdbc.xml?
                  - any other secrets to make it work?

                  Cheers

                  • 6. Re: Oracle9i oci driver
                    Viktor Mikho Newbie

                    I am trying to use BLOBs in exactly the same setup -
                    jboss3.0.4 and oracle9i with CMP2.0.

                    It does not work for me - Oracle crashes on insert from JBoss if BLOB size exceeds 4K.
                    After that JBoss complains:

                    12:10:02,414 ERROR [MsgBody] Could not create entity
                    java.sql.SQLException: Io exception: Connection reset by peer: JVM_recv in socket input stream read....

                    Could anyone enlighten me whether

                    - is OCI driver in classes12.jar? (my version as described in this topic). Do I need to do anything special to invoke it apart from putting in the lib directory?
                    - what Java type should I use (I am using byte[] at the moment)
                    - what should be my mapping in the standardjbosscmp-jdbc.xml?
                    - any other secrets to make it work?

                    Cheers