T
T
trancer222018-12-21 11:36:32
Java
trancer22, 2018-12-21 11:36:32

How to customize jboss-deployment-structure.xml?

Project structure
my_ear
|
|__META_INF
| |_jboss-deployment-structure
|
|_ my_war
|_ jar1
|_ jar2
This is how I filled out jboss-deployment-structure.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<ear-subdeployments-isolated>true</ear-subdeployments-isolated>

<deployment>
    <dependencies>
    </dependencies>
</deployment>

<sub-deployment name="my_war.war">
    <dependencies>
        <module name="jar1.jar" slot="main" export="true" />
        <module name="jar2.jar" slot="main" export="true" />
    </dependencies> 
</sub-deployment>

</jboss-deployment-structure>

But I get an error when deploying.
13:25:15,654 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.subunit."my_ear.ear"."jar1.jar".POST_MODULE : org.jboss.msc.service.StartException in service jboss.deployment.subunit."my_ear.ear"."jar1.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "jar1.jar" of deployment "my_ear.ear "
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc. service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
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: java.lang.RuntimeException: Error getting reflective information for class ru.project.reports.ReportManager with ClassLoader ModuleClassLoader for Module "deployment. my_ear.ear.jar1.jar:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as .server.deployment.reflect.ClassReflectionIndexUtil.findMethod(ClassReflectionIndexUtil.java:52) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ejb3.deployment.processors .dd.DeploymentDescriptorMethodProcessor.handleStatelessSessionBean(DeploymentDescriptorMethodProcessor.java:99)
at org.jboss.as.ejb3.deployment.processors.dd.DeploymentDescriptorMethodProcessor.deploy(DeploymentDescriptorMethodProcessor.java:76)
at org.jboss.Uniloyhaas.DeploymentServer.deployment .start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: ru.project.BaseException
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.6.0_45]
at java.lang.Class.privateGetDeclaredFields(Class.java:2300) [rt.jar:1.6.0_45]
at java.lang.Class.getDeclaredFields(Class.java:1745) [rt.jar:1.6.0_45]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.(ClassReflectionIndex .java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [ jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 9 more
Caused by: java.lang.ClassNotFoundException: ru.project.BaseException from [Module "deployment.my_ear.ear.jar2.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java: 190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked( ConcurrentClassLoader.java:468
)
:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 14 more

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question