6 Replies Latest reply on Apr 8, 2009 8:24 AM by Muthukumaran Manickavasagam

    Oracle Persistency

    Muthukumaran Manickavasagam Newbie

      Hi, Is there is any document explaining how to support oracle persistency to implement my Messaing Service in JBOSS? I'm able to bring up my application with hsqldb service by default. I'm planning to port this to Oracle persistency.

      This is pretty urgent for me, please help me in this regard. I will be more concern about how to configure, etc.

      in my oracle-persistence-service.xml

      Thanks,
      Muthu

        • 1. Re: Oracle Persistency
          Muthukumaran Manickavasagam Newbie

          I forget to post the exception here. This is what i'm seeing in continuously in the stdout,

          22:26:54,097 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
          22:27:21,645 WARN [JDBCSupport] SQLException caught, SQLState 42000 code:942- assuming deadlock detected, try:1
          java.sql.SQLException: ORA-00942: table or view does not exist

          at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
          at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
          at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
          at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:744)
          at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:218)
          at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:812)
          at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1048)
          at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:853)
          at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1153)
          at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3369)
          at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3414)
          at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:342)
          at org.jboss.messaging.core.impl.JDBCPersistenceManager$1ReserveIDBlockRunner.doTransaction(JDBCPersistenceManager.java:407)
          at org.jboss.messaging.core.impl.JDBCPersistenceManager$1ReserveIDBlockRunner.doTransaction(JDBCPersistenceManager.java:389)
          at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.execute(JDBCSupport.java:474)
          at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:512)
          at org.jboss.messaging.core.impl.JDBCPersistenceManager.reserveIDBlock(JDBCPersistenceManager.java:477)
          at org.jboss.messaging.core.impl.IDManager.getNextBigBlock(IDManager.java:87)
          at org.jboss.messaging.core.impl.IDManager.start(IDManager.java:74)
          at org.jboss.jms.server.ServerPeer.startService(ServerPeer.java:310)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
          at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:269)
          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:585)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
          at $Proxy36.start(Unknown Source)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
          at org.jboss.system.ServiceController.start(ServiceController.java:460)
          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
          at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
          at org.jboss.Main.boot(Main.java:209)
          at org.jboss.Main$1.run(Main.java:547)
          at java.lang.Thread.run(Thread.java:595)

          • 2. Re: Oracle Persistency
            Peter Johnson Master

            This is a warning message, so I am not sure if it is an issue. Are there and error messages on the console log?

            Also, did you change the data source name used within oracle-persistence-service.xml? Or are you suing DefaultDS?

            I assume you saw this: http://www.jboss.org/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.3.GA/html/configuration.html#conf.changingds

            • 3. Re: Oracle Persistency
              Peter Johnson Master

              Another thing - check your *-ds.xml file and make sure you can get a database connection. Also, did you create a ??? (can't recall the Oracle term) in the Oracle database into which the tables can be placed and did you grant the user mentioned in the *-ds.xml file the rights to create tables there? Did you look in the database to see if there were any tables created?

              • 4. Re: Oracle Persistency
                Muthukumaran Manickavasagam Newbie

                Yes. I'm using "DefaultDS". I have removed the hsql* specific files form deploy and messaging folders. So i'm using only oracle persistency. The user that i specified in the oracle-ds.xml is having every rights (How ever i get back to my DBA's and confirm this again). The following are the additional messages that i'm seeing it in the console,

                THis is coming after the "table or view does not exception".

                09:14:16,976 ERROR [JDBCSupport] Retried 25 times, now giving up
                09:14:16,992 ERROR [ExceptionUtil] ServerPeer[0] startService
                java.lang.IllegalStateException: Failed to execute transaction
                at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:544)
                at org.jboss.messaging.core.impl.JDBCPersistenceManager.reserveIDBlock(JDBCPersistenceManager.java:477)
                at org.jboss.messaging.core.impl.IDManager.getNextBigBlock(IDManager.java:87)
                at org.jboss.messaging.core.impl.IDManager.start(IDManager.java:74)
                at org.jboss.jms.server.ServerPeer.startService(ServerPeer.java:310)
                at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
                at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:269)
                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:585)
                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
                at $Proxy36.start(Unknown Source)
                at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
                at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
                at org.jboss.system.ServiceController.start(ServiceController.java:460)
                at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
                at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
                at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
                at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
                at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
                at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
                at org.jboss.Main.boot(Main.java:209)
                at org.jboss.Main$1.run(Main.java:547)
                at java.lang.Thread.run(Thread.java:595)
                09:14:17,008 ERROR [AbstractKernelController] Error installing to Start: name=jboss.messaging:service=ServerPeer state=Create mode=Manual requiredState=Installed
                java.lang.IllegalStateException: Failed to execute transaction
                at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:544)
                at org.jboss.messaging.core.impl.JDBCPersistenceManager.reserveIDBlock(JDBCPersistenceManager.java:477)
                at org.jboss.messaging.core.impl.IDManager.getNextBigBlock(IDManager.java:87)
                at org.jboss.messaging.core.impl.IDManager.start(IDManager.java:74)
                at org.jboss.jms.server.ServerPeer.startService(ServerPeer.java:310)

                At the end of the startup i'm seeing the following exception,

                09:14:18,620 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

                *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

                jboss.jca:name=JmsXA,service=ConnectionFactoryBinding
                -> jboss.jca:name=JmsXA,service=TxCM{Create:Configured}

                jboss.jca:name=JmsXA,service=ManagedConnectionFactory
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}

                jboss.jca:name=JmsXA,service=ManagedConnectionPool
                -> jboss.jca:name=JmsXA,service=ManagedConnectionFactory{Create:Configured}

                jboss.jca:name=JmsXA,service=TxCM
                -> jboss.jca:name=JmsXA,service=ManagedConnectionPool{Create:Configured}

                jboss.messaging.connectionfactory:service=ConnectionFactory
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
                -> jboss.messaging:service=PostOffice{Create:Configured}

                jboss.messaging.destination:name=BayesianUpdaterQueue,service=Queue
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
                -> jboss.messaging:service=PostOffice{Create:Configured}

                jboss.messaging.destination:name=DLQ,service=Queue
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
                -> jboss.messaging:service=PostOffice{Create:Configured}

                jboss.messaging.destination:name=ExpiryQueue,service=Queue
                -> jboss.messaging:service=PostOffice{Create:Configured}
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}

                jboss.messaging.destination:name=TransactionCategorisationTopic,service=Topic
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
                -> jboss.messaging:service=PostOffice{Create:Configured}

                jboss.messaging.destination:name=UserDrivenCategorizationTopic,service=Topic
                -> jboss.messaging:service=PostOffice{Create:Configured}
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}

                jboss.messaging.destination:name=UserLoginCategorisationTopic,service=Topic
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
                -> jboss.messaging:service=PostOffice{Create:Configured}

                jboss.messaging.destination:service=MDBDLQCF
                -> jboss.messaging:service=PostOffice{Create:Configured}
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}

                jboss.messaging.destination:service=MDBTestQueueCF
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
                -> jboss.messaging:service=PostOffice{Create:Configured}

                jboss.messaging:service=PostOffice
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}

                jboss.mq:service=DestinationManager
                -> jboss.messaging:service=ServerPeer{Create:**ERROR**}


                *** CONTEXTS IN ERROR: Name -> Error

                jboss.messaging:service=ServerPeer -> **ERROR** | java.lang.IllegalStateException: Failed to execute transaction

                • 5. Re: Oracle Persistency
                  Muthukumaran Manickavasagam Newbie

                  Hi Peter,

                  I copied the oracle persistency service XML file from examples/ folder. Now things are working fine. Also the link that you sent is pretty good for me.

                  But i do face another issue respect to quartz scheduler. The error is like below,

                  *** CONTEXTS IN ERROR: Name -> Error

                  jboss.ejb:service=EJB3TimerService -> org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining d
                  row lock: ORA-00942: table or view does not exist
                  [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
                  ]]

                  I'm thinking (google search) this is a known issue and i'm facing difficulties in removing ejb3 timer service. Any one resolved this issue with oracle, please let me know.

                  Thanks,
                  Muthu

                  • 6. Re: Oracle Persistency
                    Muthukumaran Manickavasagam Newbie

                    For now i have removed the ejb3-timer-service.xml from my deploy folder and it just worked fine. But if some one interested to ejb3 timer service and would like to know the work around you can check here,

                    https://jira.jboss.org/jira/browse/JBAS-6304;jsessionid=64DC0E9EDFF5C7A66EFC46EB65B234F2?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

                    I will probably open another thread to see how to optimize the list of services that jboss starts while start up...

                    Thanks Peter.