本文介绍了JAX-WS Web服务在jboss-5.0.1.GA中引发“由以下原因引起的异常:java.lang.illegalargumentException:未设置目标容器名称"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了JAX-WS服务,该服务 非常简单,但是在 部署在jboss-5中. 0 . 1 .GA,但相同的Web服务 在jboss-eap-6中的 正常工作. span class ="code-digit"> 2 . 继异常之后出现在 jboss-5中. 0 . 1 .GA:
2016-09-04 10:42:32,217错误[org.jboss.kernel.plugins.dependency.AbstractKernelController](主)安装到Real时出错:name = vfszip:/D:/jboss- 5.0.1.GA/服务器/newdms/deploy/simple-webservice.war/state = PreReal模式= Manual requiredState = Real org.jboss.deployers.spi.DeploymentException:部署期间出错:vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/ 在org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) 在org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177) 在org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439) 在org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157) 在org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098) 在org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) 在org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598) 在org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) 在org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062) 在org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) 在org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) 在org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) 在org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781) 在org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698) 在org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304) 在org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205) 在org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405) 在org.jboss.Main.boot(Main.java:209) 在org.jboss.Main $ 1.run(Main.java:547) 在java.lang.Thread.run(Thread.java:745) 原因:java.lang.IllegalArgumentException:未设置目标容器名称 在org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookEJB3.createDeployment(JAXWSDeployerHookEJB3.java:87) 在org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:71) 在org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:60) 在org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:112) 在org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50) 在org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171) ...另外18个 2016-09-04 10:42:32,275调试[org.jboss.classloader.spi.base.BaseClassLoaderDomain](主)ClassLoaderDomain @ 9d8062f {vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy /simple-webservice.war/} unregisterClassLoader BaseClassLoader @ 457dfcb5 {vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/} 2016-09-04 10:42:32,275调试[org.jboss.mx.loading.UnifiedLoaderRepository3](主)UnifiedLoaderRepository已移除(假)null 2016-09-04 10:42:32,275调试[org.jboss.classloader.spi.base.BaseClassLoaderPolicy](主)VFSClassLoaderPolicy @ 5259f2b7 {vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy /simple-webservice.war/}关闭! 2016-09-04 10:42:32,275调试[org.jboss.classloader.spi.base.BaseClassLoader](主)BaseClassLoader @ 457dfcb5 {vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy /simple-webservice.war/}关闭! 2016-09-04 10:42:32,276调试[org.jboss.classloader.spi.base.BaseClassLoaderDomain](主)ClassLoaderDomain @ 9d8062f {vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy /simple-webservice.war/}关闭! 2016-09-04 10:42:32,276 DEBUG [org.jboss.classloader.spi.ClassLoaderSystem](主)DefaultClassLoaderSystem @ 1524be18未注册域= ClassLoaderDomain @ 9d8062f {name = vfszip:/D:/jboss-5.0.1.GA /server/newdms/deploy/simple-webservice.war/parentPolicy = AFTER_BUT_JAVA_BEFORE parent = ClassLoaderDomain @ 1f3c2480 {DefaultDomain}} 2016-09-04 10:42:32,276调试[org.jboss.classloading.spi.dependency.Domain](主)org.jboss.classloading.spi.dependency.Domain@3185c8e2 {vfszip:/D:/jboss-5.0 .1.GA/server/newdms/deploy/simple-webservice.war/}删除模块VFSDeploymentClassLoaderPolicyModule vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/:0.0. 0
我尝试过的事情:
我已经尝试了下面的示例来检查两个服务器中的部署.它在JbossEAP上有效,但在Jboss 5.0.1上无效
作为参考,我在 jbossEAP
中附加了示例工作的源代码链接.
示例源代码 解决方案
I have created JAX-WS service which is pretty simple but having problem in deployment in jboss-5.0.1.GA but same web service is perfectly working in jboss-eap-6.2.
Following Exception is coming in jboss-5.0.1.GA:
2016-09-04 10:42:32,217 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Real: name=vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.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.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:698)
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:745)
Caused by: java.lang.IllegalArgumentException: Target container name not set
at org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookEJB3.createDeployment(JAXWSDeployerHookEJB3.java:87)
at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:71)
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)
... 18 more
2016-09-04 10:42:32,275 DEBUG [org.jboss.classloader.spi.base.BaseClassLoaderDomain] (main) ClassLoaderDomain@9d8062f{vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/} unregisterClassLoader BaseClassLoader@457dfcb5{vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/}
2016-09-04 10:42:32,275 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] (main) UnifiedLoaderRepository removed(false) null
2016-09-04 10:42:32,275 DEBUG [org.jboss.classloader.spi.base.BaseClassLoaderPolicy] (main) VFSClassLoaderPolicy@5259f2b7{vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/} shutdown!
2016-09-04 10:42:32,275 DEBUG [org.jboss.classloader.spi.base.BaseClassLoader] (main) BaseClassLoader@457dfcb5{vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/} shutdown!
2016-09-04 10:42:32,276 DEBUG [org.jboss.classloader.spi.base.BaseClassLoaderDomain] (main) ClassLoaderDomain@9d8062f{vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/} shutdown!
2016-09-04 10:42:32,276 DEBUG [org.jboss.classloader.spi.ClassLoaderSystem] (main) DefaultClassLoaderSystem@1524be18 unregistered domain=ClassLoaderDomain@9d8062f{name=vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/ parentPolicy=AFTER_BUT_JAVA_BEFORE parent=ClassLoaderDomain@1f3c2480{DefaultDomain}}
2016-09-04 10:42:32,276 DEBUG [org.jboss.classloading.spi.dependency.Domain] (main) org.jboss.classloading.spi.dependency.Domain@3185c8e2{vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/} remove module VFSDeploymentClassLoaderPolicyModule vfszip:/D:/jboss-5.0.1.GA/server/newdms/deploy/simple-webservice.war/:0.0.0
What I have tried:
I have tried below sample for checking deployment in both the server. it has worked on JbossEAP but not on Jboss 5.0.1
For reference, I am attaching link of source code of sample working in jbossEAP
解决方案
这篇关于JAX-WS Web服务在jboss-5.0.1.GA中引发“由以下原因引起的异常:java.lang.illegalargumentException:未设置目标容器名称"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!