wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes How to make an ear file as a global module in Jboss eap 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to make an ear file as a global module in Jboss eap 6.0" Watch "How to make an ear file as a global module in Jboss eap 6.0" New topic
Author

How to make an ear file as a global module in Jboss eap 6.0

sanjeev kumar mandal
Greenhorn

Joined: Nov 26, 2007
Posts: 19
Hi All,

I want to make an ear file as a global module in the jboss eap 6.0 , so that the ear file can be access by all other war or ear files .

I have searched in the net and i found few docs on how to make a jar file global but no document on making the ear file global.


My ear file contains:


1)App-inf : which contains a lib folder ,where multiple jar files are placed

2)Meta-inf : which contain menifest file and application.xml file

3)Jar file : containing two packages com and financial package and one jar file






I have created one module.xml along with ear in jboss/module folder. My module.xml is below:


#################################
<?xml version="1.0" encoding="UTF-8"?>

<module xmlns="urn:jboss:module:1.0" name="30_financial">

<resources>

<resource-root path="30_FinancialClaims.ear"/>

</resources>

<dependencies>
<module name="org.aspectj"/>
<module name="org.apache"/>
<module name="com.tiscon"/>
<module name="org.exolab"/>
<module name="com.hp.ce"/>
<module name="org.apache.commons"/>
<module name="com.hp.ews"/>

<module name="com.ibm"/>
<module name="com.jacob"/>
<module name="javax.xml"/>
<module name="org.jdom"/>
<module name="org.apache.log4j"/>
<module name="oracle.jdbc"/>
<module name="org.apache.poi"/>

<module name="javax.xml.soap"/>
<module name="com.hp.eclaims.snt"/>
<module name="com.tiscon.util.timemeasurement"/>
<module name="com.tiscon.util.db"/>
<module name="com.tiscon.util.ejb"/>
<module name="org.apache.tomcat.dbcp"/>
<module name="com.ibm.wsdl"/>

</dependencies>

</module>

#####################

In standalone.xml - I have included below entry in the standalone.xml .

##################
<subsystem xmlns="urn:jboss:domain:ee:1.1">

<global-modules>
<module name="30_financial" slot="main"/>
</global-modules>

<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
<jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
</subsystem>

###########################

The error i am getting in jboss console is:



18:27:53,123 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."FinancialClaimsPaa.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."FinancialClaimsPaa.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "FinancialClaimsPaa.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018102: Error loading SCI from module: 30_financial:main
at org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:113)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
... 5 more
Caused by: org.jboss.modules.ModuleNotFoundException: Module org.aspectj:main is not found in local module loader @7f56b6b9 (roots: C:\HP-jboss-eap-6.0\modules)
at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275)
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222)
at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94)
at org.jboss.modules.Module.addPaths(Module.java:851)
at org.jboss.modules.Module.link(Module.java:1206)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1235)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:208)
at org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:106)
... 6 more

18:27:53,170 INFO [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS015870: Deploy of deployment "FinancialClaimsPaa.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"FinancialClaimsPaa.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"FinancialClaimsPaa.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"FinancialClaimsPaa.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018102: Error loading SCI from module: 30_financial:main
Caused by: org.jboss.modules.ModuleNotFoundException: Module org.aspectj:main is not found in local module loader @7f56b6b9 (roots: C:\\HP-jboss-eap-6.0\\modules)"}}
18:27:56,602 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment FinancialClaimsPaa.war in 3427ms




from the above error, i am thinking that the jboss is not able to find out dependency jars like aspectj.jar etc , but the ear file is already having those jars.If the jars are not visible then do we have any other approach to make these above jars visible to jboss.

Can any body suggest me if the above approach is correct or not.

Regards

Sanjeev Kumar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make an ear file as a global module in Jboss eap 6.0
 
Similar Threads
JBoss 4.1 to 6.1 migration Issue, -ds.xml PARSE issue
JBoss 7.1.1.Final: how to exclude Hibernate 4 and use the version packaged in the application ?
datasource already registered error in deploying JPA war file to JBoss
Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'org.apache.openj
JBoss 4.1 to 6.1 migration Issue, war file is not deploying