My ear file contains conf directory which has the properties file, jar (contans ejb's) and the war file (contains servlets and applicationlistener). I have deployed the ear file and now i am running into two problems here:
1. conf folder is not getting deployed i.e., When my code looks for the properties file under <JBOSS_HOME>\bin\content\<earNameFolder>\conf\<propertiesFile> and it is not present and fails as below error:
15:34:54,058 ERROR [stderr] (ServerService Thread Pool -- 82) log4j:ERROR Could not read configuration file [D:\Official\JBoss\jboss-eap-6.1.0\bin\content\xxxHubServer.ear/conf/xxxHubServerLog.properties].
I am not sure why this folder including properties file is not getting uploaded to the server.
2. 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:
15:34:54,168 ERROR [JDA_HUB_SERVER] (ServerService Thread Pool -- 82) checkForUrlContext: java:app/xxxHubEJB/xxxHubLogQueueBean
15:34:54,171 ERROR [JDA_HUB_SERVER] (ServerService Thread Pool -- 82) The following validation errors were found: checkForUrlContext: java:app/xxxHubEJB/TimerServiceBean
15:34:54,172 ERROR [stderr] (ServerService Thread Pool -- 82) NMSV0307E: A java: URL name was used, but Naming was not configured to handle java: URL names. The likely cause is a user in error attempting to specify a java: URL name in a non-J2EE client or server environment. Throwing ConfigurationException.
The server.log shows below binding which is same what i am using in my code:
15:34:53,089 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-7) JNDI bindings for session bean named TimerServiceBean in deployment unit subdeployment "xxxHubEJB.jar" of deployment "xxxHubServer.ear" are as follows:
java:global/xxxHubServer/xxxHubEJB/TimerServiceBean!com.xxx.xxxhubserver.commons.workflow.ITimerServiceLocal
java:app/xxxHubEJB/TimerServiceBean!com.xxx.xxxhubserver.commons.workflow.ITimerServiceLocal
java:module/TimerServiceBean!com.xxx.xxxhubserver.commons.workflow.ITimerServiceLocal
java:global/xxxHubServer/xxxHubEJB/TimerServiceBean
java:app/xxxHubEJB/TimerServiceBean
java:module/TimerServiceBean
Code:
InitialContext context = new InitialContext();
ITimerServiceLocal timerSerivceBean = (ITimerServiceLocal) context.lookup("java:app/xxxHubEJB/" + TimerServiceBean.class.getSimpleName());
Thanks in advance.
1. conf folder is not getting deployed i.e., When my code looks for the properties file under <JBOSS_HOME>\bin\content\<earNameFolder>\conf\<propertiesFile> and it is not present and fails as below error:
15:34:54,058 ERROR [stderr] (ServerService Thread Pool -- 82) log4j:ERROR Could not read configuration file [D:\Official\JBoss\jboss-eap-6.1.0\bin\content\xxxHubServer.ear/conf/xxxHubServerLog.properties].
I am not sure why this folder including properties file is not getting uploaded to the server.
2. 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:
15:34:54,168 ERROR [JDA_HUB_SERVER] (ServerService Thread Pool -- 82) checkForUrlContext: java:app/xxxHubEJB/xxxHubLogQueueBean
15:34:54,171 ERROR [JDA_HUB_SERVER] (ServerService Thread Pool -- 82) The following validation errors were found: checkForUrlContext: java:app/xxxHubEJB/TimerServiceBean
15:34:54,172 ERROR [stderr] (ServerService Thread Pool -- 82) NMSV0307E: A java: URL name was used, but Naming was not configured to handle java: URL names. The likely cause is a user in error attempting to specify a java: URL name in a non-J2EE client or server environment. Throwing ConfigurationException.
The server.log shows below binding which is same what i am using in my code:
15:34:53,089 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-7) JNDI bindings for session bean named TimerServiceBean in deployment unit subdeployment "xxxHubEJB.jar" of deployment "xxxHubServer.ear" are as follows:
java:global/xxxHubServer/xxxHubEJB/TimerServiceBean!com.xxx.xxxhubserver.commons.workflow.ITimerServiceLocal
java:app/xxxHubEJB/TimerServiceBean!com.xxx.xxxhubserver.commons.workflow.ITimerServiceLocal
java:module/TimerServiceBean!com.xxx.xxxhubserver.commons.workflow.ITimerServiceLocal
java:global/xxxHubServer/xxxHubEJB/TimerServiceBean
java:app/xxxHubEJB/TimerServiceBean
java:module/TimerServiceBean
Code:
InitialContext context = new InitialContext();
ITimerServiceLocal timerSerivceBean = (ITimerServiceLocal) context.lookup("java:app/xxxHubEJB/" + TimerServiceBean.class.getSimpleName());
Thanks in advance.