-
1. Re: WAR outside the EAR, not able to reference JAR inside EAR. In wildfly 8
jaysensharma Dec 16, 2014 12:19 AM (in response to matrit)Is your application trying to lookup some resources which are deployed on JBoss 4/5 ? Because your log snippet shows [InitialContextFactory not defined - using default: org.jnp.interfaces.NamingContextFactory] In WildFly 8 that naming context factory is not used. That is used for JBoss 4/5. So looks like you might have copied some JARs from your JBoss 5.1 inside your application. Can you verify that?
Also the error which you are getting [NameNotFoundException: bpc/AccountManagementService] is related to JNDI naming. And it indicates that your application is trying to lookup something which is not yet bound in the JNDI tree. So can you check your log that before this error appears in your log, Do you already have that JNDI name bounded in the JNDI.
Can you attach the log ?
Regarding your query on:
WAR outside the EAR, not able to reference JAR inside EAR?
>> By default WARs outside an EAR can not reference the JARs present inside the EAR, Until you configure a dependency using "$WAR/META-INF/MANIFEST.MF" or "$WAR/WEB-INF/jboss-deployment-structure.xml" as described in [1]
Example: By placing similar "$WAR/WEB-INF/jboss-deployment-structure.xml" it can be achieved.
<jboss-deployment-structure> <deployment> <dependencies> <module name="deployment.YOUR_EAR.ear.YOUR_EJB_JAR.jar"/> </dependencies> </deployment> </jboss-deployment-structure>
By placing above kind of "jboss-deployment-structure.xml" isnide the WAR we are instructing wildfly to make the JAR "YOUR_EJB_JAR.jar" present inside the EAR "YOUR_EAR.ear" accessible to the WAR.
[1] https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly
Also as you are migrating from JBoss 5 to WildFly so a quick look to [2] will be best to know about the JNDI naming/lookup changes.
-
2. Re: WAR outside the EAR, not able to reference JAR inside EAR. In wildfly 8
matrit Dec 16, 2014 10:07 AM (in response to jaysensharma)Hi Jay, Thank you for the answer, it worked for me.