[ 
https://issues.apache.org/jira/browse/ARTEMIS-2498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram updated ARTEMIS-2498:
------------------------------------
    Description: 
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}

  was:
I have an application which contains an Artemis broker and also a client. I 
have the following dependencies:

 

<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>

 

Broker server is started as follows:

EmbeddedActiveMQ broker = new EmbeddedActiveMQ();
 String fileConfig = "file:///" + brokerFile.getAbsolutePath();
broker.setConfigResourcePath(fileConfig);

 

Broker client is connected through sjms component from Camel:

org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory cf = new 
ActiveMQJMSConnectionFactory(url);
 
 SjmsComponent component = new SjmsComponent();
 component.setConnectionFactory(cf);
 context.addComponent("sjms", component);

 

When starting I get the following message:

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;

 

>From the logging:

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)


> 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)

Reply via email to