jboss 7作为部署错误ClassNotFoundException,LinkageError

时间:2012-07-24 09:32:10

标签: deployment jboss

从jboss 4.2.3迁移。您好我尝试在jboss上部署war文件为7.我知道部署工作时我部署其他war文件没有错误,但这场战争要复杂得多,并且会出现一些错误。在服务器的eclipse中,下面是错误

11:11:12,564 INFO  [org.jboss.as.server.deployment] (pool-1-thread-11) Content added at location D:\liferay-portal-6.1.0-ce-ga1\jboss-7.0.2\standalone\data\content\3a\6447fca9f6c08a7f92ef5e09bca1f993a21a77\content
11:11:12,566 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "dts.war"
11:11:14,401 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) Class Path entry iText-toolbox.jar in "/D:/liferay-portal-6.1.0-ce-ga1/jboss-7.0.2/bin/content/dts.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.
11:11:14,401 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) Class Path entry iText-toolbox-2.1.2.jar in "/D:/liferay-portal-6.1.0-ce-ga1/jboss-7.0.2/bin/content/dts.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.
11:11:14,401 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) Class Path entry bcmail-jdk14-138.jar in "/D:/liferay-portal-6.1.0-ce-ga1/jboss-7.0.2/bin/content/dts.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.
11:11:14,402 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) Class Path entry bcprov-jdk14-138.jar in "/D:/liferay-portal-6.1.0-ce-ga1/jboss-7.0.2/bin/content/dts.war/WEB-INF/lib/itext-2.1.2.jar"  does not point to a valid jar for a Class-Path reference.
11:11:14,505 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) added javax.persistence.api dependency to dts.war
11:11:14,554 WARN  [org.jboss.modules] (MSC service thread 1-8) Failed to define class org.richfaces.skin.SkinBean in Module "deployment.dts.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/richfaces/skin/SkinBean (Module "deployment.dts.war:main" from Service Module Loader)
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [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.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 org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:104)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [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.NoClassDefFoundError: org/richfaces/skin/Skin
    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_15]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [:1.6.0_15]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) [:1.6.0_15]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]
    ... 14 more
Caused by: java.lang.ClassNotFoundException: org.richfaces.skin.Skin from [Module "deployment.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.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

11:11:14,556 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."dts.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."dts.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "dts.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
    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.LinkageError: Failed to link org/richfaces/skin/SkinBean (Module "deployment.dts.war:main" from Service Module Loader)
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
    at org.jboss.modules.Module.loadModuleClass(Module.java:590)
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
    at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:104)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
    ... 5 more
Caused by: java.lang.NoClassDefFoundError: org/richfaces/skin/Skin
    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_15]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [:1.6.0_15]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) [:1.6.0_15]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
    ... 14 more
Caused by: java.lang.ClassNotFoundException: org.richfaces.skin.Skin from [Module "deployment.dts.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [:1.6.0_15]
    ... 18 more

11:11:14,558 INFO  [org.jboss.as.server.controller] (pool-1-thread-11) Deployment of "dts.war" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"dts.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"dts.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"dts.war\""}}
11:11:14,559 INFO  [org.jboss.as.controller] (pool-1-thread-11) Service status report
  Services which failed to start:
      service jboss.deployment.unit."dts.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."dts.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "dts.war"

11:11:16,271 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Stopped deployment dts.war in 1711ms

你怎么看,我有两个问题我尝试通过修改MANIFEST.MF和jboss-deployment-structure.xml来修复ClassNotFoundException,我把代码放在下面

jboss-deployment-structure.xml
<jboss-deployment-structure>
  <deployment>
    <exclusions>  
    </exclusions>
    <dependencies>
    </dependencies>
    <resources>
      <resource-root path="D:\Workspace Liferay\DTS_TRUNK\code\dts\dts-web\target\dts\WEB-INF\lib\richfaces-impl-3.3.3.Final" />
    </resources>
  </deployment>
</jboss-deployment-structure>

MANIFEST.MF
Manifest-Version: 1.0
Class-Path: D:\dts-web\WEB-INF\lib\richfaces-impl-3.3.3.Final.jar 

但这不起作用。我究竟做错了什么 ?我也不知道如何解决其他问题LinkageError。可是任何人都可以帮助我吗?提前致谢

0 个答案:

没有答案