[Webinar] Streamline your web hosting managementRegister Today


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
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

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

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

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…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses

591 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