Search code examples
javawildflyjca

Wildfly How to make a resourceadapter global


I have a resource adapter installed on wildfly9. i am running into classcast exceptions or NoCalssdefFoundErrors.

I tried to make my resource adpater global by putting in the susbsystem:ee

> <global-modules>      <module
> name="deployment.mycommunicatorappConnector-1.2.0.rar"/>             
> </global-modules>

but it says modulenotfoundexception:

Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar:main

I tried to put it without the "deployment." part and only the rar name but it said the same thing. What am I doing wrong. Any ideas?

the full stack trace

17:08:03,479 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "MyWebServicesAd-1.3-SNAPSHOT.war" (runtime-name: "MyWebServicesAd-1. 3-SNAPSHOT.war") 17:08:03,479 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "mycommunicatorappConnector-1.2.0.rar" (runtime-name: "mycommunicatorappConnector-1.2.0.rar") 17:08:03,630 INFO  [org.jboss.ws.common.management] (MSC service thread 1-7) JBWS022052: Starting JBoss Web Services - Stack CXF Server 5.0.0.Final 17:08:03,863 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0059: Class Path entry messages.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/mycommunicatorappConnector-1.2.0.rar/mess ages-10.2b07.jar  does not point to a valid jar for a Class-Path reference. 17:08:03,864 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0059: Class Path entry schema.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/mycommunicatorappConnector-1.2.0.rar/messag es-10.2b07.jar  does not point to a valid jar for a Class-Path reference. 17:08:04,066 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.module.service."deployment.mycommunicatorappConnector-1.2.0.rar".main: org.jboss.msc.service.St artException in service jboss.module.service."deployment.mycommunicatorappConnector-1.2.0.rar".main: WFLYSRV0179: Failed to load module: deployment.mycommunicatorappConnector-1.2.0.rar:main
        at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745) Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar:main
        at org.jboss.modules.Module.addPaths(Module.java:1042)
        at org.jboss.modules.Module.link(Module.java:1398)
        at org.jboss.modules.Module.relinkIfNecessary(Module.java:1426)
        at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)
        at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)
        ... 5 more
    17:08:04,746 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0059: Class Path entry messages.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/MyWebServicesAd-1.3-SNA PSHOT.war/WEB-INF/lib/messages-10.2b07.jar  does not point to a valid jar for a Class-Path reference. 17:08:04,747 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0059: Class Path entry schema.jar in /C:/JAVA/WF9/wildfly-9.0.0.Final/bin/content/MyWebServicesAd-1.3-SNAPS HOT.war/WEB-INF/lib/messages-10.2b07.jar  does not point to a valid jar for a Class-Path reference. 17:08:04,876 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.module.service."deployment.MyWebServicesAd-1.3-SNAPSHOT.war".main: org.jboss. msc.service.StartException in service jboss.module.service."deployment.MyWebServicesAd-1.3-SNAPSHOT.war".main: WFLYSRV0179: Failed to load module: deployment.MyWebServicesAd-1.3-SNAP SHOT.war:main
        at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745) Caused by: org.jboss.modules.ModuleNotFoundException: deployment.mycommunicatorappConnector-1.2.0.rar:main
        at org.jboss.modules.Module.addPaths(Module.java:1042)
        at org.jboss.modules.Module.link(Module.java:1398)
        at org.jboss.modules.Module.relinkIfNecessary(Module.java:1426)
        at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)
        at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)
        ... 5 more

Solution

  • If you're trying to add a deployment to the global modules you can't do that.

    That said since it's a resource adapter you need to define it in the resource-adapter subsystem. There is some documentation. This shows the raw XML which I generally don't advocate updating manually. Generally you'd want to use the web console or CLI to update the configuration.