Jboss-deployment-structure.xml无法从其他deployment.myear.ear.etc中查看类

时间:2012-07-26 12:31:25

标签: jboss

我尝试从jboss 4.2.3迁移到jboss 7.0.2。当我尝试在下面部署我的耳朵文件时:

META-INF/
META-INF/MANIFEST.MF
commons-beanutils-1.8.0.jar
commons-collections-3.2.jar
commons-digester-1.8.1.jar
commons-logging-1.0.4.jar
dts.jar
dts.sar
dts.war
itext-2.1.2.jar
itext-rtf-2.1.2.jar
jboss-el-1.0_02.CR3.jar
jboss-seam-2.2.0.GA.jar
jboss-seam-excel-2.2.0.GA.jar
jboss-seam-jul-2.2.0.GA.jar
jboss-seam-mail-2.2.0.GA.jar
jboss-seam-pdf-2.2.0.GA.jar
jboss-seam-ui-2.2.0.GA.jar
jcommon-1.0.16.jar
jfreechart-1.0.13.jar
jsf-facelets-1.1.15.B1.jar
jta-1.1.jar
jxl-2.6.8-seam.jar
loginHook-hook.war
META-INF/application.xml
META-INF/jboss-deployment-structure.xml
portal-client-6.1.0.jar
quartz-1.8.4.jar
richfaces-api-3.3.3.Final.jar
richfaces-impl-3.3.3.Final.jar
richfaces-ui-3.3.3.Final.jar
slf4j-api-1.6.0.jar
util-bridges-6.1.0.jar
util-java-6.1.0.jar
util-taglib-6.1.0.jar
xpp3_min-1.1.3.4.O.jar
xstream-1.1.3.jar
META-INF/maven/
META-INF/maven/com.recglobal.dts/
META-INF/maven/com.recglobal.dts/dts-ear/
META-INF/maven/com.recglobal.dts/dts-ear/pom.xml
META-INF/maven/com.recglobal.dts/dts-ear/pom.properties

我收到此错误:

13:17:57,562 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.subunit."dts.ear"."dts.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."dts.ear"."dts.war".INSTALL: Failed to process phase INSTALL of subdeployment "dts.war" of deployment "dts.ear"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_15]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_15]
    at java.lang.Thread.run(Thread.java:619) [:1.6.0_15]
Caused by: java.lang.RuntimeException: Error getting reflective information for class com.recglobal.dts.chart.SalesGoalChartServlet
    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ee.component.EEModuleClassDescription$DefaultConfigurator.configure(EEModuleClassDescription.java:176)
    at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:147)
    at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:122)
    at org.jboss.as.ee.component.LazyValue.get(LazyValue.java:40)
    at org.jboss.as.ee.component.EEApplicationDescription.getClassConfiguration(EEApplicationDescription.java:183)
    at org.jboss.as.ee.component.ComponentDescription.createConfiguration(ComponentDescription.java:153)
    at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:70)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    ... 5 more
Caused by: java.lang.NoClassDefFoundError: com/recglobal/dts/chart/ChartGenerateVariables
    at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_15]
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) [:1.6.0_15]
    at java.lang.Class.getDeclaredMethods(Class.java:1791) [:1.6.0_15]
    at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
    ... 13 more
Caused by: java.lang.ClassNotFoundException: com.recglobal.dts.chart.ChartGenerateVariables from [Module "deployment.dts.ear.dts.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [:1.6.0_15]
    ... 18 more

错误就是这样,当部署dts.war时,dts.war需要一个来自dts.jar的方法(下面):

META-INF/
META-INF/MANIFEST.MF
com/
com/recglobal/
com/recglobal/dts/
com/recglobal/dts/chart/AnnualChart.class
com/recglobal/dts/chart/ChartGenerateVariables.class
com/recglobal/dts/chart/ChartGenerator$1.class
com/recglobal/dts/chart/ChartGenerator.class
com/recglobal/dts/chart/ChartType.class
com/recglobal/dts/chart/QuarterlyChart.class
com/recglobal/dts/chart/RangeUtil.class
com/recglobal/dts/chart/Timescale.class
com/recglobal/dts/chart/XYBarAlarmRenderer.class
components.properties
dts-app-features.xml
features.xsd
META-INF/persistence.xml
seam.properties
META-INF/maven/
META-INF/maven/com.recglobal.dts/
META-INF/maven/com.recglobal.dts/dts-logic/
META-INF/maven/com.recglobal.dts/dts-logic/pom.xml
META-INF/maven/com.recglobal.dts/dts-logic/pom.properties

所以为了解决这个问题,我在我的dts.ear中编辑了Jboss-deployment-structure.xml:

<jboss-deployment-structure>
  <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
  <deployment>
    <exclusions>
    </exclusions>
    <dependencies>   
   <module name="deployment.dts.ear.dts.jar" />
   <module name="deployment.dts.ear.dts.war" />
    </dependencies>
    <resources>
    </resources>
    </deployment>
   <sub-deployment name="dts.war">
        <dependencies>           
            <module name="deployment.dts.ear.d2ts.jar" />
        </dependencies>
        <resources>
            <resource-root path="deployment.dts.ear.dts.jar.com.recglobal.dts.chart.ChartGenerateVariables"/>
        </resources>
    </sub-deployment>
</jboss-deployment-structure>

我在论坛和谷歌上尝试了很多组合,但一切都以同样的错误结束。也尝试编辑MANIFEST.MF但没有任何作用。一般我不知道当ClassLoader找不到类或JAR文件时该怎么办。类加载器甚至无法在WEB-INF / lib中找到dts.war中的jar(生病!)我必须将它们移动到EAR并在dts.war.pom.xml中标记为提供但是现在我已经尝试部署dts.jar来自EAR甚至假dts.war仍然无法看到我的逻辑jar(dts.jar)。我真的需要帮助,因为这个想法已经用完了。我不能问我需要什么。所以请帮帮我吧:)。