8 Replies Latest reply on Sep 25, 2013 1:12 PM by Wolf-Dieter Fink

    JBoss AS7(EJB 3.1) + Hibernate

    Ayoub Aboutajedyne Newbie

      Hello,

       

      I got always this error when i use jBoss client to access to an Stateless EJB deployed(war archive) by an another eclipse project.

      Here is the output:

      sept. 24, 2013 7:11:19 AM org.xnio.Xnio <clinit>
      INFO: XNIO Version 3.0.3.GA
      sept. 24, 2013 7:11:19 AM org.xnio.nio.NioXnio <clinit>
      INFO: XNIO NIO Implementation Version 3.0.3.GA
      sept. 24, 2013 7:11:19 AM org.jboss.remoting3.EndpointImpl <clinit>
      INFO: JBoss Remoting version 3.2.3.GA
      Looking EJB via JNDI 
      ejb:/EJB_Hibernate_Test1//BookEjb!BookEjbRemote
      javax.naming.NamingException: Could not load ejb proxy class BookEjbRemote [Root exception is java.lang.ClassNotFoundException: BookEjbRemote]
        at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:108)
        at org.jboss.ejb.client.naming.ejb.EjbNamingContext.lookup(EjbNamingContext.java:96)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at org.java.main.Main.main(Main.java:53)
      Caused by: java.lang.ClassNotFoundException: BookEjbRemote
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:106)
        ... 3 more
      sept. 24, 2013 7:11:19 AM org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1$MessageReceiver handleEnd
      ERROR: Channel end notification received, closing channel Channel ID a4c09345 (outbound) of Remoting connection 00906563 to null
      

       

      and this is the structure of my client app project:

      Capture.PNG

      finally the Main class looks like:

       

      package org.java.main;
      
      
      import java.util.Hashtable;
      
      
      import javax.naming.Context;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;
      
      
      import org.jee.beans.Book;
      import org.jee.businesslayer.BookEjbRemote;
      
      
      public class Main {
      
        public static void main(String[] args) {
        final Hashtable<String, String> jndiProperties = new Hashtable<String, String>();
        jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.remote.client.InitialContextFactory");
        jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
        jndiProperties.put(Context.PROVIDER_URL,"remote://localhost:4447");
      
      
           jndiProperties.put(Context.SECURITY_PRINCIPAL, "aboutajedyne");
           jndiProperties.put(Context.SECURITY_CREDENTIALS, "javaisperfect");
      
      
        try {
        final Context context = new InitialContext(jndiProperties);
      
        final String appName = "";
        final String moduleName = "EJB_Hibernate_Test1";
        final String distinctName = "";
        final String beanName = "BookEjb";
        final String viewClassName = "BookEjbRemote";
      
      
      
        BookEjbRemote ejb = (BookEjbRemote) context.lookup("ejb:" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName);
        Book book = new Book("livre_java_2", 800);
      
      
        ejb.createBook(book);
           
           
        } catch (NamingException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        }
        }
      }
      

       

      The interface BookEjbRemote:

       

      package org.jee.businesslayer;
      import javax.ejb.Remote;
      
      
      import org.jee.beans.Book;
      
      @Remote
      public interface BookEjbRemote {
        public Book createBook(Book book); 
      }
      

       

       

      The Ejb Implementation(in another eclipse project [Server-side]):

       

      package org.jee.businesslayer;
      
      
      import javax.ejb.Stateless;
      import javax.persistence.PersistenceContext;
      
      
      import org.hibernate.Session;
      import org.jee.beans.Book;
      
      
      @Stateless
      public class BookEjb implements BookEjbRemote{
      
        @PersistenceContext(unitName="mySession")
        private Session session;
      
        @Override
        public Book createBook(Book book) {
        System.out.println("");
        System.out.println("The EntityManager is: " + session);
        System.out.println("Book: " + book);
      
        session.persist(book);
        return book;
        }
      }
      

       

      (NOTE: Know only that in server-side it works perfectly but not when i want to use it in another JVM...)

       

      Please i need help...

        • 1. Re: JBoss AS7(EJB 3.1) + Hibernate
          jaikiran pai Master
          final String viewClassName = "BookEjbRemote";

          That is supposed to be the fully qualified class name of the view interface. So "org.jee.businesslayer.BookEjbRemote"

          • 2. Re: JBoss AS7(EJB 3.1) + Hibernate
            Ayoub Aboutajedyne Newbie

            Hello thank's fot reply...Actually I see no more erro but there is no book created in BDD

             

            13:00:12,011 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

            13:00:12,299 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

            13:00:12,378 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

            13:00:13,962 INFO  [org.xnio] XNIO Version 3.0.3.GA

            13:00:13,964 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

            13:00:13,979 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

            13:00:13,992 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

            13:00:14,036 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

            13:00:14,064 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem

            13:00:14,135 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.

            13:00:14,153 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

            13:00:14,176 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

            13:00:14,192 INFO  [org.jboss.as.connector] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

            13:00:14,217 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem

            13:00:14,226 INFO  [org.jboss.as.security] (MSC service thread 1-1) JBAS013100: Current PicketBox version=4.0.7.Final

            13:00:14,371 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service

            13:00:14,421 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem

            13:00:14,705 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

            13:00:14,714 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

            13:00:14,792 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]

            13:00:14,901 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA

            13:00:15,426 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory C:\JBoss\jboss-as-7.1.1.Final\standalone\deployments

            13:00:15,448 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found EJB_Hibernate_Test1.war in deployment directory. To trigger deployment create a file called EJB_Hibernate_Test1.war.dodeploy

            13:00:15,457 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on localhost/127.0.0.1:4447

            13:00:15,503 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Démarrage de Coyote HTTP/1.1 sur http-localhost-127.0.0.1-8080

            13:00:15,715 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

            13:00:15,715 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:jboss/datasources/EJB_Hibernate_MySQL_BDD]

            13:00:15,788 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /127.0.0.1:9999

            13:00:15,962 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "EJB_Hibernate_Test1.war"

            13:00:17,241 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011401: Read persistence.xml for mySession

            13:00:17,434 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named BookEjb in deployment unit deployment "EJB_Hibernate_Test1.war" are as follows:

             

             

              java:global/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

              java:app/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

              java:module/BookEjb!org.jee.businesslayer.BookEjbRemote

              java:jboss/exported/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

              java:global/EJB_Hibernate_Test1/BookEjb

              java:app/EJB_Hibernate_Test1/BookEjb

              java:module/BookEjb

             

             

            13:00:17,867 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

            13:00:17,952 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011402: Starting Persistence Unit Service 'EJB_Hibernate_Test1.war#mySession'

            13:00:18,310 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-4) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

            13:00:18,329 INFO  [org.hibernate.Version] (MSC service thread 1-4) HHH000412: Hibernate Core {4.0.1.Final}

            13:00:18,332 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000206: hibernate.properties not found

            13:00:18,335 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000021: Bytecode provider name : javassist

            13:00:18,364 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-4) HHH000204: Processing PersistenceUnitInfo [

              name: mySession

              ...]

            13:00:19,185 WARN  [org.hibernate.internal.util.xml.DTDEntityResolver] (MSC service thread 1-4) HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

            13:00:19,409 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-4) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

            13:00:19,969 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-4) HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect

            13:00:19,999 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-4) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory

            13:00:20,006 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-4) HHH000397: Using ASTQueryTranslatorFactory

            13:00:20,092 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-4) Hibernate Validator 4.2.0.Final

            13:00:21,038 INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /EJB_Hibernate_Test1

            13:00:21,065 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990

            13:00:21,066 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 9786ms - Started 192 of 270 services (76 services are passive or on-demand)

            13:00:21,245 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "EJB_Hibernate_Test1.war"

            13:00:40,735 INFO  [org.jboss.as.naming] (Remoting "aboutajedyneayo" task-1) JBAS011806: Channel end notification received, closing channel Channel ID 3bd3287d (inbound) of Remoting connection 01e107ff to null

            13:01:47,206 INFO  [org.jboss.as.naming] (Remoting "aboutajedyneayo" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 73e31063 (inbound) of Remoting connection 00b077c9 to null

             

             

             

             

            Please help...

            • 3. Re: JBoss AS7(EJB 3.1) + Hibernate
              Ayoub Aboutajedyne Newbie

              Actually I see no more error but there is no book created in BDD


              13:00:12,011 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

              13:00:12,299 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

              13:00:12,378 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

              13:00:13,962 INFO  [org.xnio] XNIO Version 3.0.3.GA

              13:00:13,964 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

              13:00:13,979 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

              13:00:13,992 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

              13:00:14,036 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

              13:00:14,064 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem

              13:00:14,135 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.

              13:00:14,153 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

              13:00:14,176 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

              13:00:14,192 INFO  [org.jboss.as.connector] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

              13:00:14,217 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem

              13:00:14,226 INFO  [org.jboss.as.security] (MSC service thread 1-1) JBAS013100: Current PicketBox version=4.0.7.Final

              13:00:14,371 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service

              13:00:14,421 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem

              13:00:14,705 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

              13:00:14,714 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

              13:00:14,792 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]

              13:00:14,901 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA

              13:00:15,426 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory C:\JBoss\jboss-as-7.1.1.Final\standalone\deployments

              13:00:15,448 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found EJB_Hibernate_Test1.war in deployment directory. To trigger deployment create a file called EJB_Hibernate_Test1.war.dodeploy

              13:00:15,457 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on localhost/127.0.0.1:4447

              13:00:15,503 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Démarrage de Coyote HTTP/1.1 sur http-localhost-127.0.0.1-8080

              13:00:15,715 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

              13:00:15,715 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:jboss/datasources/EJB_Hibernate_MySQL_BDD]

              13:00:15,788 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /127.0.0.1:9999

              13:00:15,962 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "EJB_Hibernate_Test1.war"

              13:00:17,241 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011401: Read persistence.xml for mySession

              13:00:17,434 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named BookEjb in deployment unit deployment "EJB_Hibernate_Test1.war" are as follows:

               

               

                java:global/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

                java:app/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

                java:module/BookEjb!org.jee.businesslayer.BookEjbRemote

                java:jboss/exported/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

                java:global/EJB_Hibernate_Test1/BookEjb

                java:app/EJB_Hibernate_Test1/BookEjb

                java:module/BookEjb

               

               

              13:00:17,867 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

              13:00:17,952 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011402: Starting Persistence Unit Service 'EJB_Hibernate_Test1.war#mySession'

              13:00:18,310 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-4) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

              13:00:18,329 INFO  [org.hibernate.Version] (MSC service thread 1-4) HHH000412: Hibernate Core {4.0.1.Final}

              13:00:18,332 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000206: hibernate.properties not found

              13:00:18,335 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000021: Bytecode provider name : javassist

              13:00:18,364 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-4) HHH000204: Processing PersistenceUnitInfo [

                name: mySession

                ...]

              13:00:19,185 WARN  [org.hibernate.internal.util.xml.DTDEntityResolver] (MSC service thread 1-4) HHH000223: Recognized obsolete hibernate namespacehttp://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

              13:00:19,409 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-4) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

              13:00:19,969 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-4) HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect

              13:00:19,999 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-4) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory

              13:00:20,006 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-4) HHH000397: Using ASTQueryTranslatorFactory

              13:00:20,092 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-4) Hibernate Validator 4.2.0.Final

              13:00:21,038 INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /EJB_Hibernate_Test1

              13:00:21,065 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990

              13:00:21,066 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 9786ms - Started 192 of 270 services (76 services are passive or on-demand)

              13:00:21,245 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "EJB_Hibernate_Test1.war"

              13:00:40,735 INFO  [org.jboss.as.naming] (Remoting "aboutajedyneayo" task-1) JBAS011806: Channel end notification received, closing channel Channel ID 3bd3287d (inbound) of Remoting connection 01e107ff to null

              13:01:47,206 INFO  [org.jboss.as.naming] (Remoting "aboutajedyneayo" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 73e31063 (inbound) of Remoting connection 00b077c9 to null

               

               

               

               

              Please help...

              • 4. Re: JBoss AS7(EJB 3.1) + Hibernate
                Ayoub Aboutajedyne Newbie

                please can you give me documentation link related to this...

                • 6. Re: JBoss AS7(EJB 3.1) + Hibernate
                  Wolf-Dieter Fink Master

                  Maybe you should use a newer link, I suppose updates are not going into the older documentation nevertheless whether it is valid here.

                  Documentation - JBoss AS 7.2 - Project Documentation Editor

                  Documentation - WildFly 8 - Project Documentation Editor

                   

                  Also you should notice that the Book JPA class will be detached if you leave the server JVM, you might have to attach it if you try to sync it later.

                  • 7. Re: JBoss AS7(EJB 3.1) + Hibernate
                    surendrand001 Newbie

                    Please check your JNDI name.

                     

                    It should be any one like as follows.

                     

                      java:global/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

                      java:app/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

                      java:module/BookEjb!org.jee.businesslayer.BookEjbRemote

                      java:jboss/exported/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

                     

                    instead of

                    ejb:/EJB_Hibernate_Test1//BookEjb!BookEjbRemote 

                    • 8. Re: JBoss AS7(EJB 3.1) + Hibernate
                      Wolf-Dieter Fink Master

                      From the name shown in the log:

                      java:jboss/exported/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

                       

                      you should use ejb:/EJB_Hibernate_Test1/BookEjb!org.jee.businesslayer.BookEjbRemote

                       

                      the first / is because you have no EAR file. The view must be full qualified.