2上正常工作的JBoss

2上正常工作的JBoss

本文介绍了将应用程序部署到在JBoss 4.2上正常工作的JBoss 5上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将应用程序(.ear文件)部署到JBoss 5,并且我收到以下错误。该应用程序在4.2.2之下部署好。

Im trying to deploy an application (.ear file) to JBoss 5, and I'm receiving the following error. The app deploys fine under 4.2.2.

15:31:33,172 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/ASE/ext/jboss-5.0.0.GA/server/all/dep
loy/UGC-WS.ear state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/C:/ASE/ext/jboss-5.0.0.GA/server/all/deploy/UGC-WS.
ear/ugc-ws.war
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: org.jboss.metadata.ear.spec.JavaModuleMetaData
at org.jboss.wsf.container.jboss50.deployment.metadata.JSEArchiveMetaDataAdapter.buildMetaData(JSEArchiveMetaDataAdap
ter.java:76)
at org.jboss.wsf.container.jboss50.deployment.metadata.ContainerMetaDataAdapter.buildContainerMetaData(ContainerMetaD
ataAdapter.java:76)
at org.jboss.wsf.container.jboss50.deployment.metadata.ContainerMetaDataDeploymentAspect.create(ContainerMetaDataDepl
oymentAspect.java:51)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.create(DeploymentAspectManagerImpl.java:121)
at org.jboss.wsf.container.jboss50.BareWSFRuntime.create(BareWSFRuntime.java:61)
at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:84)
at org.jboss.wsf.container.jboss50.deployer.AbstractDeployerHookEJB.deploy(AbstractDeployerHookEJB.java:43)
at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java
:60)
at org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:112)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
... 19 more
15:31:33,203 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS F
OR DETAILS):

*** CONTEXTS IN ERROR: Name -> Error

vfszip:/C:/ASE/ext/jboss-5.0.0.GA/server/all/deploy/UGC-WS.ear -> java.lang.ClassCastException: org.jboss.metadata.ear.spec.J
avaModuleMetaData

这是从控制台的错误消息,我无法从中了解...

That's the error message from the console, and I can't figure out much from that...

应用程序只包含Web服务和启动时加载的servlet初始化和缓存一些数据。

The application just contains web services and a servlet that loads on startup to initialize and cache some data.

我们有一个EAR文件,其中包含一些我们使用的库的JAR文件(其中一个名为ugc-ws.jar) ,还有一个WAR文件,该文件具有加载servlet的web.xml - 此WAR文件在其lib目录中也具有相同的ugc-ws.jar,因为servlet位于该JAR内。所以基本上我们有主要的EAR文件,并且在它内部有多个jar文件,以及一个WAR文件,它里面也有一个JAR文件。这个错误看起来像是来自WAR。

We have an EAR file which contains a few JAR files (one of them being named ugc-ws.jar) for libraries that we use, and also a WAR file which has the web.xml to load a servlet - this WAR file also has the same ugc-ws.jar in it's lib directory because the servlet is inside that JAR. So basically we have the main EAR file, and within it multiple jar files, as well as a WAR file - which also has a JAR file inside it's lib directory. And the error looks like it's coming from the WAR.

这是jar -tf ugc-ws.war的输出:

This is the output from "jar -tf ugc-ws.war":

>jar -tf ugc-ws.war
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/web.xml
WEB-INF/lib/
WEB-INF/jboss-web.xml
WEB-INF/lib/ugc-ws.jar

只是为了测试,我从.EAR中删除了.WAR文件,而应用程序没有任何错误,但显然没有从WAR的数据,我不能使用该应用程序。我正在部署的方式是将.EAR文件放入server\all\deploy目录中。

Just for testing, I remvoed the .WAR file from the .EAR and the application deploys without any errors, but obviously w/out the data from the WAR, i can't use the application. The way I'm deploying is just dropping the .EAR file into the server\all\deploy directory.

我尝试将ugc-ws.jar分成两个独立的jar,一个只有webservices,另一个只是servlet,但是我仍然收到同样的错误。

I've tried splitting up the ugc-ws.jar into two separate jars, one with just the webservices and the other w/ just the servlet, but I still receive the same error.

只是奇怪的是,这在JBoss 4中工作正常,但不在JBoss 5上。

Just weird that this worked fine in JBoss 4 but not on JBoss 5.

谢谢

推荐答案

这不奇怪。

JBoss 4.2不符合Java5EE标准。
JBoss 5.0 IS兼容。

JBoss 4.2 was NOT Java5EE compliant.JBoss 5.0 IS compliant.

在我看来,你的战争中有一个有问题的设置。
该错误只出现在JBoss 5中,因为在此版本中执行了正确性。

It seems to me that you have a problematic setting somewhere in your war.The error appears only in JBoss 5 since correctness is enforced in this version.

只是一个快速的猜测。您的jboss-web.xml可能有错误的dtd。

Just a quick guess. Your jboss-web.xml might have the wrong dtd.Check this out.

我还建议您重新阅读JBoss文档,特别是版本说明
为5.0,并为4.2的用户提供了任何迁移提示。

I also advise you to re-read JBoss documentation and especially the release notesfor 5.0 and any migration tips they have for users of 4.2

这篇关于将应用程序部署到在JBoss 4.2上正常工作的JBoss 5上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 20:05