File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes JMS Programming (Error) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "JMS Programming (Error)" Watch "JMS Programming (Error)" New topic
Author

JMS Programming (Error)

jacq carballo
Ranch Hand

Joined: Feb 10, 2002
Posts: 42
Hi!
I just started out with JMS Programming. I have been trying out codes from the wrox book. I get the following error message:
javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory. Root exception is java.lang.ClassNotFoundException: com.sun.jndi.fscontext.RefFSContextFactory
at java.net.URLClassLoader$1.run (URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:207)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at JMSLookup.main(JMSLookup.java:22)
What could be the possible cause. I have already included the following jar files in my classpath:
fscontext.jar, jms.jar, jndi.jar, imq.jar, and providerutil.jar
The code that caused the error is:
Context ctx = new InitialContext(prop);
Aleksey Matiychenko
Ranch Hand

Joined: Apr 03, 2001
Posts: 178
Have you checked the properties that you are using ?
What server are you using ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS Programming (Error)