在Wildfly WFLYJCA0046/IJ020066上部署资源适配器 [英] Deployment of Resource Adapter on Wildfly WFLYJCA0046 / IJ020066

查看:107
本文介绍了在Wildfly WFLYJCA0046/IJ020066上部署资源适配器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于JEE 7教程的交易连接器"示例,我尝试创建自己的资源适配器.与玻璃鱼配合使用效果很好.

Based on the Trading Connector example from the JEE 7 Tutorials, I've tried to create my own Resource adapter. It worked fine with glassfish.

我正在尝试将.EAR部署到wildfly10.它不起作用,并在下面显示此消息.我有点不知道该从哪里开始寻找内容,因为关于错误代码的唯一提及是在wildfly本身的源代码中,我宁愿现在不阅读所有Wildfly代码(但我在这里).

I'm trying to deploy my .EAR to a wildfly 10. It doesn't work, and is throwing the message below. I am kinda lost on where to start looking, as the only mention of the error code is in the source code of wildfly itself and I'd rather not read all the Wildfly code now (but I'm at it).

资源适配器是.ear文件的一部分,在该ear文件中,我有一个ejb项目,它是该RA的客户端,为了进行ejb的编译,我在包含以下内容的rar旁边创建了一个ra-lib.jar.仅来自api包中的条目.

The Resource Adapter is part of a .ear file, in that ear file I have an ejb project that is client to this RA, in order for the ejb to compile I create a ra-lib.jar alongside the rar that contains only the entries from the api package.

.rar的结构:

./META-INF
./META-INF/maven
./META-INF/maven/root.project
./META-INF/maven/root.project/ra
./META-INF/maven/root.project/ra/pom.xml
./META-INF/maven/root.project/ra/pom.properties
./META-INF/MANIFEST.MF
./root
./root/project
./root/project/ra
./root/project/ra/api
./root/project/ra/api/DummyRAConnectionFactory.class
./root/project/ra/api/DummyRAConnection.class
./root/project/projects
./root/project/projects/dummy
./root/project/projects/dummy/ra
./root/project/projects/dummy/ra/connection
./root/project/projects/dummy/ra/connection/DummyRAConnectionFactoryImpl.class
./root/project/projects/dummy/ra/connection/DummyRAManagedConnection.class
./root/project/projects/dummy/ra/connection/DummyRAManagedConnectionFactory.class
./root/project/projects/dummy/ra/connection/DummyRAConnectionImpl.class
./root/project/projects/dummy/ra/connection/DummyRAManagedConnection$1.class
./root/project/projects/dummy/ra/DummyImplementationRAConnector.class

连接工厂负责人:

import java.io.Serializable;
import javax.resource.Referenceable;
import root.project.ra.api.DummyRAConnectionFactory;

public class DummyRAConnectionFactoryImpl implements DummyRAConnectionFactory, Serializable, Referenceable {

错误消息:

08:30:21,440 ERROR [org.jboss.msc.service.fail] (ResourceAdapterDeploymentService Thread Pool -- 1) MSC000001: Failed to start service jboss.raactivator.java_comp_env_eis_DummyRAConnectionFactory: org.jboss.msc.service.StartException in service jboss.raactivator.java_comp_env_eis_DummyRAConnectionFactory: WFLYJCA0046: Failed to start RA deployment [java_comp_env_eis_DummyRAConnectionFactory]
        at org.jboss.as.connector.services.resourceadapters.deployment.AbstractResourceAdapterDeploymentService$2.run(AbstractResourceAdapterDeploymentService.java:325)
        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)
        at org.jboss.threads.JBossThread.run(JBossThread.java:320)
    Caused by: org.jboss.jca.deployers.common.DeployException: IJ020066: Connection factory implementation (root.project.projects.dummy.ra.connection.DummyRAConnectionFactoryImpl) doesn't implement connection factory interface (root.project.ra.api.DummyRAConnectionFactory)
        at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1348)
        at org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator.doDeploy(ResourceAdapterActivatorService.java:171)
        at org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService.start(ResourceAdapterActivatorService.java:115)
        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)

我看不到可以看到ConnectionFactoryImpl的ClassLoader也看不到接口的原因.之前,我将接口放在另一个jar中(这样,我就不需要从rar为客户端生成jar了),并且产生了相同的错误.

I can see no reason that a ClassLoader that can see the ConnectionFactoryImpl can not also see the interface. I had the interface in a different jar earlier (so that I don't need to produce a jar from the rar for the clients) and that yielded the same error.

我已经简短了,所以请问何时​​缺少某些东西,我会及时添加.

I've kept this short, so please ask when something is missing, I will add it promptly.

推荐答案

问题是我需要具有该RA客户端的EJB中的Interface类.在那里,我没有将我从.rar创建的.jar指定为<scope>provided</scope>,所以在最后一个.ear中,我有ra-api.jarra.rar两者都包含接口.class.

The problem was that I needed the Interface classes in the EJB that has a client to this RA. there, I didn't specify the .jar that I created from the .rar as <scope>provided</scope> so in the final .ear I had the ra-api.jar and the ra.rar that BOTH contained the Interface .class.

这篇关于在Wildfly WFLYJCA0046/IJ020066上部署资源适配器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆