[
https://issues.apache.org/jira/browse/ARTEMIS-2498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16934963#comment-16934963
]
Raymond commented on ARTEMIS-2498:
----------------------------------
Hi Justin, "This looks like some kind of misconfiguration or environmental
issue ({{java.lang.NoSuchMethodError}} typically indicates a mismatch between
the version used to compile the application and the version used to actually
run it)." This seems the case, I'll repost on Stack.
> Error connecting to Artemis broker
> ----------------------------------
>
> Key: ARTEMIS-2498
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2498
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.10.0
> Reporter: Raymond
> Priority: Major
>
> I have an application which contains an Artemis broker and also a client. I
> have the following dependencies:
> {code:xml}
> <dependency>
> <groupId>org.apache.activemq</groupId>
> <artifactId>artemis-server</artifactId>
> <version>2.10.0</version>
> </dependency>
> <dependency>
> <groupId>org.apache.activemq</groupId>
> <artifactId>artemis-commons</artifactId>
> <version>2.10.0</version>
> </dependency>
> <dependency>
> <groupId>org.apache.activemq</groupId>
> <artifactId>artemis-jms-client-all</artifactId>
> <version>2.10.0</version>
> </dependency>
> {code}
> Broker server is started as follows:
> {code:java}
> EmbeddedActiveMQ broker = new EmbeddedActiveMQ();
> String fileConfig = "file:///" + brokerFile.getAbsolutePath();
> broker.setConfigResourcePath(fileConfig);
> {code}
> Broker client is connected through sjms component from Camel:
> {code:java}
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory cf = new
> ActiveMQJMSConnectionFactory(url);
> SjmsComponent component = new SjmsComponent();
> component.setConnectionFactory(cf);
> context.addComponent("sjms", component);
> {code}
> When starting I get the following message:
> {noformat}
> Handler dispatch failed; nested exception is java.lang.NoSuchMethodError:
> org.apache.activemq.artemis.utils.ClassloadingUtil.loadProperty(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
> {noformat}
> From the logging:
> {noformat}
> 2019-09-21 03:03:00.883 WARN 4984 --- [ XNIO-2 task-14]
> .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by
> handler execution: org.springframework.web.util.NestedServletException:
> Handler dispatch failed; nested exception is java.lang.NoSuchMethodError:
> org.apache.activemq.artemis.utils.ClassloadingUtil.loadProperty(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
> java.lang.NullPointerException
> at
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.finalize(ActiveMQConnectionFactory.java:961)
> at java.lang.System$2.invokeFinalize(System.java:1270)
> at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:102)
> at java.lang.ref.Finalizer.access$100(Finalizer.java:34)
> at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:217)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)