Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


java.rmi.RemoteException: Cannot instantiate class: com.sun.jndi.fsContext.RefFSContextFactory

Posted on 2004-10-21
Medium Priority
Last Modified: 2013-12-10
hello I get this error when I deploy my ear file in weblogic 8.1.My ear file has this com.sun.jndi.fsContext.RefFSContextFactory.class in the war file under WEB-INF/class folder.
and also in the ejb.jar file in the root.It is also in the weblogic classpath.I am trying to send message to MQ queue on the JMS provider.
My JMSConfig.xml file uses the following info
<?xml version = "1.0" encoding = "ISO-8859-1" ?>
      <contextFactory value="com.sun.jndi.fsContext.RefFSContextFactory"/>
      <providerURL value="file:directoty where .bindings file is"/>
      <timeout value="500000"/>
            <sendQueue value="queue1"/>
      <replyQueue value="queue2"/>
      <connectionFactory value="nmbbb"/>      
MQ is installed in another machine and we use the .bindings to connect.

Caused by: java.rmi.RemoteException: Cannot instantiate class: com.sun.jndi.fsContext.RefFSContextFactory
Question by:protege_g
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 13

Expert Comment

ID: 12372968
No put the com.sun.jndi.fsContext.RefFSContextFactory.class into a jar file and place it on:


remove the class from ur ear

and restart web logic

LVL 23

Accepted Solution

rama_krishna580 earned 2000 total points
ID: 12430576

This is in relation to a known bug. The location of your MQ Java classes is referenced using the variable $MQ_JAVA_HOME which is the name of the product integration home in the Cape Clear Manager. The adapter uses a different variable ($WEBSPHERE_MQ_JAVA_HOME) and so the classpath will contain the unresolved variable name rather than its value.

To fix this problem edit the adapter called WebSphereMQ@localhost and in the text area called Libraries change each instance of $WEBSPHERE_MQ_JAVA_HOME to $MQ_JAVA_HOME and the required FSContextFactory and other libraries will be loaded fine.

Actually, there's one more buglet in the adaptor defaults - the IBM JMSAdmin.config defaults to c:\JNDI-Directory where you guys use c:\ibm\JNDI-Directory - so you get lookup errors on the queue name.


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question