简体   繁体   中英

OpenJMS : impossible to set the INITIAL_CONTEXT_FACTORY

I wrote the below code to set my Context :

Properties properties = new Properties();
properties.put(Context.PROVIDER_URL, "tcp://localhost:3035");
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.exolab.jms.jndi.InitialContextFactory");
Context context = new InitialContext(properties);

However, when I execute the jar, I get this exception (NB : not when I make the compilation + sorry I couldn't write it here) : http://pastebin.com/5i9SbvEh

I don't know why, since I actually have the jndi , jms and openjms jars (I did it with One-JAR ).

I just forgot those dependecies... :

openjms-common 0.7.7-beta-1 openjms-common-0.7.7-beta-1.jar openjms-net 0.7.7-beta-1 openjms-net-0.7.7-beta-1.jar commons-codec 1.3 commons-codec-1.3.jar commons-logging1.0.4 commons-logging-1.0.4.jar
concurrent 1.3.4 concurrent-1.3.4.jar jms 1.1 jms-1.1.jar jndi 1.2.1 jndi-1.2.1.jar spice-jndikit 1.2 spice-jndikit-1.2.jar

( http://openjms.sourceforge.net/usersguide/jars.html , PART "Runtime JARS")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM