1 Reply Latest reply on Jan 21, 2005 4:03 PM by Jiyang Hu

    Cannot get CMP  and Oracle JDBC configuration working

    Airon Yiu Newbie

      Hi:
      I followed the getting started document for JBoss 4.0, and everything works find until Chapter 7 (CMP) and Chapter 8 (Oracle JDBC). I just downloaded all these last week.

      When deploying CMP, get the following errors

      2004-10-25 17:35:20,231 ERROR [org.jboss.ejb.EntityContainer] Starting failed jboss.j2ee:jndiName=local/PlayerBean,service=EJB
      org.jboss.deployment.DeploymentException: Error while checking if table aleady exists TEAMBEAN; - nested throwable: (java.sql.SQLExc
      eption: Table not found: SYSTEM_TABLES in statement [SELECT * FROM SYSTEM_TABLES])
      at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.tableExists(SQLUtil.java:1002)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:83)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:484)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:381)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:157)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
      at $Proxy0.start(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:463)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
      Caused by: java.sql.SQLException: Table not found: SYSTEM_TABLES in statement [SELECT * FROM SYSTEM_TABLES]
      at org.hsqldb.jdbc.jdbcUtil.sqlException(Unknown Source)
      at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
      at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)
      at org.hsqldb.jdbc.jdbcDatabaseMetaData.execute(Unknown Source)
      at org.hsqldb.jdbc.jdbcDatabaseMetaData.getTables(Unknown Source)
      at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.tableExists(SQLUtil.java:995)
      ... 76 more
      17:35:20,245 INFO [EJBDeployer] Deployed: file:/app_server/jboss-4.0.0/server/default/tmp/deploy/tmp36487RosterApp.ear-contents/tea
      m-ejb.jar
      17:35:20,319 INFO [EARDeployer] Started J2EE application: file:/app_server/jboss-4.0.0/server/default/deploy/RosterApp.ear

      When running the client, get the followings:
      run-cmp:
      [java] Caught an exception:
      [java] java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      [java] java.rmi.ServerException: EJBException:; nested exception is:
      [java] javax.ejb.EJBException: createBeanClassInstanceCommand == null; CausedByException is:
      [java] createBeanClassInstanceCommand == null
      [java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
      [java] at sun.rmi.transport.Transport$1.run(Transport.java:148)
      [java] at java.security.AccessController.doPrivileged(Native Method)
      [java] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      [java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      [java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      [java] at java.lang.Thread.run(Thread.java:534)
      [java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      [java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      [java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      [java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
      [java] at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:73)
      [java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      [java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      [java] at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:106)
      [java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
      [java] at $Proxy2.createLeague(Unknown Source)
      [java] at client.RosterClient.insertInfo(RosterClient.java:156)
      [java] at client.RosterClient.main(RosterClient.java:51)
      [java] Caused by: java.rmi.ServerException: EJBException:; nested exception is:
      [java] javax.ejb.EJBException: createBeanClassInstanceCommand == null; CausedByException is:
      [java] createBeanClassInstanceCommand == null
      [java] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:347)
      [java] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
      [java] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      [java] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      [java] at org.jboss.ejb.Container.invoke(Container.java:854)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:324)
      [java] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      [java] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      [java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      [java] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      [java] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      [java] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:775)
      [java] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:324)
      [java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      [java] at sun.rmi.transport.Transport$1.run(Transport.java:148)
      [java] at java.security.AccessController.doPrivileged(Native Method)
      [java] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      [java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      [java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      [java] at java.lang.Thread.run(Thread.java:534)
      [java] Caused by: javax.ejb.EJBException: createBeanClassInstanceCommand == null; CausedByException is:
      [java] createBeanClassInstanceCommand == null
      [java] at roster.RosterBean.createLeague(RosterBean.java:439)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:324)
      [java] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      [java] at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:521)
      [java] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
      [java] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      [java] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:294)
      [java] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      [java] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      [java] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
      [java] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
      [java] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      [java] ... 25 more
      [java] Caught an exception:
      [java] java.rmi.NoSuchObjectException: Could not activate; failed to restore state; CausedByException is:
      [java] /app_server/jboss-4.0.0/server/default/tmp/sessions/RosterBean-e0qfs099-k/e0qg0t4y-l.ser (No such file or directory)
      [java] at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:118)
      [java] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:217)
      [java] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      [java] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      [java] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
      [java] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
      [java] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      [java] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      [java] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      [java] at org.jboss.ejb.Container.invoke(Container.java:854)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:324)
      [java] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      [java] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      [java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      [java] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      [java] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      [java] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:775)
      [java] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:324)
      [java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      [java] at sun.rmi.transport.Transport$1.run(Transport.java:148)
      [java] at java.security.AccessController.doPrivileged(Native Method)
      [java] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      [java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      [java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      [java] at java.lang.Thread.run(Thread.java:534)

      BUILD SUCCESSFUL
      Total time: 8 seconds
      (jboss)/app_server/src/j2eetutorial14/examples/ejb/cmproster$


      In trying the Oracle JDBC configuration, there is no such file jbosscmp-jdbc.xml, except in ./ejb/cmproster/dd/team/jbosscmp-jdbc.xml, and the file $JBOSS_HOME//conf/standardjbosscmp-jdbc.xml does not contain the lines as mentioned in section 8.3.3

      Thanks for any help