1 Reply Latest reply on Sep 28, 2002 5:26 AM by Arnaud22

    How to run cmp2 from JBoss.3.0TemplateAndExamples

    Siegfried Heintze Newbie

      I'm running jboss-3.0.0_tomcat-4.0.3/bin/run.bat -c default

      C:\JBoss.3.0TemplateAndExamples\cmp2>ant
      This seems to work -- I see the server respond and install the gangsters -- looks good.

      But now I type ant test and it dies. Why?

      The example in the template directory seems to work fine (after you get the .ant.properties and JBOSS_HOME and JBOSS_DIST set correctly).

      C:\JBoss.3.0TemplateAndExamples\cmp2>ant test
      Buildfile: build.xml

      prepare:

      compile:

      test:
      [junit] .E.F.F
      [junit] Time: 3.805
      [junit] There was 1 error:
      [junit] 1) testOrganization(org.jboss.docs.cmp2.crimeportal.CrimePortalTest)

      [junit] javax.ejb.ObjectNotFoundException: No such entity!
      [junit] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(
      JDBCFindEntityCommand.java:46)
      [junit] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JD
      BCStoreManager.java:464)
      [junit] at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPer
      sistenceManager.java:336)
      [junit] at org.jboss.resource.connectionmanager.CachedConnectionIntercep
      tor.findEntity(CachedConnectionInterceptor.java:301)
      [junit] at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:
      634)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome
      (EntityContainer.java:1116)
      [junit] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(Abstract
      Interceptor.java:73)
      [junit] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke
      Home(EntitySynchronizationInterceptor.java:257)
      [junit] at org.jboss.resource.connectionmanager.CachedConnectionIntercep
      tor.invokeHome(CachedConnectionInterceptor.java:215)
      [junit] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En
      tityInstanceInterceptor.java:134)
      [junit] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(Entity
      LockInterceptor.java:79)
      [junit] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(En
      tityCreationInterceptor.java:44)
      [junit] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstra
      ctTxInterceptor.java:98)
      [junit] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
      InterceptorCMT.java:167)
      [junit] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxIntercept
      orCMT.java:52)
      [junit] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(Security
      Interceptor.java:104)
      [junit] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogIntercepto
      r.java:109)
      [junit] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java
      :487)
      [junit] at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeH
      ome(BaseLocalContainerInvoker.java:227)
      [junit] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomePr
      oxy.java:110)
      [junit] at $Proxy42.findByPrimaryKey(Unknown Source)
      [junit] at org.jboss.docs.cmp2.crimeportal.CrimePortalTest.testOrganizat
      ion(CrimePortalTest.java:52)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at net.sourceforge.junitejb.EJBTestCase.runBare(EJBTestCase.java
      :133)
      [junit] at net.sourceforge.junitejb.EJBTestRunnerBean.runTestCase(EJBTes
      tRunnerBean.java:102)
      [junit] at net.sourceforge.junitejb.EJBTestRunnerBean.run(EJBTestRunnerB
      ean.java:44)
      [junit] at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.
      invoke(StatelessSessionContainer.java:664)
      [junit] at org.jboss.resource.connectionmanager.CachedConnectionIntercep
      tor.invoke(CachedConnectionInterceptor.java:186)
      [junit] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstra
      ctTxInterceptor.java:96)
      [junit] at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(Abs
      tractTxInterceptorBMT.java:144)
      [junit] at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBM
      T.java:62)
      [junit] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.inv
      oke(StatelessSessionInstanceInterceptor.java:77)
      [junit] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
      rceptor.java:129)
      [junit] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.ja
      va:166)
      [junit] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessi
      onContainer.java:313)
      [junit] at org.jboss.ejb.Container.invoke(Container.java:705)
      [junit] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.ja
      va:491)
      [junit] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvok
      er.java:362)
      [junit] at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
      a:261)
      [junit] at sun.rmi.transport.Transport$1.run(Transport.java:148)
      [junit] at java.security.AccessController.doPrivileged(Native Method)
      [junit] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      [junit] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
      t.java:460)
      [junit] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
      ransport.java:701)
      [junit] at java.lang.Thread.run(Thread.java:536)
      [junit] There were 2 failures:
      [junit] 1) testFindBadDudes(org.jboss.docs.cmp2.crimeportal.CrimePortalTest)
      junit.framework.AssertionFailedError: expected:<5> but was:<0>
      [junit] at org.jboss.docs.cmp2.crimeportal.CrimePortalTest.testFindBadDu
      des(CrimePortalTest.java:63)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at net.sourceforge.junitejb.EJBTestCase.runBare(EJBTestCase.java
      :133)
      [junit] at net.sourceforge.junitejb.EJBTestRunnerBean.runTestCase(EJBTes
      tRunnerBean.java:102)
      [junit] at net.sourceforge.junitejb.EJBTestRunnerBean.run(EJBTestRunnerB
      ean.java:44)
      [junit] at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.
      invoke(StatelessSessionContainer.java:664)
      [junit] at org.jboss.resource.connectionmanager.CachedConnectionIntercep
      tor.invoke(CachedConnectionInterceptor.java:186)
      [junit] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstra
      ctTxInterceptor.java:96)
      [junit] at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(Abs
      tractTxInterceptorBMT.java:144)
      [junit] at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBM
      T.java:62)
      [junit] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.inv
      oke(StatelessSessionInstanceInterceptor.java:77)
      [junit] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
      rceptor.java:129)
      [junit] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.ja
      va:166)
      [junit] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessi
      onContainer.java:313)
      [junit] at org.jboss.ejb.Container.invoke(Container.java:705)
      [junit] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.ja
      va:491)
      [junit] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvok
      er.java:362)
      [junit] at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
      a:261)
      [junit] at sun.rmi.transport.Transport$1.run(Transport.java:148)
      [junit] at java.security.AccessController.doPrivileged(Native Method)
      [junit] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      [junit] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
      t.java:460)
      [junit] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
      ransport.java:701)
      [junit] at java.lang.Thread.run(Thread.java:536)
      [junit] 2) testSelectBoss(org.jboss.docs.cmp2.crimeportal.CrimePortalTest)ju
      nit.framework.AssertionFailedError: expected:<1> but was:<0>
      [junit] at org.jboss.docs.cmp2.crimeportal.CrimePortalTest.testSelectBos
      s(CrimePortalTest.java:80)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
      sorImpl.java:39)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at net.sourceforge.junitejb.EJBTestCase.runBare(EJBTestCase.java
      :133)
      [junit] at net.sourceforge.junitejb.EJBTestRunnerBean.runTestCase(EJBTes
      tRunnerBean.java:102)
      [junit] at net.sourceforge.junitejb.EJBTestRunnerBean.run(EJBTestRunnerB
      ean.java:44)
      [junit] at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)
      [junit] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.
      invoke(StatelessSessionContainer.java:664)
      [junit] at org.jboss.resource.connectionmanager.CachedConnectionIntercep
      tor.invoke(CachedConnectionInterceptor.java:186)
      [junit] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstra
      ctTxInterceptor.java:96)
      [junit] at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(Abs
      tractTxInterceptorBMT.java:144)
      [junit] at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBM
      T.java:62)
      [junit] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.inv
      oke(StatelessSessionInstanceInterceptor.java:77)
      [junit] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
      rceptor.java:129)
      [junit] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.ja
      va:166)
      [junit] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessi
      onContainer.java:313)
      [junit] at org.jboss.ejb.Container.invoke(Container.java:705)
      [junit] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.ja
      va:491)
      [junit] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvok
      er.java:362)
      [junit] at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
      hodAccessorImpl.java:25)