4 Replies Latest reply on Aug 10, 2015 4:59 AM by sahu_sk9

    javax.naming.NameNotFoundException: ejb:

    sahu_sk9

      Hi,

         I am trying to change my server from JBoss 7.1.1 to WildFly 8.2 and getting the error message as given below.

       

      javax.naming.NameNotFoundException: ejb:/BRPTextileEJBSE//BRPTexoSE!com.orava.brp.textile.session.BRPTexoSERemote -- service jboss.naming.context.java.jboss.exported.ejb:.BRPTextileEJBSE."BRPTexoSE!com.orava.brp.textile.session.BRPTexoSERemote"

          at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:104)

          at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:202)

          at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)

          at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:127)

          at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

          at java.lang.Thread.run(Thread.java:745)

       

      Here is server side deployment message :

       

      11:45:15,008 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final

      11:45:15,382 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final

      11:45:15,476 INFO  [org.jboss.as] (MSC service thread 1-7) JBAS015899: WildFly 8.2.0.Final "Tweek" starting

      11:45:17,115 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found BRPFinanceEJB.jar in deployment directory. To trigger deployment create a file called BRPFinanceEJB.jar.dodeploy

      11:45:17,115 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found BRPTextileEJBSE.jar in deployment directory. To trigger deployment create a file called BRPTextileEJBSE.jar.dodeploy

      11:45:17,147 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)

      11:45:17,178 INFO  [org.xnio] (MSC service thread 1-2) XNIO version 3.3.0.Final

      11:45:17,194 INFO  [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.3.0.Final

      11:45:17,225 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 32) JBAS010280: Activating Infinispan subsystem.

      11:45:17,240 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 38) JBAS012615: Activated the following JSF Implementations: [main]

      11:45:17,334 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 4.0.6.Final

      11:45:17,381 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 45) JBAS013171: Activating Security Subsystem

      11:45:17,396 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      11:45:17,396 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013170: Current PicketBox version=4.0.21.Final

      11:45:17,552 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 40) JBAS011800: Activating Naming Subsystem

      11:45:17,584 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

      11:45:17,646 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 31) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors

      11:45:17,662 INFO  [org.jboss.as.naming] (MSC service thread 1-7) JBAS011802: Starting Naming Service

      11:45:17,662 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017502: Undertow 1.1.0.Final starting

      11:45:17,677 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) JBAS017502: Undertow 1.1.0.Final starting

      11:45:17,693 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-5) JBAS015400: Bound mail session [java:jboss/mail/Default]

      11:45:17,708 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.

      11:45:17,724 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)

      11:45:17,755 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-5) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.9.Final)

      11:45:17,786 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) JBAS010417: Started Driver service with driver-name = oracle

      11:45:17,786 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010417: Started Driver service with driver-name = h2

      11:45:17,833 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017527: Creating file handler for path C:\Jboss\wildfly-8.2.0.Final/welcome-content

      11:45:17,833 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017525: Started server default-server.

      11:45:17,896 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) JBAS017531: Host default-host starting

      11:45:18,083 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) JBAS015012: Started FileSystemDeploymentService for directory C:\Jboss\wildfly-8.2.0.Final\standalone\deployments

      11:45:18,083 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "BRPTextileEJBSE.jar" (runtime-name: "BRPTextileEJBSE.jar")

      11:45:18,083 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "BRPFinanceEJB.jar" (runtime-name: "BRPFinanceEJB.jar")

      11:45:18,613 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017519: Undertow HTTP listener default listening on localhost/127.0.0.1:8181

      11:45:18,677 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-4) JBAS018567: Deployment "deployment.BRPTextileEJBSE.jar" is using a private module ("org.javassist:main") which may be changed or removed in future versions without notice.

      11:45:18,677 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-4) JBAS018567: Deployment "deployment.BRPTextileEJBSE.jar" is using a private module ("org.antlr:main") which may be changed or removed in future versions without notice.

      11:45:18,786 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment BRPFinanceEJB.jar

      11:45:18,879 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016002: Processing weld deployment BRPTextileEJBSE.jar

      11:45:18,926 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:jboss/datasources/OracleDS]

      11:45:18,926 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

      11:45:18,957 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.1.3.Final

      11:45:19,223 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named OICFin in deployment unit deployment "BRPFinanceEJB.jar" are as follows:

       

          java:global/BRPFinanceEJB/OICFin!com.orava.brp.finance.session.OICFin

          java:app/BRPFinanceEJB/OICFin!com.orava.brp.finance.session.OICFin

          java:module/OICFin!com.orava.brp.finance.session.OICFin

          java:global/BRPFinanceEJB/OICFin!com.orava.brp.finance.session.OICFinRemote

          java:app/BRPFinanceEJB/OICFin!com.orava.brp.finance.session.OICFinRemote

          java:module/OICFin!com.orava.brp.finance.session.OICFinRemote

          java:jboss/exported/BRPFinanceEJB/OICFin!com.orava.brp.finance.session.OICFinRemote

       

      11:45:19,223 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named BRPTexoSE in deployment unit deployment "BRPTextileEJBSE.jar" are as follows:

       

          java:global/BRPTextileEJBSE/BRPTexoSE!com.orava.brp.textile.session.BRPTexoSERemote

          java:app/BRPTextileEJBSE/BRPTexoSE!com.orava.brp.textile.session.BRPTexoSERemote

          java:module/BRPTexoSE!com.orava.brp.textile.session.BRPTexoSERemote

          java:jboss/exported/BRPTextileEJBSE/BRPTexoSE!com.orava.brp.textile.session.BRPTexoSERemote

          java:global/BRPTextileEJBSE/BRPTexoSE!com.orava.brp.textile.session.BRPTexoSE

          java:app/BRPTextileEJBSE/BRPTexoSE!com.orava.brp.textile.session.BRPTexoSE

          java:module/BRPTexoSE!com.orava.brp.textile.session.BRPTexoSE

       

      11:45:19,301 INFO  [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.2.Final

      11:45:19,862 INFO  [org.jboss.weld.deployer] (MSC service thread 1-6) JBAS016005: Starting Services for CDI deployment: BRPFinanceEJB.jar

      11:45:19,926 INFO  [org.jboss.weld.Version] (MSC service thread 1-6) WELD-000900: 2.2.6 (Final)

      11:45:19,972 INFO  [org.jboss.weld.deployer] (MSC service thread 1-6) JBAS016008: Starting weld service for deployment BRPFinanceEJB.jar

      11:45:20,160 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016005: Starting Services for CDI deployment: BRPTextileEJBSE.jar

      11:45:20,175 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016008: Starting weld service for deployment BRPTextileEJBSE.jar

      11:45:21,517 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "BRPTextileEJBSE.jar" (runtime-name : "BRPTextileEJBSE.jar")

      11:45:21,517 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "BRPFinanceEJB.jar" (runtime-name : "BRPFinanceEJB.jar")

      11:45:21,565 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management

      11:45:21,565 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

      11:45:21,565 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 6947ms - Started 338 of 398 services (98 services are lazy, passive or on-demand)

       

       

      Here is jboss-ejb-client.properties :

       

      remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

      remote.connections=default

      remote.connection.default.host=localhost

      remote.connection.default.port= 8181

      remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

      remote.connection.default.username=sksahu

      remote.connection.default.password=king*123

      remote.connection.default.connect.timeout=5000

      invocation.timeout=3000

       

      Here is the look up code :

       

          final Properties jndiProperties = new Properties();
        
      /*   jndiProperties.put("org.jboss.ejb.client.scoped.context","true");
         jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
         jndiProperties.put(Context.PROVIDER_URL,"http-remoting://localhost:8181");
      */  
            jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.remote.client.InitialContextFactory.class.getName());
            jndiProperties.put(Context.PROVIDER_URL,"http-remoting://localhost:8181");
           
            // username
            jndiProperties.put(Context.SECURITY_PRINCIPAL, "sksahu");
            // password
            jndiProperties.put(Context.SECURITY_CREDENTIALS, "king*123");
           
           
          String appName="";
          String moduleName="BRPTextileEJBSE";
          String distinctName="";
          String beanName=BRPTexoSE.class.getSimpleName();
          String viewClassName = BRPTexoSERemote.class.getName();
        
          // for stateless
          String name = "ejb:" + appName + "/" + moduleName + "/" + distinctName+ "/" + beanName + "!" + viewClassName;
             
         
       
          BRPTexoSERemote proc = null;
          try{
              final Context ctx = new InitialContext(jndiProperties);
         //final Context ctx = new InitialContext();
              proc=(BRPTexoSERemote) ctx.lookup(name);

               }catch(Exception e){

              e.printStackTrace();

               }

       

      Any suggestions or server side changes required?

      Thank you in advance

        • 1. Re: javax.naming.NameNotFoundException: ejb:
          sahu_sk9
          jndiProperties.put("org.jboss.ejb.client.scoped.context","true");
             jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

           

          now when these 2 properties added in to lookup code getting the error given bellow :

           

          Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:BRPTextileEJBSE, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@937cea

              at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:749)

              at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)

              at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)

              at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:253)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:198)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)

              at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)

              at com.sun.proxy.$Proxy0.getFinYearList(Unknown Source)

              at com.orava.util.AccessUtils.getFinYearList(AccessUtils.java:260)

              at com.orava.brp.textile.login.UserLogin.<init>(UserLogin.java:81)

              at com.orava.brp.textile.login.UserLogin.main(UserLogin.java:382)

          • 2. Re: javax.naming.NameNotFoundException: ejb:
            wdfink

            I would not use scoped-context, there are different issues with it.

            Seems that the server uses 8181 and the properties are correct.

            What if you enable logging for org.jboss.ejb.client and org.jboss.remoting at client side, maybe that give you more details what goes wrong

            • 3. Re: javax.naming.NameNotFoundException: ejb:
              sahu_sk9

              Thanks Fink for reply, when I removed scoped-context, got the client side error message given bellow :

               

              010/08/15 11:22:30 DEBUG org.jboss.logging  - Logging Provider: org.jboss.logging.Log4jLoggerProvider

              31   10/08/15 11:22:30 DEBUG org.jboss.naming.remote.client.InitialContextFactory  - Looking for jboss-naming-client.properties using classloader sun.misc.Launcher$AppClassLoader@e48e1b

              31   10/08/15 11:22:30 DEBUG org.jboss.naming.remote.client.InitialContextFactory  - jboss.naming.client.endpoint.create.options. has the following options {}

              31   10/08/15 11:22:30 DEBUG org.jboss.naming.remote.client.InitialContextFactory  - jboss.naming.client.remote.connectionprovider.create.options. has the following options {}

              46   10/08/15 11:22:30 INFO  org.xnio  - XNIO version 3.3.0.Final

              109  10/08/15 11:22:30 INFO  org.xnio.nio  - XNIO NIO Implementation Version 3.3.0.Final

              156  10/08/15 11:22:30 DEBUG org.xnio.nio  - Started channel thread 'Remoting "config-based-naming-client-endpoint" I/O-1', selector sun.nio.ch.WindowsSelectorImpl@b48e23

              171  10/08/15 11:22:30 INFO  org.jboss.remoting  - JBoss Remoting version 4.0.6.Final

              187  10/08/15 11:22:30 DEBUG org.jboss.naming.remote.client.InitialContextFactory  - jboss.naming.client.connect.options. has the following options {}

              327  10/08/15 11:22:31 INFO  org.jboss.ejb.client  - JBoss EJB Client version 2.0.1.Final

              358  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.EJBClientPropertiesLoader  - Looking for jboss-ejb-client.properties using classloader sun.misc.Launcher$AppClassLoader@e48e1b

              358  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.EJBClientPropertiesLoader  - Found jboss-ejb-client.properties using classloader sun.misc.Launcher$AppClassLoader@e48e1b

              358  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - endpoint.create.options. has the following options {}

              358  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - remote.connectionprovider.create.options. has the following options {org.xnio.Options.SSL_ENABLED=>false}

              358  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - remote.connection.default.connect.options. has the following options {org.xnio.Options.SASL_POLICY_NOANONYMOUS=>false}

              358  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - remote.connection.default.channel.options. has the following options {}

              358  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - Connection org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration$RemotingConnectionConfigurationImpl@1709b64 successfully created for connection named default

              358  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - No clusters configured in properties

              374  10/08/15 11:22:31 DEBUG org.xnio.nio  - Started channel thread 'Remoting "config-based-ejb-client-endpoint" I/O-1', selector sun.nio.ch.WindowsSelectorImpl@1674b36

              733  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Channel Channel ID 952600ae (outbound) of Remoting connection 013b02da to localhost/127.0.0.1:8181 opened for context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1c4d350, receiver=Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@10d345a,channel=jboss.ejb,nodename=sk-vaio]} Waiting for version handshake message from server

              748  10/08/15 11:22:31 INFO  org.jboss.ejb.client.remoting  - EJBCLIENT000017: Received server version 2 and marshalling strategies [river]

              765  10/08/15 11:22:31 INFO  org.jboss.ejb.client.remoting  - EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1c4d350, receiver=Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@10d345a,channel=jboss.ejb,nodename=sk-vaio]} on channel Channel ID 952600ae (outbound) of Remoting connection 013b02da to localhost/127.0.0.1:8181

              765  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Received module availability report for 1 modules

              765  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Registering module EJBModuleIdentifier{appName='', moduleName='BRPTextileEJBSE', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1c4d350, receiver=Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@10d345a,channel=jboss.ejb,nodename=sk-vaio]}

              765  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.remoting.ChannelAssociation  - Unsupported message received with header 0xffffffff

              765  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector  - Registered 1 remoting EJB receivers for EJB client context org.jboss.ejb.client.EJBClientContext@1c4d350

              765  10/08/15 11:22:31 DEBUG org.jboss.ejb.client.EJBClientContext  - org.jboss.ejb.client.RandomDeploymentNodeSelector@1ad9256 deployment node selector selected sk-vaio node for appname=,modulename=BRPTextileEJBSE,distinctname=

              Exception in thread "main" javax.ejb.EJBException: java.util.concurrent.TimeoutException: No invocation response received in 3000 milliseconds

                  at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:236)

                  at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)

                  at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)

                  at com.sun.proxy.$Proxy0.getFinYearList(Unknown Source)

                  at com.orava.util.AccessUtils.getFinYearList(AccessUtils.java:260)

                  at com.orava.brp.textile.login.UserLogin.<init>(UserLogin.java:81)

                  at com.orava.brp.textile.login.UserLogin.main(UserLogin.java:382)

              Caused by: java.util.concurrent.TimeoutException: No invocation response received in 3000 milliseconds

                  at org.jboss.ejb.client.EJBClientInvocationContext$InvocationTimeoutResultProducer.getResult(EJBClientInvocationContext.java:714)

                  at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:276)

                  at org.jboss.ejb.client.EJBObjectInterceptor.handleInvocationResult(EJBObjectInterceptor.java:64)

                  at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:290)

                  at org.jboss.ejb.client.EJBHomeInterceptor.handleInvocationResult(EJBHomeInterceptor.java:88)

                  at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:290)

                  at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:46)

                  at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:290)

                  at org.jboss.ejb.client.ReceiverInterceptor.handleInvocationResult(ReceiverInterceptor.java:129)

                  at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:265)

                  at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:453)

                  at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:202)

                  ... 6 more

              7947 10/08/15 11:22:38 ERROR org.jboss.remoting.remote.connection  - JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host

              7978 10/08/15 11:22:38 DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Closing channelChannel ID 952600ae (outbound) of Remoting connection 013b02da to localhost/127.0.0.1:8181

              7980 10/08/15 11:22:38 DEBUG org.jboss.ejb.client.remoting.ChannelAssociation  - Closing channel Channel ID 952600ae (outbound) of Remoting connection 013b02da to localhost/127.0.0.1:8181

              7981 10/08/15 11:22:38 DEBUG org.jboss.ejb.client.remoting.ChannelAssociation  - Registering a re-connect handler org.jboss.ejb.client.remoting.EJBClientContextConnectionReconnectHandler@15a0b2f for broken channel Channel ID 952600ae (outbound) of Remoting connection 013b02da to localhost/127.0.0.1:8181 in EJB client context org.jboss.ejb.client.EJBClientContext@1c4d350

              7983 10/08/15 11:22:38 INFO  org.jboss.ejb.client.remoting  - EJBCLIENT000016: Channel Channel ID 952600ae (outbound) of Remoting connection 013b02da to localhost/127.0.0.1:8181 can no longer process messages

               

               

              Here given bellow the server side error message :

              11:28:37,227 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (EJB default - 1) HHH000228: Running hbm2ddl schema update

              11:28:37,227 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (EJB default - 1) HHH000102: Fetching database metadata

              11:28:37,727 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (EJB default - 1) HHH000319: Could not get database metadata: java.sql.SQLException: You cannot set autocommit during a managed transaction!

                  at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWrapperManagedConnection.java:968)

                  at org.jboss.jca.adapters.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:716)

                  at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:60) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

                  at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:194) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

                  at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

                  at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:522) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

                  at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]

                  at com.orava.brp.textile.sessionfactory.HibernateSessionFactory.setProperties(HibernateSessionFactory.java:258) [BRPTextileEJBSE.jar:]

                  at com.orava.brp.textile.sessionfactory.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:41) [BRPTextileEJBSE.jar:]

                  at com.orava.brp.textile.daoimple.InventoryDAOImplement.getFinYearList(InventoryDAOImplement.java:13891) [BRPTextileEJBSE.jar:]

                  at com.orava.brp.textile.session.BRPTexoSE.getFinYearList(BRPTexoSE.java:2125) [BRPTextileEJBSE.jar:]

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_67]

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_67]

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_67]

                  at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_67]

                  at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

                  at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)

                  at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82) [wildfly-weld-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93) [wildfly-weld-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

                  at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)

                  at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]

                  at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) [wildfly-weld-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                  at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.component.interceptors.NonPooledEJBComponentInstanceAssociatingInterceptor.processInvocation(NonPooledEJBComponentInstanceAssociatingInterceptor.java:59) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:340) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)

                  at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:448)

                  at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)

                  at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)

                  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

                  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                  at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)

                  at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:330) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_67]

                  at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_67]

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]

                  at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]

                  at org.jboss.threads.JBossThread.run(JBossThread.java:122)

               

              This is due to hibernate hibernate.hbm2ddl.auto property set to update I think.

              • 4. Re: javax.naming.NameNotFoundException: ejb:
                sahu_sk9

                Here is the hibernate session config :

                 

                    prop.setProperty("hibernate.connection.driver_class", "oracle.jdbc.xa.client.OracleXADataSource");
                   prop.setProperty("hibernate.connection.url", "jdbc:oracle:thin:@"+ipAddr+":1521:XE");
                   prop.setProperty("hibernate.connection.username", DBMeta.USER_NAME);
                   prop.setProperty("hibernate.connection.password", DBMeta.PASSWORD);
                   prop.setProperty("hibernate.c3p0.min_size", "5");
                   prop.setProperty("hibernate.c3p0.max_size", "20");
                   prop.setProperty("hibernate.c3p0.timeout", "1800");
                   prop.setProperty("hibernate.c3p0.max_statements", "50");
                   prop.setProperty("hibernate.c3p0.idle_test_period", "3000");
                   prop.setProperty("hibernate.dialect", "org.hibernate.dialect.Oracle10gDialect");
                   prop.setProperty("hibernate.current_session_context_class", "thread");
                   prop.setProperty("hibernate.cache.provider_class", "org.hibernate.cache.NoCacheProvider");
                   prop.setProperty("hibernate.show_sql", "true");
                   prop.setProperty("hibernate.hbm2ddl.auto", "update");
                   prop.setProperty("hibernate.default_entity_mode", "dynamic-map");
                   prop.setProperty("hibernate.temp.use_jdbc_metadata_defaults", "false");

                 

                  
                   //  remove these three if not using app server
                   prop.setProperty("hibernate.connection.datasource", "java:jboss/datasources/OracleDS");
                   prop.setProperty("hibernate.transaction.factory_class", "org.hibernate.transaction.JTATransactionFactory");
                   prop.setProperty("hibernate.transaction.manager_lookup_class", "org.hibernate.transaction.JBossTransactionManagerLookup");

                 

                  
                   //
                   configuration.addAnnotatedClass(FinancialYearDTO.class)
                   .addAnnotatedClass(ReportFormatDTO.class)

                  

                 

                .setProperties(prop);

                 

                   srBuilder = new StandardServiceRegistryBuilder().applySettings(configuration.getProperties());
                   serviceRegistry = srBuilder.build();
                  
                   sessionFactory = configuration.buildSessionFactory(serviceRegistry); //buildSessionFactory();  //