如何将lib添加到wildfly 8.2模块中的模块中?

时间:2015-07-01 12:08:21

标签: java eclipse sockets jboss wildfly

我尝试使用appclient部署我的jar,但是我收到了这个错误。

这是我的部署命令

C:\wildfly-8.2.0.Final\bin>appclient socket-gateway.jar 
  

16:56:03,155 ERROR [org.jboss.msc.service.fail](MSC服务主题)   1-16)MSC000001:无法启动服务   。jboss.deployment.unit"插座gateway.jar" .POST_MODULE:   服务中的org.jboss.msc.service.StartException   jboss.deployment.unit。" socket-gateway.jar" .POST_MODULE:JBAS018733:   无法处理部署的POST_MODULE阶段" socket-gateway.jar"         在org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)   [wildfly - 服务器 - 8.2.0.Final.jar:8.2.0.Final]           at org.jboss.msc.service.ServiceControllerImpl $ StartTask.startService(ServiceControllerImpl.java:1948)   [JBoss的-MSC-1.2.2.Final.jar:1.2.2.Final]           at org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl.java:1881)   [JBoss的-MSC-1.2.2.Final.jar:1.2.2.Final]           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)   [rt.jar中:1.7.0_71]           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)   [rt.jar中:1.7.0_71]           在java.lang.Thread.run(Thread.java:745)[rt.jar:1.7.0_71]引起:java.lang.RuntimeException:JBAS014187:无法加载视图   com.switching.serverapi.ServiceManagerBeanRemote           在org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:99)           at org.jboss.as.ee.component.deployers.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBindingsProcessor.java:95)           在org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)   [wildfly - 服务器 - 8.2.0.Final.jar:8.2.0.Final]           ... 5更多引起:java.lang.ClassNotFoundException:来自[Module]的com.serverapi.ServiceManagerBeanRemote   " deployment.socket-gateway.jar:主"来自服务模块加载器]           在org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)   [JBoss的-modules.jar:1.3.3.Final]           在org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)   [JBoss的-modules.jar:1.3.3.Final]           在org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)   [JBoss的-modules.jar:1.3.3.Final]           在org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)   [JBoss的-modules.jar:1.3.3.Final]           在org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)   [JBoss的-modules.jar:1.3.3.Final]           at java.lang.Class.forName0(Native Method)[rt.jar:1.7.0_71]           at java.lang.Class.forName(Class.java:274)[rt.jar:1.7.0_71]           at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)   [wildfly - 服务器 - 8.2.0.Final.jar:8.2.0.Final]           在org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:97)           ......还有7个

     

16:56:03,167 ERROR [org.jboss.as.controller.management-operation]   (Thread-43)JBAS014613:操作("部署")失败 - 地址:   ([("部署" =>" socket-gate way.jar")]) - 失败描述:   {" JBAS014671:服务失败" =>   {" jboss.deployment.unit \"插座gateway.jar \" .POST_MODULE" =>   " org.jboss.msc.service.Start服务中的异常   jboss.deployment.unit。\" socket-gateway.jar \" .POST_MODULE:JBAS018733:   无法处理部署的POST_MODULE阶段   \"插座gateway.jar \"引起:java.lang.RuntimeException:   JBAS014187:无法加载视图   com.switching.serverapi.ServiceManagerBeanRemote引起:   抛出java.lang.ClassNotFoundException:   来自[Module。]的com.switching.serverapi.ServiceManagerBeanRemote   \" deployment.socket-gateway.jar:主\"来自服务模块加载器]"}}   16:56:03,170 ERROR [org.jboss.as.server](Thread-43)JBAS015870:   部署部署" socket-gateway.jar"被卷起来了   以下失败消息:{" JBAS014671:服务失败" =>   {" jboss.deployment.unit \"插座gateway.jar \" .POST_MODULE" =>   服务中的" org.jboss.msc.service.StartException jboss.deployme   nt.unit。\" socket-gateway.jar \" .POST_MODULE:JBAS018733:失败   进程阶段POST_MODULE of deployment \" socket-gateway.jar \"造成   by:java.lang.RuntimeException:JBAS014187:无法加载视图   com.switching.serverapi.ServiceManagerBeanRemote引起:   抛出java.lang.ClassNotFoundException:   来自[Module。]的com.switching.serverapi.ServiceManagerBeanRemote   \" deployment.socket-gateway.jar:主\"来自服务模块加载器]"}}   16:56:03,197 INFO [org.jboss.as.server.deployment](MSC服务主题   1-9)JBAS015877:已停止部署socket-gateway.jar(运行时名称:   socket-gateway.jar)in 26ms 16:56:03,198 INFO   [org.jboss.as.controller](Thread-43)JBAS014774:服务状态   报告JBAS014777:无法启动的服务:服务   jboss.deployment.unit。" socket-gateway.jar" .POST_MODULE

从那个错误中它明确地说" java.lang.ClassNotFoundException:com.serverapi.ServiceManagerBeanRemote来自[Module" deployment.socket-gateway.jar:main"来自服务模块加载器]"。

我已经阅读了redhat documentation

使用该引用,我在" C:\ wildfly-8.2.0.Final \ modules \ com \ switching \ serverapi"中创建文件夹。并把serverapi.jar(这个jar用于com.serverapi.ServiceManagerBeanRemote的代码)

但我仍有同样的问题。有人可以帮帮我吗?

谢谢

1 个答案:

答案 0 :(得分:0)

我认为您创建的文件夹不在正确的目录中。它应该在: [WidlFly-HOME] \ modules \ system \ layers \ base .. \ com \ switching \ serverapi \ serverapi.jar