This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JMS Programming (Error)" Watch "JMS Programming (Error)" New topic

JMS Programming (Error)

jacq carballo
Ranch Hand

Joined: Feb 10, 2002
Posts: 42
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$ (
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at com.sun.naming.internal.VersionHelper12.loadClass(
at javax.naming.spi.NamingManager.getInitialContext(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.init(
at javax.naming.InitialContext.<init>(
at JMSLookup.main(
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 ?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: JMS Programming (Error)
It's not a secret anymore!