7 Replies Latest reply on Dec 6, 2004 4:39 PM by lfalcao

    Please help me about CMP

    jacky007

      I had this same problem, now partially solved by the instructions passed by Raist_Majere. Thanks!!
      But now I have another one (error description below). I've checked my code and it's similar to that posted by jacky007.

      2004-12-06 17:58:31,685 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy:
      java.lang.InstantiationException: com.tera.gravador.ItemCotacaoPK
      at java.lang.Class.newInstance0(Class.java:293)
      at java.lang.Class.newInstance(Class.java:261)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setPrimaryKeyValue(JDBCAbstractCMPFieldBridge.java:215)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.extractPrimaryKeyFromInstance(JDBCEntityBridge.java:572)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:124)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:527)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
      at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:731)
      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:207)
      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:91)
      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:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:68)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:133)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.Container.invoke(Container.java:756)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy439.create(Unknown Source)
      at com.tera.gravador.GravadorBean.learnJ2EE(GravadorBean.java:144)
      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:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:383)
      at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:534)



        • 1. Re: Please help me about CMP
          jacky007
          • 2. Re: Please help me about CMP
            raist_majere

            Can you copy the sources here or put it somewhere else? Because to get them on the link you provided a login is required and, as you could understand, I don't understand the vietnamese language of the page in order to get an account...

            • 3. Re: Please help me about CMP
              jacky007

              Oh, I'm so sorry, the link to download source code is below
              http://www.freewebs.com/jacky007profiles/CMP.zip

              • 4. Re: Please help me about CMP
                raist_majere

                I haven't tried it yet, but I think the problem is with your PK source. You have to define the variable as public because the CMP engine is outside your packages, so it cannot access the field so it generates an exception. Try it and say something.

                • 5. Re: Please help me about CMP
                  jacky007

                  Thanks you very much, that's a good advice and I have fixed the problem which was in the PK class. Thanks Raist_Majere again!!!!

                  • 6. Re: Please help me about CMP
                    lfalcao

                    I had this same problem, now partially solved by the instructions passed by Raist_Majere. Thanks!!
                    But now I have another one (error description below). I've checked my code and it's similar to that posted by jacky007.

                    2004-12-06 17:58:31,685 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy:
                    java.lang.InstantiationException: com.tera.gravador.ItemCotacaoPK
                    at java.lang.Class.newInstance0(Class.java:293)
                    at java.lang.Class.newInstance(Class.java:261)
                    at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setPrimaryKeyValue(JDBCAbstractCMPFieldBridge.java:215)
                    at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.extractPrimaryKeyFromInstance(JDBCEntityBridge.java:572)
                    at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:124)
                    at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:527)
                    at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
                    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
                    at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:731)
                    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:207)
                    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:91)
                    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:237)
                    at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:68)
                    at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
                    at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:133)
                    at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
                    at org.jboss.ejb.Container.invoke(Container.java:756)
                    at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
                    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
                    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
                    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
                    at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
                    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
                    at $Proxy439.create(Unknown Source)
                    at com.tera.gravador.GravadorBean.learnJ2EE(GravadorBean.java:144)
                    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:237)
                    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
                    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
                    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
                    at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
                    at org.jboss.ejb.Container.invoke(Container.java:738)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:383)
                    at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                    at sun.rmi.transport.Transport$1.run(Transport.java:148)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                    at java.lang.Thread.run(Thread.java:534)



                    • 7. Re: Please help me about CMP
                      lfalcao

                      I´ve already solved that. After hours looking for an answer, I found on: http://jguru.com/forums/view.jsp?EID=1181664

                      The absense of default constructor in primary key class was the cause for exception.