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

Posted on 2004-10-21
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
    LVL 13

    Expert Comment

    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


    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Lean Six Sigma Project Manager Certification

    There are many schools of thought around successful project management, but few as highly regarded as the Six Sigma and Lean methods. With 37 hours of learning, this training will explain concrete processes for increasing efficiency and limiting wasted time and effort.

    Suggested Solutions

    This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
    Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    875 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now