如何在Jboss中部署pulsarra.rar?

roqulrg3  于 2023-10-20  发布在  Pulsar
关注(0)|答案(1)|浏览(135)

我尝试在JBoss中部署和配置DataStax Apache Pulsar JMS客户端资源适配器,但出现以下错误:

2023-08-28 11:21:30,684 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) WFLYWELD0003: Processing weld deployment pulsarra.rar
2023-08-28 11:21:30,810 INFO  [io.jaegertracing.internal.JaegerTracer] (MSC service thread 1-5) No shutdown hook registered: Please call close() manually on application shutdown.
2023-08-28 11:21:30,848 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 83) WFLYCLINF0002: Started client-mappings cache from ejb container
2023-08-28 11:21:30,991 INFO  [com.datastax.oss.pulsar.jms.rar.PulsarResourceAdapter] (MSC service thread 1-3) setConfiguration {"brokerServiceUrl":"pulsar://localhost:6650","webServiceUrl":"http://localhost:8080"}
2023-08-28 11:21:31,002 INFO  [com.datastax.oss.pulsar.jms.rar.PulsarResourceAdapter] (MSC service thread 1-3) startPulsarConnectionFactory {"brokerServiceUrl":"pulsar://localhost:6650","webServiceUrl":"http://localhost:8080"}
2023-08-28 11:21:31,079 INFO  [io.smallrye.metrics] (MSC service thread 1-4) MicroProfile: Metrics activated
2023-08-28 11:21:31,305 WARN  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-3) IJ020013: Connection factory not bound: com.datastax.oss.pulsar.jms.rar.PulsarManagedConnectionFactory
2023-08-28 11:21:31,306 INFO  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-3) IJ020015: Connection factory not specification compliant. See 6.5.1.3 for additional details: com.datastax.oss.pulsar.jms.PulsarConnectionFactory
2023-08-28 11:21:31,314 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 83) MSC000001: Failed to start service jboss.ra.deployment."pulsarra.rar_PulsarRA": org.jboss.msc.service.StartException in service jboss.ra.deployment."pulsarra.rar_PulsarRA": WFLYJCA0046: Failed to start RA deployment [pulsarra.rar]
    at [email protected]//org.jboss.as.connector.services.resourceadapters.deployment.AbstractResourceAdapterDeploymentService$2.run(AbstractResourceAdapterDeploymentService.java:340)
    at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:829)
    at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/home/manuel/tools/jboss-eap-7.3/standalone/tmp/vfs/temp/temp7ade9d00bcac3529/content-6b5e2cac829e1ded/contents/
    at [email protected]//org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2058)
    at [email protected]//org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService$WildFlyRaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:190)
    at [email protected]//org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:128)
    at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
    at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
    at [email protected]//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
    at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
Section: 17.5.1.1
Description: ConnectionFactory must implement javax.resource.Referenceable
Code: com.datastax.oss.pulsar.jms.PulsarConnectionFactory

    ... 11 more

我的程序是:
1-部署pulsarra.rar

2-配置资源适配器(配置->子系统->资源适配器->添加资源适配器)

到目前为止没有错误。
3-指定连接定义(资源适配器-> PulsarRA ->连接定义->添加)

现在,当我重新启动JBoss时,我会看到错误。
JBoss需要一个javax.resource.cci.ConnectionFactory,但我传递了一个javax. jms. ConnectionFactory。
从ra.xml:

<connectionfactory-interface>javax.jms.TopicConnectionFactory</connectionfactory-interface>
 <connectionfactory-impl-class>com.datastax.oss.pulsar.jms.PulsarConnectionFactory</connectionfactory-impl-class>
 <connection-interface>javax.jms.TopicConnection</connection-interface>
 <connection-impl-class>com.datastax.oss.pulsar.jms.PulsarConnection</connection-impl-class>

我不知道我做错了什么。

icomxhvb

icomxhvb1#

实际上,ironjacmar 1.4.19 jboss子模块(实现Java EE Connector Architecture 1.7)的连接工厂验证器的验证规则要求所提供的连接工厂实现Referenceable(例如,通过实现javax.resource.cci.ConnectionFactory)。
但是,pulsar-jms repo中似乎没有任何类实现javax.resource.Referencable或在任何地方使用javax.resource.cci.*
我认为就上述问题向pulsar-jms issues section提出一个问题是合理的。
标题可以是:“连接工厂不符合规范。有关6.5.1.3更多详细信息,请访问www.example.com:com.datastax.oss.pulsar.jms.PulsarConnectionFactory
您可以注意到上面引用的部分(来自Jakarta Connectors 1.7)如下所述:
连接工厂实现类必须实现接口javax. resource. Referenceable。请注意,javax.resource.Referenceable接口扩展了javax.naming.Referenceable接口。参见第20.6.3节“场景:有关JNDI引用机制的详细信息,请参见第20-19页上的”Referenceable“。
但是所提供的连接工厂没有实现它,导致了您所提供的异常。
我想他们应该提供一些额外的类来支持连接器架构规范。

相关问题