简体   繁体   中英

How to add lib into modules in wildfly 8.2 Final?

I'm trying to deploy my jar using appclient but i get this error.

This is my deploy command

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

16:56:03,155 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-16) MSC000001: Failed to start service jboss.deployment.unit."socket-gateway.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."socket-gateway.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE ofdeployment "socket-gateway.jar" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-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] at 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] at java.lang.Thread.r un(Thread.java:745) [rt.jar:1.7.0_71] Caused by: java.lang.RuntimeException: JBAS014187: Could not load view com.switching.serverapi.ServiceManagerBeanRemote at org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:99) at org.jboss.as.ee.component.deployers.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBindingsProcessor.java:95) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final] ... 5 more Caused by: java.lang.ClassNotFoundException: com.serverapi.ServiceManagerBeanRemote from [Module "deployment.socket-gateway.jar:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final] at org.jboss.modules.C oncurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final] at 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-server-8.2.0.Final.jar:8.2.0.Final] at org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:97) ... 7 more

16:56:03,167 ERROR [org.jboss.as.controller.management-operation] (Thread-43) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "socket-gate way.jar")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\\"socket-gateway.jar\\".POST_MODULE" => "org.jboss.msc.service.Start Exception in service jboss.deployment.unit.\\"socket-gateway.jar\\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \\"socket-gateway.jar\\" Caused by: java.lang.RuntimeException: JBAS014187: Could not load view com.switching.serverapi.ServiceManagerBeanRemote Caused by: java.lang.ClassNotFoundException: com.switching.serverapi.ServiceManagerBeanRemote from [Module \\"deployment.socket-gateway.jar:main\\" from Service Module Loader]"}} 16:56:03,170 ERROR [org.jboss.as.server] (Thread-43) JBAS015870: Deploy of deployment "socket-gateway.jar" was rolled back with the following failure message: {"JBAS014671: Failed services" => {"jboss.deployment.unit. \\"socket-gateway.jar\\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployme nt.unit.\\"socket-gateway.jar\\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \\"socket-gateway.jar\\" Caused by: java.lang.RuntimeException: JBAS014187: Could not load view com.switching.serverapi.ServiceManagerBeanRemote Caused by: java.lang.ClassNotFoundException: com.switching.serverapi.ServiceManagerBeanRemote from [Module \\"deployment.socket-gateway.jar:main\\" from Service Module Loader]"}} 16:56:03,197 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment socket-gateway.jar (runtime-name: socket-gateway.jar ) in 26ms 16:56:03,198 INFO [org.jboss.as.controller] (Thread-43) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.deployment.unit ."socket-gateway.jar".POST_MODULE

From that error it clearly said " java.lang.ClassNotFoundException: com.serverapi.ServiceManagerBeanRemote from [Module "deployment.socket-gateway.jar:main" from Service Module Loader]".

And i already read the redhat documentation

using that references , i make folder in "C:\\wildfly-8.2.0.Final\\modules\\com\\switching\\serverapi" and put the serverapi.jar (this jar where the code for com.serverapi.ServiceManagerBeanRemote )

but i still have same problems. Anyone can help me?

Thank you

i think the folder you have made is not in the right directory. It should be under: [WidlFly-HOME]\\modules\\system\\layers\\base .. \\com\\switching\\serverapi\\serverapi.jar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM