不能将org.apache.qpid.jms.provider.amqp.amqproviderfactory施加到or



我一直在尝试弄清此问题,并且需要不同的观点。我正在使用Spring并已合并了这个Spring Boot启动器包,以便可以利用AMQP协议: AMQP-10-JMS-SPRING-SPRING-boot-boot-starter 我已经成功配置并确实具有在职的。当我将其部署到JBOSS EAP7容器" (中时,问题到达。因此,当我第一次部署此应用程序时,一切都很好。当我在不先删除容器的情况下重新删除同一应用程序时,问题就会到达(因为我不必这样做(。这是我到目前为止的想法和尝试:

  1. 春季的某些东西无法正确清理? 浏览一些JMC飞行计划统计数据,什么都看不到 向我跳了出来。没有弹簧式框架或JMSconnectionFactory实例。
  2. wildlfy类问题?我忽略了我的jboss deployment中的Artemis libs和Artemis模块
  3. 好朋友Google 99%的本垒打时间。这次虽然没有太多方向。

JBOSS-DEPLOYMEMT结构

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
        <exclude-subsystems>
            <subsystem name="jaxrs" />
            <subsystem name="messaging-activemq" />
        </exclude-subsystems>
        <exclusions>
            <module name="org.hibernate" slot="main" />
            <module name="org.apache.activemq.artemis" slot="main" />
            <module name="org.apache.activemq.artemis.ra" slot="main" />
        </exclusions>
    </deployment>
</jboss-deployment-structure>

请记住,我在这里还有其他代码,hense jsr软件包,冬眠,春季 - 韦布等依赖项。我把那些留给了完整性。

pom.xml

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Spring Data/DB -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>4.3.10.RELEASE</version>
        </dependency>
        <dependency> <!-- works with spring 4.3.10-->
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jpa</artifactId>
            <version>1.11.6.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-java8</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>hibernate-core</artifactId>
                    <groupId>org.hibernate</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>hibernate-core</artifactId>
                    <groupId>org.hibernate</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- Spring JMS-->
        <dependency>
            <groupId>org.amqphub.spring</groupId>
            <artifactId>amqp-10-jms-spring-boot-starter</artifactId>
            <version>0.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jms</artifactId>
        </dependency>

最后我的堆栈跟踪

22:44:08,293 ERROR [org.apache.qpid.jms.provider.ProviderFactory] (ServiceEvent-144) Failed to create Provider instance for amqp, due to: java.io.IOException: Provider scheme NOT recognized: [amqp]
22:44:08,293 ERROR [org.apache.qpid.jms.JmsConnectionFactory] (ServiceEvent-144) Failed to create JMS Provider instance for: amqp
22:44:08,293 ERROR [stderr] (ServiceEvent-144) Exception in thread "ServiceEvent-144" org.springframework.jms.UncategorizedJmsException: Uncategorized exception occurred during JMS processing; nested exception is javax.jms.JMSException: Provider scheme NOT recognized: [amqp]
22:44:08,293 ERROR [stderr] (ServiceEvent-144)  at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
22:44:08,293 ERROR [stderr] (ServiceEvent-144)  at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:169)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:487)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:570)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:658)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at my.test.Producertest.send(Producertest:62)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at java.lang.reflect.Method.invoke(Method.java:498)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:256)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:177)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:140)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:134)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at java.lang.Thread.run(Thread.java:745)
22:44:08,294 ERROR [stderr] (ServiceEvent-144) Caused by: javax.jms.JMSException: Provider scheme NOT recognized: [amqp]
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:86)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:108)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:211)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:191)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:474)
22:44:08,294 ERROR [stderr] (ServiceEvent-144)  ... 21 more
22:44:08,294 ERROR [stderr] (ServiceEvent-144) Caused by: java.io.IOException: Provider scheme NOT recognized: [amqp]
22:44:08,295 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.provider.ProviderFactory.findProviderFactory(ProviderFactory.java:124)
22:44:08,295 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.provider.ProviderFactory.findProviderFactory(ProviderFactory.java:99)
22:44:08,295 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.provider.ProviderFactory.create(ProviderFactory.java:70)
22:44:08,295 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.JmsConnectionFactory.createProvider(JmsConnectionFactory.java:329)
22:44:08,295 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:200)
22:44:08,295 ERROR [stderr] (ServiceEvent-144)  ... 24 more
22:44:08,295 ERROR [stderr] (ServiceEvent-144) Caused by: java.lang.ClassCastException: Cannot cast org.apache.qpid.jms.provider.amqp.AmqpProviderFactory to org.apache.qpid.jms.provider.ProviderFactory
22:44:08,295 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.util.FactoryFinder.newInstance(FactoryFinder.java:129)
22:44:08,295 ERROR [stderr] (ServiceEvent-144)  at org.apache.qpid.jms.provider.ProviderFactory.findProviderFactory(ProviderFactory.java:122)
22:44:08,295 ERROR [stderr] (ServiceEvent-144)  ... 28 more

没有什么能让我抓住这里的稻草了。因此,任何方向都有帮助。我可以使用以后会尝试的JMS API。但是我希望能解决这个问题。预先感谢。

update

我将所有代码从等式中取出,并创建了一个简单的服务。AMQP-10-JMS-Spring-boot-Starter不是罪魁祸首。我怀疑我的春季活动听众或我的异步socketchannel在某种程度上(与JBOSS或直接(干扰并保持差异连接。

好吧,我发现了这个问题。请注意,一旦我将此应用程序移至Tomcat,我才发现核心问题。这说明"您创建了一个未被删除的线程"。我的代码使用我用来在我关心的端口上侦听器的异步Socketchannel类。默认实现使用类Ansychronouschannelgroup,在这种情况下,该程序将不会清理,一旦将通道组分配给Socketchannel,就可以以这种方式清理线程。我将在今天晚些时候将代码上传到GitHub帐户,以便可以使用它。Java 8错误?

我认为这与JBOSS类加载机构有关。当我们从WLS迁移到JBOSS时,我们遇到了几个奇怪的问题。一个建议您使用class.forname在您的应用启动时实例化所需的驱动程序/库。您可以尝试尝试的另一个是删除Sub-S-Semstem包含在standalone.xml/domain.xml中(子系统XMLNS =" urn:jboss:jboss:domain:domain:messaging-activemq:1.0"(和检查。希望这会有所帮助。

相关内容

  • 没有找到相关文章

最新更新