12 Replies Latest reply on May 26, 2005 11:08 AM by paarsar

    throws javax.ejb.CreateException, causedBy:java.lang.Illegal

    rawat_tejinder

      hello all,
      when i am calling the create method of an cmp bean in a session bean ia mgetting the following kind of error, it is sure thet there is no mistake in the code and in settings for connection with MS SQL server.
      now can some one tell me what is the reason of problem.



      11:17:51,484 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
      11:17:51,484 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract au.com.chimo.nextidserver.entities.LocalNextIDUser au.com.chimo.nextidserver.entities.LocalNextIDUserHome.create() throws javax.ejb.CreateException, causedBy:
      java.lang.IllegalStateException: createBeanClassInstanceCommand == null
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createBeanClassInstance(JDBCStoreManager.java:560)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createBeanClassInstance(CMPPersistenceManager.java:124)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createBeanClassInstance(CachedConnectionInterceptor.java:247)
      at org.jboss.ejb.EntityContainer.createBeanClassInstance(EntityContainer.java:224)
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:146)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:96)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:126)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:99)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
      at org.jboss.ejb.Container.invoke(Container.java:891)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
      at $Proxy57.create(Unknown Source)
      at au.com.chimo.nextidserver.impl.AdminNextIDServiceImplBean.registerUser(Unknown Source)
      at au.com.chimo.nextidserver.impl.AdminNextIDServiceImplBean.registerUser(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.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
      at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      at org.jboss.ejb.Container.invoke(Container.java:870)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:82)
      at $Proxy105.registerUser(Unknown Source)
      at au.com.chimo.nextidserver.service.AdminNextIDServiceBean.registerUser(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.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)

        • 1. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
          aloubyansky

          The application didn't deploy properly and there was an exception logged showing the details why.

          • 2. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
            rawat_tejinder

            thanks,

            you are right that there are some problems during deployment, it is always with last entity bean in the ejb-jar.xml, i consulted some people about this, some told me that this is a server bug.
            but still when i was running the application, application was running and session beans were being instantiated, but during running when executing localuserdatahome.create() this is giving the stack tarce as you saw previously.

            can you tell me the exact details about the problems and how to avoid them.
            thanks.

            • 3. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
              rawat_tejinder

              hello alex,
              for your reference i am getting the following type of message during deployment, the problem is always with last bean in the ejb-jar.xml, i even canged the order of some beans in the ejb-jar.xml, the problem was always with last bean, according to my investigations thiswas a server bug.

              16:26:00,156 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.1sp1/server/nextIDserver/deploy/cmx.ear
              16:26:07,296 INFO [EjbModule] Deploying NextIDUserEJB
              16:26:07,500 INFO [EjbModule] Deploying NextIDLogoEJB
              16:26:07,500 INFO [EjbModule] Deploying NextIDUserDataEJB
              16:26:07,531 INFO [EjbModule] Deploying NextIDTransformEJB
              16:26:07,531 INFO [EjbModule] Deploying NextIDSymbolEJB
              16:26:07,546 INFO [EjbModule] Deploying NextIDSheetEJB
              16:26:07,546 INFO [EjbModule] Deploying NextIDBaseEntityEJB
              16:26:07,562 INFO [EjbModule] Deploying NextIDDispatchEJB
              16:26:07,562 INFO [EjbModule] Deploying NextIDLogEJB
              16:26:07,578 INFO [EjbModule] Deploying NextIDServiceEJB
              16:26:07,609 INFO [EjbModule] Deploying NextIDBaseEJB
              16:26:07,640 INFO [EjbModule] Deploying AdminNextIDServiceEJB
              16:26:07,640 INFO [EjbModule] Deploying NextIDServiceImplEJB
              16:26:07,656 INFO [EjbModule] Deploying AdminNextIDServiceImplEJB
              16:26:07,656 INFO [EjbModule] Deploying ConfigNextIDServiceEJB
              16:26:07,671 INFO [EjbModule] Deploying ConfigNextIDServiceImplEJB
              16:26:07,671 INFO [EjbModule] Deploying NextIDConstantsEJB
              16:26:08,531 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=local/NextIDLogEJB,service=EJB
              java.lang.NullPointerException
              at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.loadLoadGroups(JDBCEntityBridge.java:1018)
              at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.resolveRelationships(JDBCEntityBridge.java:286)

              • 4. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
                rawat_tejinder

                one of the error during server startup when binding datasource with MS SQL server is as follow:

                17:43:11,187 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=DefaultDS,service=DataSourceBinding to JNDI name 'java:DefaultDS'
                17:43:16,531 ERROR [PersistenceManager] Starting failed jboss.mq:service=PersistenceManager
                org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Message recovery may not be accurate; - nested throwable: (java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'JMS_MESSAGES'.)
                at org.jboss.mq.pm.jdbc2.PersistenceManager.resolveAllUncommitedTXs(PersistenceManager.java:391)
                at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1422)
                at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
                at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
                at sun.reflect.GeneratedMethodAccessor2.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:144)
                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:249)
                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)

                • 5. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
                  rawat_tejinder

                   

                  "alex.loubyansky@jboss.com" wrote:
                  The application didn't deploy properly and there was an exception logged showing the details why.



                  thanks alex,
                  you are right,this is the problem with deployment, can you tell me what is the reason behind it, the problem is always with my last entity bean in the ejb-jar.xml. caused somewhere at org.jboss.ejb.plugins...
                  can you tell me where is the problem, i do not think there is some where problem in my application or ejb-jar.xml

                  • 6. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
                    ivanlc

                    It may be that some entity bean in the middle has failed to deploy due
                    to a mistake in the EJB-QL and other beans depend on it. I've had the same problem.

                    The bean that was throwing the exception at creation time was fine.
                    The culprit was elsewhere. Check the EJB-QL sentence parsing of all your entity beans (in DEBUG mode) and see one has failed.

                    Cheers,
                    Ivan

                    • 7. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
                      rawat_tejinder

                       

                      "ivanlc" wrote:
                      It may be that some entity bean in the middle has failed to deploy due
                      to a mistake in the EJB-QL and other beans depend on it. I've had the same problem.

                      The bean that was throwing the exception at creation time was fine.
                      The culprit was elsewhere. Check the EJB-QL sentence parsing of all your entity beans (in DEBUG mode) and see one has failed.

                      Cheers,
                      Ivan




                      thanks, ivanlc

                      i had solved the problem, the problem was same as you told
                      but the server should be capable of generating the error messages for such kind of exceptions.

                      this was the only TRACE mode which helped me.
                      Any way thanks ivanlc.



                      • 8. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
                        prasadjoshi

                        I m also getting the same problem "org.jboss.mq.SpyJMSException" but the thing is that i m not using any entity bean , i m using hibernate.plz anyone help me out.


                        Prasad Joshi

                        • 9. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
                          rawat_tejinder

                           

                          "prasadjoshi" wrote:
                          I m also getting the same problem "org.jboss.mq.SpyJMSException" but the thing is that i m not using any entity bean , i m using hibernate.plz anyone help me out.


                          Prasad Joshi


                          it is a problem with jboss server and it should not affect your application, if you are using the message beans then i think it may create problems.
                          if you are getting problems with your application then send the stack trace.

                          • 10. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
                            paarsar

                            Good evening ,

                            im having a simular problem, but i happend when i deploy a certain number of Entity Beans. I am using ejbdoclate to create the deployment descriptor. I have gone as far as striping out all of the ejbql statements and i still get the problem. It's always the last entity bean. I can show you a copy of the ejb-jar.xml and all other files if you need. please help i've been trying to fix this bug for 2 days and i have a lot of requests comming in

                            • 11. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
                              rawat_tejinder

                              can you send the ejb-jar.xml and other supporting files, the things can become clear from them.

                              • 12. Re: throws javax.ejb.CreateException, causedBy:java.lang.Ill
                                paarsar

                                sure can i send to your email or just post it????