Forum Home » Fuse Distributions » Fuse Message Broker

Thread: Publish/ Subscribe/ Consume JNDI Error

 
This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jan 16, 2012 3:03 PM Last Post By: gtully Threads: [ Previous | Next ]
ozi87

Posts: 3
Registered: 01/05/12
Publish/ Subscribe/ Consume JNDI Error
Posted: Jan 5, 2012 4:02 PM
 
  Click to reply to this thread Reply
Attachment Subscribe.java (2.0 KB)
Attachment Consume.java (2.8 KB)
Attachment Publish.java (2.6 KB)
Hi everyone!

I am doing a simple project with a objective of subscription of topics.

It gave me the following errors:

Exception in thread "main" javax.ming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
  • at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)*
  • at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)*
  • at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)*
  • at javax.naming.InitialContext.lookup(InitialContext.java:411)*
  • at durabelesubscribers.Publish.main(Publish.java:26)*
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

I believe that is a JNDI error, and i must set the environmental variables and edit the jndi.properties.

Can anybody help me?

Thanks

Edited by: ozi87 on Jan 5, 2012 4:03 PM

gtully

Posts: 133
Registered: 02/08/08
Re: Publish/ Subscribe/ Consume JNDI Error
Posted: Jan 16, 2012 3:03 PM   in response to: ozi87 in response to: ozi87
 
  Click to reply to this thread Reply
Have a read of http://activemq.apache.org/jndi-support.html#JNDISupport-ActiveMQJNDITutorial