Application not getting deployed
sachin.dhingra Dec 14, 2013 10:15 PMI have JBOSS EAP 6.1.0 and i have deployed my ear file which has structure like:
Ear file:
|_ conf folder contains logger property file
|_ lib folder contains external jar files
|_ META-INF folder contains application.xml file and manifest.MF file with no classpath entry
|_ resources folder contains messages file
|_ xsl folder
|_jar file (This is the one i was referring)
|_ war file
I have some EJB's in my jar file which i am looking using JNDI lookup in some POJO class inside the jar file only, for that I am facing below error:
14:46:20,079 ERROR [xxx] (ServerService Thread Pool -- 79) The following validation errors were found: checkForUrlContext: java:app/xxxEJB/TimerServiceBean
14:46:20,080 DEBUG [xxx] (ServerService Thread Pool -- 79) The following validation errors were found: checkForUrlContext: java:app/xxxEJB/TimerServiceBean: javax.naming.NamingException: checkForUrlContext: java:app/xxxEJB/TimerServiceBean [Root exception is javax.naming.ConfigurationException: Name space accessor for the java: name space has not been set. Possible cause is that the user is specifying a java: URL name in a JNDI Context method call but is not running in a J2EE client or server environment.]
at com.ibm.ws.naming.jndicos.CNContextImpl.checkForUrlContext(CNContextImpl.java:464) [com.ibm.ws.ejb.thinclient_7.0.0.jar:]
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:160) [com.ibm.ws.ejb.thinclient_7.0.0.jar:]
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179) [com.ibm.ws.ejb.thinclient_7.0.0.jar:]
at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_26]
at com.xxx.yyy.commons.HUBConfigValidator.stopAllTimers(HUBConfigValidator.java:261) [xxxEJB.jar:]
at com.xxx.yyy.listener.xxxServerApplicationListener.contextInitialized(xxxServerApplicationListener.java:120) [classes:]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_26]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_26]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: javax.naming.ConfigurationException: Name space accessor for the java: name space has not been set. Possible cause is that the user is specifying a java: URL name in a JNDI Context method call but is not running in a J2EE client or server environment.
at com.ibm.ws.naming.java.javaURLContextFactory.isNameSpaceAccessable(javaURLContextFactory.java:98) [com.ibm.ws.ejb.thinclient_7.0.0.jar:]
at com.ibm.ws.naming.urlbase.UrlContextFactory.getObjectInstance(UrlContextFactory.java:82) [com.ibm.ws.ejb.thinclient_7.0.0.jar:]
at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:584) [rt.jar:1.6.0_26]
at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:533) [rt.jar:1.6.0_26]
at com.ibm.ws.naming.jndicos.CNContextImpl.checkForUrlContext(CNContextImpl.java:459) [com.ibm.ws.ejb.thinclient_7.0.0.jar:]
... 17 more
The server.log shows below binding which is same what i am using in my code:
10:46:43,349 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-8) JNDI bindings for session bean named TimerServiceBean in deployment unit subdeployment "xxxEJB.jar" of deployment "xxxServer.ear" are as follows:
java:global/xxxServer/xxxEJB/TimerServiceBean!com.xxx.yyy.commons.workflow.ITimerServiceLocal
java:app/xxxEJB/TimerServiceBean!com.xxx.yyy.commons.workflow.ITimerServiceLocal
java:module/TimerServiceBean!com.xxx.yyy.commons.workflow.ITimerServiceLocal
java:global/xxxServer/xxxEJB/TimerServiceBean
java:app/xxxEJB/TimerServiceBean
java:module/TimerServiceBean
My java code is:
InitialContext context = new InitialContext(); ITimerServiceLocal timerSerivceBean = (ITimerServiceLocal) context.lookup("java:app/xxxEJB/" + TimerServiceBean.class.getSimpleName());
So when I looked closer for below lines I found why java InitialContext.lookup method is invoking the methods from com.ibm.ws.ejb.thinclient_7.0.0.jar so i removed the websphere specific jar file with java standard jar file (javax.ejb.jar, javax.jms.jar which only has the interfaces not the implementation of EJB methods or context lookup methods) to avoid compilation issues.
14:46:20,080 DEBUG [xxx] (ServerService Thread Pool -- 79) The following validation errors were found: checkForUrlContext: java:app/xxxEJB/TimerServiceBean: javax.naming.NamingException: checkForUrlContext: java:app/xxxEJB/TimerServiceBean [Root exception is javax.naming.ConfigurationException: Name space accessor for the java: name space has not been set. Possible cause is that the user is specifying a java: URL name in a JNDI Context method call but is not running in a J2EE client or server environment.]
at com.ibm.ws.naming.jndicos.CNContextImpl.checkForUrlContext(CNContextImpl.java:464) [com.ibm.ws.ejb.thinclient_7.0.0.jar:]
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:160) [com.ibm.ws.ejb.thinclient_7.0.0.jar:]
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179) [com.ibm.ws.ejb.thinclient_7.0.0.jar:]
By doing that I found it is not even deploying the my ear file for quite a long time and finally failed due to timeout and it is not logging anything to the log file (server.log and application.log) which it used to write when it is logging when used websphere specific jar file.
Below is message that i found in .failed file under deployments folder:
"JBAS015052:@@@ Did not receive a response to the deployment operation within the allowed timeout period [1200 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment."
But server log file doesn't have any error or info whether it is deploying the ear file. Attached is server log file.
I don't know what is happening here.
Please help.
-
server.log.zip 42.3 KB