Packaging ESB & JSF Modules

Answered

Hi all,

I'm working my way through some JEE8 training. Unfortunately the course is run in Eclipse and i'm struggling to get past a certain point.

I'm trying to package separate EJB and JSF modules into a single Java EE application. I've followed the IntelliJ guide for creating an EAR as far as I can see, and the EAR file includes the JSF WAR and EJB JAR files. 

Can someone help please? I'm sure to seasoned pros this is a 30 second job, but I can't get past it.

I've included the console output and server log

Console Output

[2020-05-24 07:02:25,736] Artifact 02_JSF:ear: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NullPointerException. Please see server.log for more details.

Server Log Details below..

[2020-05-24T19:02:25.651+0100] [glassfish 5.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=48 _ThreadName=admin-listener(3)] [timeMillis: 1590343345651] [levelValue: 1000] [[
Exception while loading the app]]

[2020-05-24T19:02:25.658+0100] [glassfish 5.1] [SEVERE] [AS-WEB-GLUE-00192] [javax.enterprise.web] [tid: _ThreadID=48 _ThreadName=admin-listener(3)] [timeMillis: 1590343345658] [levelValue: 1000] [[
Undeployment failed for context /02_JSFWeb]]

[2020-05-24T19:02:25.703+0100] [glassfish 5.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=48 _ThreadName=admin-listener(3)] [timeMillis: 1590343345703] [levelValue: 1000] [[
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NullPointerException]]

0
3 comments

Seems you asked that on StackOverflow

And the error here is more clear: 

Deployment descriptor file META-INF/application.xml in archive [03_EJB_ear_exploded.ear].  
cvc
-complex-type.2.4.b: The content of element 'application' is not complete.

So, please inspect the META-INF/application.xml file.  

0

Thanks Konstantin,

I repackaged the EAR to include the ejb.jar and jsf.war files, as per the JetBrains tutorial for creating EAR file. Contents of my META-INF/application.xml file shown below. 

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_8.xsd"
version="8">
<module id="ejb-EJB">
<ejb>ejb.jar</ejb>
</module>
<module id="jsf-Web">
<web>
<web-uri>jsf.war</web-uri>
<context-root>jsfWeb</context-root>
</web>
</module>
</application>

 

0

According to the error, this part is incorrect;

    <module id="ejb-EJB">
<ejb>ejb.jar</ejb>
</module>

Maybe the path to the file? If you see no errors, please share a sample project where the issue could be reproduced. You can do it via GitHub, or privately:


https://intellij-support.jetbrains.com/hc/en-us/articles/206869619-Uploading-Large-Files-for-JetBrains-Support-Team

0

Please sign in to leave a comment.