473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

javax.naming.NoInitialContextException:

oll3i
679 512MB
it worked but suddenly when i run it and click a button it throws exception ?

D:\SR>java Producent queue1 queue2 queue3 queue4
queue1,queue2,queue3,queue4
javax.naming.NoInitialContextException: Cannot instantiate class: org.exolab.jms
.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException:
org.exolab.jms.jndi.InitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:6
57)
at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:288
)
at javax.naming.InitialContext.init(InitialContext.ja va:223)
at javax.naming.InitialContext.<init>(InitialContext. java:175)
at Producent$4.actionPerformed(producent.java:480)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:19
95)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.jav
a:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel
.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242
)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonL
istener.java:236)
at java.awt.Component.processMouseEvent(Component.jav a:6038)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3260)
at java.awt.Component.processEvent(Component.java:580 3)
at java.awt.Container.processEvent(Container.java:205 8)
at java.awt.Component.dispatchEventImpl(Component.jav a:4410)
at java.awt.Container.dispatchEventImpl(Container.jav a:2116)
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4322
)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3986)

at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3916)
at java.awt.Container.dispatchEventImpl(Container.jav a:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429 )
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThre
ad.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.
java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThre
ad.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:121)
Caused by: java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextF
actory
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass( VersionHelper12.jav
a:46)
at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:6
54)
... 29 more
javax.naming.NoInitialContextException: Cannot instantiate class: org.exolab.jms
.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException:
org.exolab.jms.jndi.InitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:6
57)
at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:288
)
at javax.naming.InitialContext.init(InitialContext.ja va:223)
at javax.naming.InitialContext.<init>(InitialContext. java:175)
at Producent$2.actionPerformed(producent.java:297)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:19
95)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.jav
a:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel
.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242
)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonL
istener.java:236)
at java.awt.Component.processMouseEvent(Component.jav a:6038)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3260)
at java.awt.Component.processEvent(Component.java:580 3)
at java.awt.Container.processEvent(Container.java:205 8)
at java.awt.Component.dispatchEventImpl(Component.jav a:4410)
at java.awt.Container.dispatchEventImpl(Container.jav a:2116)
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4322
)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3986)

at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3916)
at java.awt.Container.dispatchEventImpl(Container.jav a:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429 )
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThre
ad.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.
java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThre
ad.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:121)
Caused by: java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextF
actory
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass( VersionHelper12.jav
a:46)
at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:6
54)
... 29 more
javax.naming.NoInitialContextException: Cannot instantiate class: org.exolab.jms
.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException:
org.exolab.jms.jndi.InitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:6
57)
at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:288
)
at javax.naming.InitialContext.init(InitialContext.ja va:223)
at javax.naming.InitialContext.<init>(InitialContext. java:175)
at Producent$2.actionPerformed(producent.java:297)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:19
95)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.jav
a:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel
.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242
)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonL
istener.java:236)
at java.awt.Component.processMouseEvent(Component.jav a:6038)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3260)
at java.awt.Component.processEvent(Component.java:580 3)
at java.awt.Container.processEvent(Container.java:205 8)
at java.awt.Component.dispatchEventImpl(Component.jav a:4410)
at java.awt.Container.dispatchEventImpl(Container.jav a:2116)
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4322
)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3986)

at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3916)
at java.awt.Container.dispatchEventImpl(Container.jav a:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429 )
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThre
ad.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.
java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThre
ad.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:121)
Caused by: java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextF
actory
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass( VersionHelper12.jav
a:46)
at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:6
54)
... 29 more

D:\SR>javac producent.java

D:\SR>java Producent queue1 queue2 queue3 queue4
queue1,queue2,queue3,queue4
javax.naming.NoInitialContextException: Cannot instantiate class: org.exolab.jms
.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException:
org.exolab.jms.jndi.InitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:6
57)
at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:288
)
at javax.naming.InitialContext.init(InitialContext.ja va:223)
at javax.naming.InitialContext.<init>(InitialContext. java:175)
at Producent$2.actionPerformed(producent.java:297)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:19
95)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.jav
a:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel
.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242
)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonL
istener.java:236)
at java.awt.Component.processMouseEvent(Component.jav a:6038)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3260)
at java.awt.Component.processEvent(Component.java:580 3)
at java.awt.Container.processEvent(Container.java:205 8)
at java.awt.Component.dispatchEventImpl(Component.jav a:4410)
at java.awt.Container.dispatchEventImpl(Container.jav a:2116)
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4322
)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3986)

at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3916)
at java.awt.Container.dispatchEventImpl(Container.jav a:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429 )
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThre
ad.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.
java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThre
ad.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:121)
Caused by: java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextF
actory
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass( VersionHelper12.jav
a:46)
at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:6
54)
... 29 more

D:\SR>
Jun 17 '07 #1
8 6130
JosAH
11,448 Expert 8TB
it worked but suddenly when i run it and click a button it throws exception ?

D:\SR>java Producent queue1 queue2 queue3 queue4
queue1,queue2,queue3,queue4
javax.naming.NoInitialContextException: Cannot instantiate class: org.exolab.jms
.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException:
org.exolab.jms.jndi.InitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext
According to the exception that was thrown and the fact that you claim that
everything ran fine before you must have changed your classpath list, i.e. it
can't find that org.exolab.jms.jndi.InitialContextFactory anymore.

kind regards,

Jos

ps. those exception stack traces tell you everything; it's luxury.
Jun 17 '07 #2
oll3i
679 512MB
i have jndi.properties and i didnt change it

java.naming.provider.url=tcp://localhost:3035
java.naming.factory.initial=org.exolab.jms.jndi.In itialContextFactory
java.naming.security.principal=admin
java.naming.security.credentials=openjms

i am writing 3 applications communicating with each other
and when i run Client from bat i dont get that exception and i use there jms too
i still cannt run the producer from bat with 4 parameters
even if i type in command line
run Producer queue1 queue2 queue3 queue4
it dsplays usage <destination> <destination> <destination> <destination>
but i pass 4 paramaters
i think i have to run it from bat then i wouldnt get that exception like i run client form bat and dont get that exception

i also have run.bat file
@setlocal
@set OJMS_HOME=C:\openjms\openjms
@java -cp D:\sr\lib\db4o-6.1-java5.jar;D:\sr\lib\db4o-6.1-java1.2.jar;D:\sr\lib\db4o-6.1-java1.1.jar;%OJMS_HOME%\lib\openjms-0.7.7-beta-1.jar;.; %1 %2 %3 %4

the lecturer didnt explain (also) what %1 %2 %3 %4 is for ? could you explain that to me?

thank YOU
Jun 17 '07 #3
oll3i
679 512MB
it was running fine when i had only 2 parameters but when i changed it to 4 for 4 queues it doesnt work
cos producer must communicate with client and supplier
client sends messages to queue1
producer sends confirmations to queue2
producer sends orders to supplier to queue3
supplier sends confimations to queue4
Jun 17 '07 #4
oll3i
679 512MB
when i run it like that
java Producer queue1 queue2 queue3 queue4
the app opens but when i click the button to get orders it throws the exception javax.naming.NoInitialContextException:
Jun 17 '07 #5
oll3i
679 512MB
when i paste to command line
java -cp D:\sr\lib\db4o-6.1-java5.jar;%OJMS_HOME%\lib\openjms-0.7.7-beta-1.jar;.; %1 %2 %3 %4 Producent queue1 queue2 queue3 queue4

it truncates queue4 to qu
Jun 17 '07 #6
oll3i
679 512MB
the command line takes only 2 parameters thats why i got the
usage: <destination> <destination> <destination> <destination>
i changed the buffer size but still it doesnt help :(
Jun 17 '07 #7
oll3i
679 512MB
why java -cp D:\sr\lib\db4o-6.1-java5.jar;D:\sr\lib\openjms-0.7.7-beta-1.jar;.; %1 %2 %3 %4 Producent queue1 queue2 queue3 queue4
doesnt run it ?
Jun 17 '07 #8
oll3i
679 512MB
my command line accepts only 126 characters?
Jun 17 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Hal Vaughan | last post by:
I'm using JDK 1.4.1 for Java 2. According to the API docs, I can use javax packages, but when I add: import javax.crypto; I get an error that it can't find the package. Is there some special...
5
by: Asad Khan | last post by:
Hi, I am using DrJava, and I am writing a program that has the following statement: import javax.swing; It gives me this error when compiled: File: C:\Program...
0
by: Shawn | last post by:
I am getting the following error with a Java Applet being served out by IIS over HTTPS/SSL using a Verisign certificate: java.lang.NoClassDefFoundError: javax/help/HelpSetException at...
2
by: stud | last post by:
import java.util.logging.*; import java.io.*; import java.util.Properties; import javax.mail.*; import javax.mail.internet.*;
3
by: Sherrod Faulks | last post by:
I'm using Jython and in the python script I do: from javax import swing result = javax.swing.JOptionPane.showInputDialog(wC, cmd,"Prompt from " + client.serverName, JOptionPane.PLAIN_MESSAGE) ...
0
by: Raquel | last post by:
I downloaded UDB PE8.1.3 on Win XP. JDK gets downloaded along with it (Java version 1.3.1). However, when I am trying to compile a java program which uses DataSource interface for Connections (by...
12
oll3i
by: oll3i | last post by:
when i launch the application from sun application server the console opens throws something i cannt even read what and closes before the application opened and threw nullpointerexception now it...
2
oll3i
by: oll3i | last post by:
what is the right name for a stateless session bean in InitialContext? my bean is in ejb package cos i get javax.naming.NameNotFoundException thank YOU
0
by: plsHelpMe | last post by:
Hi All, I am trying to send an outlook meeting request using the java code. It works fine when i execute the code using the text pad. But when i actually deploy the code using the "Websphere...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.