4 Replies Latest reply on Mar 31, 2006 7:38 AM by yuka shimizu

    Please help me...error in Jboss start log

    yuka shimizu Newbie

      Hello.
      I want to program with ejb3.
      However, one Warning and one fatal error occur in the start log when I dispose the following programs and persistence.xml to jboss.
      When the program is actually executed, it is displayed, "MH001_001Bean not bound ".
      It is possible to execute it normally at the program not accessed DB.
      I don't understand what the cause.
      Could anyone have advice for me?

      Environment
      JBOSS4.0.3SP1 + EJB3.0RC5
      JDK1.5.0_06
      Postgres8.1.2

      Session Bean Class

      @Stateful
      @javax.ejb.Remote(MH001_001.class)
      public class MH001_001Bean implements MH001_001, Serializable{
       private String userId;
       private String passwd;
       private String name;
      
       @PersistenceContext(unitName="ejb3mn")
       protected EntityManager em;
      
       public Value doBiz(Hashtable param){
       boolean ret = true;
       String page = "/jsp/MH003.jsp";
       String error = "";
       Value value = new Value();
       String userId = (String)param.get("sesuserId");
       String passwd = (String)param.get("sespasswd");
      
       try{
       Context ctx = new InitialContext();
       em = (EntityManager)ctx.lookup("java:/EntityManager/ejb3mn");
       }catch(Exception e){
       System.out.println(e.getMessage());
       }
      
       UserBean obj = em.find(UserBean.class, userId);
       String pass = obj.getPasswd();
       value.setForwardPage(page);
       return value;
       }
      }


      Persistence.xml
      <?xml version="1.0" encoding="EUC-JP"?>
      <persistence>
       <persistence-unit name="ejb3mn">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:/PostgresDS</jta-data-source>
       <properties>
       <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
       <property name="hibernate.hbm2ddl.auto" value="update"/>
       <property name="jboss.entity.manager.jndi.name" value="java:/EntityManager/ejb3mn"/>
       <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
       <property name="jboss.no.implicit.datasource.dependency" value="true"/>
       </properties>
       </persistence-unit>
      </persistence>



      JBOSS start log(a part of log)
      10:11:05,965 INFO [TreeCache] setEvictionPolicyConfig(): [config: null]
      10:11:05,973 WARN [TreeCache] No transaction manager lookup class has been defined. Transactions cannot be used
      10:11:06,005 INFO [TreeCache] interceptor chain is:
      class org.jboss.cache.interceptors.CallInterceptor
      class org.jboss.cache.interceptors.LockInterceptor
      class org.jboss.cache.interceptors.CacheLoaderInterceptor
      class org.jboss.cache.interceptors.UnlockInterceptor
      class org.jboss.cache.interceptors.ReplicationInterceptor
      class org.jboss.cache.interceptors.CacheStoreInterceptor
      10:11:06,025 INFO [TreeCache] cache mode is REPL_SYNC
      10:11:06,467 INFO [STDOUT]
       .
       .
       .
      10:11:30,339 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
      10:11:30,597 INFO [TomcatDeployer] deploy, ctxPath=/massageboard, warUrl=.../tmp/deploy/tmp30188massageboard.war/
      10:11:30,696 INFO [TomcatDeployer] deploy, ctxPath=/webPrj, warUrl=.../tmp/deploy/tmp30189webPrj.war/
      10:11:30,811 INFO [EARDeployer] Init J2EE application: file:/usr/local/jboss-4.0.3SP1/server/all/deploy/test3.ear/
      10:11:31,030 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=MH001_001Bean, class=MH001_001Bean, type=STATEFUL
      10:11:31,166 FATAL [PersistenceXmlLoader] ejb3mn JTA
      10:11:31,178 INFO [Ejb3Deployment] EJB3 deployment time took: 205
      10:11:31,189 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=test3.ear.ear,jar=ejb.jar.jar,unitName=ejb3mn with dependencies:
      10:11:31,349 INFO [Environment] Hibernate 3.1.2
      10:11:31,364 INFO [Environment] hibernate.properties not found
      10:11:31,368 INFO [Environment] using CGLIB reflection optimizer
      10:11:31,368 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      10:11:31,667 INFO [Ejb3Configuration] found EJB3 Entity bean: UserBean
      10:11:31,878 INFO [AnnotationBinder] Binding entity from annotated class: UserBean
      10:11:32,050 INFO [EntityBinder] Bind entity UserBean on table user_test
      10:11:32,469 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      10:11:32,474 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
      10:11:32,626 INFO [SettingsFactory] RDBMS: PostgreSQL, version: 8.1.2
      10:11:32,627 INFO [SettingsFactory] JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.1 JDBC3 with SSL (build 405)
      10:11:32,658 INFO [Dialect] Using dialect: org.hibernate.dialect.PostgreSQLDialect
      10:11:32,670 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
      10:11:32,674 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      10:11:32,678 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup



        • 1. Re: Please help me...error in Jboss start log
          Martin Heinemann Newbie

          Hi,
          i had the same problem. I appeared while installing the ejb3 RC5 update to a self compiled JBoss 4.0.3SP1.

          Why not take the 40.4RC1?.

          • 2. Re: Please help me...error in Jboss start log
            yuka shimizu Newbie

            Thank you for the reply.
            Because JBOSS4.0.4 was "Release Candidate", I was not using it...Is this phenomenon improved in JBOSS4.0.4?
            A new error came to occur though it replaced with the hibernate-entitymanager.jar file that fix is done because information on the bug had come out by following URL.

            http://opensource.atlassian.com/projects/hibernate/browse/EJB-118?page=history
            Is there a file that should be replaced at the same time though the argument of deploy() is different?
            Hereafter, I also will try by JBOSS4.0.4.
            Moreover, my best regards when there are some advice.

            [new error:]

            11:05:19,658 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=ejb.jar
            java.lang.NoSuchMethodError: org.hibernate.ejb.packaging.PersistenceXmlLoader.deploy(Ljava/net/URL;Ljava/util/Map;)Ljava/util/List;
             at org.jboss.ejb3.Ejb3Deployment.initializePersistenceUnits(Ejb3Deployment.java:575)
             at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:440)
             at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:125)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
             at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
             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: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:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.create(Unknown Source)
             at org.jboss.system.ServiceController.create(ServiceController.java:341)
             at org.jboss.system.ServiceController.create(ServiceController.java:284)
             at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
             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: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:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy35.create(Unknown Source)
             at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:345)
             at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
             at org.jboss.deployment.MainDeployer.create(MainDeployer.java:925)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
             at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
             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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy6.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
             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: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:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.start(Unknown Source)
             at org.jboss.system.ServiceController.start(ServiceController.java:428)
             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: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:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy4.start(Unknown Source)
             at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
             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:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy5.deploy(Unknown Source)
             at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
             at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
             at org.jboss.Main.boot(Main.java:187)
             at org.jboss.Main$1.run(Main.java:438)
             at java.lang.Thread.run(Thread.java:595)
            11:05:19,669 INFO [EJB3Deployer] Deployed: file:/usr/local/jboss-4.0.3SP1/server/all/deploy/test3.ear/ejb.jar
            11:05:19,675 INFO [TomcatDeployer] deploy, ctxPath=/test3, warUrl=.../tmp/deploy/tmp50559test.war/
            11:05:19,930 INFO [EARDeployer] Started J2EE application: file:/usr/local/jboss-4.0.3SP1/server/all/deploy/test3.ear/
            11:05:19,931 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
            
            --- MBeans waiting for other MBeans ---
            ObjectName: jboss.j2ee:service=EJB3,module=ejb.jar
             State: FAILED
             Reason: java.lang.NoSuchMethodError: org.hibernate.ejb.packaging.PersistenceXmlLoader.deploy(Ljava/net/URL;Ljava/util/Map;)Ljava/util/List;
            
            --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
            ObjectName: jboss.j2ee:service=EJB3,module=ejb.jar
             State: FAILED
             Reason: java.lang.NoSuchMethodError: org.hibernate.ejb.packaging.PersistenceXmlLoader.deploy(Ljava/net/URL;Ljava/util/Map;)Ljava/util/List;


            • 3. Re: Please help me...error in Jboss start log
              Emmanuel Bernard Master

              you cannot just replace Hibernate EntityManager, since
              JBoss EJB3 depends on ejb3-persistence.jar which is implemented by HEM whish use Hibernate Annotations which use Hibernate Core

              All of than have depencies form left to right.

              • 4. Re: Please help me...error in Jboss start log
                yuka shimizu Newbie

                Thank you for the reply.
                I study your advice better.


                Thank you.