I have developing ActiveMQ consumer in android App, and I have included activemq-all-5.9.0.jar in my project and set configure build path, but my app is not at all working for me. Below is my code.
ActiveMQConnectionFactory connectionFactory = null;
MessageConsumer consumer = null;
Session session = null;
Connection connection = null;
connectionFactory = new ActiveMQConnectionFactory("failover:(tcp://xxx.xx.xx)?useExponentialBackOff=true&maxReconnectAttempts=-1");
connection = connectionFactory.createConnection("xxx", "xxx");
connection.start();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Topic topic = session.createTopic("jms.topic.test");
consumer = session.createConsumer(topic);
While running the App its showing following error message.
Dx trouble processing "javax/management/j2ee/ListenerRegistration.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library.
[2015-01-28 15:21:26 - MyApp] Dx 1 error; aborting
[2015-01-28 15:21:26 - MyApp] Conversion to Dalvik format failed with error 1
How can i resolve this issue and how to make my App work.
Please help me.