I recently migrated from JBoss EAR 6.4.0 to 7.0.0. In my deployments folder, I have a EAR containing numerous JAR files of my project. When I unpack the file after building, all files are there as desired.
But as soon as I start the server and the EAR file gets unpacked by JBoss, a couple of my project JARs vanish. The files are simply not there, so my server starts incompletely and my EJB client cannot connect ("No EJB receiver for handling...").
Is there any 'smart' mechanism in JBoss that may cause this behaviour?
My colleagues are working on the same project (but different IDE) with no problems.
You must specify each jar as a module in the application.xml file in the ear context.
<display-name>Your-ear-file-display-name</display-name>
<module>
<java>YourEJBJar.jar</java>
</module>
...
Related
Is there any structure.xml file in jetty where I need to mention that some pre-defined jars to be taken from the lib folder while deploying the war file.
Can I deploy an application without WAR/EAR in JBoss 6.4.0 eap ?
I need to migrate an application from Weblogic to JBoss. Is it possible to do so without creating the WAR ?
Deploy your app as an exploded set of files within directories, rather than packaged up within war and ear files. For example, assume you have xxx.ear which contains aaa.war. Under the deploy directory, create a directory named xxx.ear. In that directory create two more directories aaa.war. Into those directories place the contents of the two war files. Also, in the xxx.ear directory place the rest of the contents that would have been in the ear file, such as the META-INF/application.xml file.
Now, for example, you can easily add deploy/xxx.ear/aaa.war/some-new-file.html or edit deploy/xxx.ear/aaa.war/some-file.jsp.
I have an EAR file with 3 WARs and some common dependencies within lib/ folder. One of those dependencies has an EJB with a scheduled method, but it seems that the server is not recognizing it. No evidence in log, no code executed.
But when I deploy a simple war with the same jar within WEB-INF/lib, it works. I've already tried to package the jar as an ejb-jar with the maven plugin, but no success at all.
Any ideas on what must be going on?
Jars in the lib directory of an EAR are not considered to be EJB jars and their content is not considered at deployment time in that respect. The lib directory only exists to make it easier to provide library jars whose classes are automatically made visible to all the modules in an EAR file.
Your EAR file contains a META-INF/application.xml file that lists out the various modules that it contains. Prior to Java EE 6, only ejb-modules were considered for potential EJBs. Java EE 6 and newer added web-modules to that list. All jars within a web-module's WEB-INF/lib directory are considered to be part of the web-module, even if they contain ejb-jars. Any ejb-jar.xml files found within a web-module are merged together. This applies even if the web-module is deployed as a standalone WAR file.
I have an enterprise application .ear which includes few war files.
My .ear file also includes the jersey-server.jar and log4j.jar
These jar files are also part of the shared library that is mapped to the ear.
I would want to remove these files from ear altogether as they are already part of shared library.
when i remove these jars from ear, the http resource that is part of the war files goes unrecognized, 404 error and logs are not redirected to log files.
Can't I remove these files from the ear, use just shared libraries, which helps in reducing the size of the ear ?
Application is deployed in Websphere 8.
Thanks,
Ravi.
I have developed a web-service client and tested it as ear on local jboss always. this ear work fine. Now I want to create war for this application. whenever I tries:
project:export:war file
in eclipse, it creates war without any third party dependency jars files added to it. This war does not gets deployed on jboss successfully.
Can anybody guide me hw to create war from ear.
you cannot create war from ear. ear is enterprise archive, and war is web archive. ear may contain many war files. So when you are creating war using eclipse, it creates a web archive. To add your third party jars, put them into the lib folder of your web application, that way it will be included into your war.