ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Telemetry / Low Latency Messaging / Everyplace » Unable to run my client code

Post new topic  Reply to topic
 Unable to run my client code « View previous topic :: View next topic » 
Author Message
anisrao87
PostPosted: Thu Jan 29, 2015 6:37 am    Post subject: Unable to run my client code Reply with quote

Newbie

Joined: 21 Jan 2015
Posts: 4

Hi everybody,
I want to integrate an MQTT client (Paho for example) in my JBoss application. I get a broker running on a server and an android device taht send messages. Now i want to send/receive message form my java app under JBoss.
I've tried to put Paho code in a @startup bean but i get an IllegalState.
Now i'm reading a lot of documentation about MQTT but i can't find a way to integrate a MQTT Client in my AS.

Can you please help me resolve why my code is not running?

Errors found is

Caused by: java.lang.NoClassDefFoundError: org.eclipse.paho.client.mqttv3.MqttCallback
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
at java.net.URLClassLoader.access$300(URLClassLoader.java:79)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1034)

Caused by: java.lang.ClassNotFoundException: org.eclipse.paho.client.mqttv3.MqttCallback
at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:76)
at java.net.URLClassLoader.findClass(URLClassLoader.java:396)
at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
... 29 more

Thanks
Rao
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jan 29, 2015 7:45 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Class loader issues usually mean that you did not put all of the necessary jar files in the right place, or that you didn't mark those jar flies as being needing to be loaded.

So it's not anything with your code. It's with the configuration of the app server or the deployed application. I don't know JBOSS, so I can't help.

However, an important question is - which piece are you expecting to actually send the MQTT message? The android applicatoin? Or the JBOSS application running on the server side?

If you want the android app to send the message, you should look at using the javascript websockets samples instead of the paho Java client.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Telemetry / Low Latency Messaging / Everyplace » Unable to run my client code
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.