Wildfly 如何使资源适配器全局化

Wildfly How to make a resourceadapter global

我在 wildfly9 上安装了一个资源适配器。我 运行 陷入类广播异常或 NoCalssdefFoundErrors。

我试图通过放入 susbsystem:ee

使我的资源适配器全局化
> <global-modules>      <module
> name="deployment.mycommunicatorappConnector-1.2.0.rar"/>             
> </global-modules>

但它说 modulenotfoundexception:

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

我试着把它去掉 "deployment." 部分,只有 rar 名称,但它说的是同样的事情。我究竟做错了什么。有什么想法吗?

完整的堆栈跟踪

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

如果您尝试将部署添加到全局模块,则无法执行此操作。

也就是说,由于它是一个资源适配器,您需要在 resource-adapter 子系统中定义它。有一些documentation。这显示了我通常不提倡手动更新的原始 XML。通常您会希望使用 Web 控制台或 CLI 来更新配置。