javax.naming.NameNotFoundException: ejb:
sahu_sk9 Aug 6, 2015 2:23 AMHi,
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