You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Iclo <lo...@irislink.com> on 2008/12/15 16:07:11 UTC

new ActiveMQConnectionFactory Error

Hello,

I'm an newbie on ActiveMQ and i have this problem when i try create a
ActiveMQConnectionFactory in this piece of code:

String user = ActiveMQConnectionFactory.DEFAULT_USER;
    		String password = ActiveMQConnectionFactory.DEFAULT_PASSWORD;
    		String url = ActiveMQConnectionFactory.DEFAULT_BROKER_URL;
    		
    		ActiveMQConnectionFactory connectionFactory= new
ActiveMQConnectionFactory(user, password, url);

In have this exception:
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/management/j2ee/statistics/Stats
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        ........................
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at
org.apache.activemq.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:83)
	at
org.apache.activemq.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:123)
	at receiver.ReceiverTest.makeSession(ReceiverTest.java:116)

If someone have an idea ?
Regards

-- 
View this message in context: http://www.nabble.com/new-ActiveMQConnectionFactory-Error-tp21015515p21015515.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: new ActiveMQConnectionFactory Error

Posted by Iclo <lo...@irislink.com>.
Yes, that's solve the bug :D

Thanks a lot, 
Best regards

Iclo

Dejan Bosanac wrote:
> 
> Hi,
> 
> you are missing some dependecies in your classpath. Can you try adding
> activemq-all-x.x.jar to your classpath.
> 
> Cheers
> Dejan
> 
> 
> On Mon, Dec 15, 2008 at 4:07 PM, Iclo <lo...@irislink.com> wrote:
> 
>>
>> Hello,
>>
>> I'm an newbie on ActiveMQ and i have this problem when i try create a
>> ActiveMQConnectionFactory in this piece of code:
>>
>> String user = ActiveMQConnectionFactory.DEFAULT_USER;
>>                String password =
>> ActiveMQConnectionFactory.DEFAULT_PASSWORD;
>>                String url = ActiveMQConnectionFactory.DEFAULT_BROKER_URL;
>>
>>                ActiveMQConnectionFactory connectionFactory= new
>> ActiveMQConnectionFactory(user, password, url);
>>
>> In have this exception:
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> javax/management/j2ee/statistics/Stats
>>        at java.lang.ClassLoader.defineClass1(Native Method)
>>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>>        ........................
>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>        at
>>
>> org.apache.activemq.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:83)
>>        at
>>
>> org.apache.activemq.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:123)
>>        at receiver.ReceiverTest.makeSession(ReceiverTest.java:116)
>>
>> If someone have an idea ?
>> Regards
>>
>> --
>> View this message in context:
>> http://www.nabble.com/new-ActiveMQConnectionFactory-Error-tp21015515p21015515.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> Dejan Bosanac
> 
> 
> http://www.ttmsolutions.com - get a free ActiveMQ user guide
> 
> ActiveMQ in Action - http://www.manning.com/snyder/
> Scripting in Java - http://www.scriptinginjava.net
> 

-- 
View this message in context: http://www.nabble.com/new-ActiveMQConnectionFactory-Error-tp21015515p21016659.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: new ActiveMQConnectionFactory Error

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

you are missing some dependecies in your classpath. Can you try adding
activemq-all-x.x.jar to your classpath.

Cheers
Dejan


On Mon, Dec 15, 2008 at 4:07 PM, Iclo <lo...@irislink.com> wrote:

>
> Hello,
>
> I'm an newbie on ActiveMQ and i have this problem when i try create a
> ActiveMQConnectionFactory in this piece of code:
>
> String user = ActiveMQConnectionFactory.DEFAULT_USER;
>                String password =
> ActiveMQConnectionFactory.DEFAULT_PASSWORD;
>                String url = ActiveMQConnectionFactory.DEFAULT_BROKER_URL;
>
>                ActiveMQConnectionFactory connectionFactory= new
> ActiveMQConnectionFactory(user, password, url);
>
> In have this exception:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> javax/management/j2ee/statistics/Stats
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>        ........................
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>        at
>
> org.apache.activemq.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:83)
>        at
>
> org.apache.activemq.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:123)
>        at receiver.ReceiverTest.makeSession(ReceiverTest.java:116)
>
> If someone have an idea ?
> Regards
>
> --
> View this message in context:
> http://www.nabble.com/new-ActiveMQConnectionFactory-Error-tp21015515p21015515.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>