Topic
9 replies Latest Post - ‏2011-01-24T15:49:14Z by SystemAdmin
SystemAdmin
SystemAdmin
6042 Posts
ACCEPTED ANSWER

Pinned topic com.ibm.websphere.naming.WsnInitialContextFactory not found

‏2003-06-10T18:34:56Z |
Hi,

I am using WSAD5 and when I lookup context, the error occurs like
"com.ibm.websphere.naming.WsnInitialContextFactory " not found. Can anyone
tell me what jar files I should add in my classpath?

I tried naming.jar and ns.jar, but WSAD still goes wrong. The new error
message is:
java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ObjectURL
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at
com.ibm.websphere.naming.WsnInitialContextFactory.init_implClassCtor(WsnInit
ialContextFactory.java:168)
at
com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnIniti
alContextFactory.java:108)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
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 com.allmedia.domain.util.dao.DAOFactory.getDAO(DAOFactory.java:40)
at com.allmedia.domain.facade.CategoryFacade.<init>(CategoryFacade.java:33)
at
com.allmedia.domain.facade.CategoryFacade.getInstance(CategoryFacade.java:45
)
at
com.allmedia.domain.facade.CategoryFacadeTest.setUp(CategoryFacadeTest.java:
44)
at junit.framework.TestCase.runBare(TestCase.java:138)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:329)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:218)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:151)

Thanks.

Updated on 2011-01-24T15:49:14Z at 2011-01-24T15:49:14Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6042 Posts
    ACCEPTED ANSWER

    Re: com.ibm.websphere.naming.WsnInitialContextFactory not found

    ‏2004-03-11T11:53:15Z  in response to SystemAdmin
    I have the same problem.
    Where did you find ns.jar?
    • SystemAdmin
      SystemAdmin
      6042 Posts
      ACCEPTED ANSWER

      Re: com.ibm.websphere.naming.WsnInitialContextFactory not found

      ‏2004-04-26T15:00:58Z  in response to SystemAdmin
      hi,

      with WAS 5 you need to use naming.jar instead of ns.jar.
      • SystemAdmin
        SystemAdmin
        6042 Posts
        ACCEPTED ANSWER

        Re: com.ibm.websphere.naming.WsnInitialContextFactory not found

        ‏2004-05-19T06:16:10Z  in response to SystemAdmin
        I am also having the same problem when I am trying to set the initial context to get EJB Home . Can somebody help me?
  • SystemAdmin
    SystemAdmin
    6042 Posts
    ACCEPTED ANSWER

    Re: com.ibm.websphere.naming.WsnInitialContextFactory not found

    ‏2004-07-14T09:39:20Z  in response to SystemAdmin
    please try ibmcor.jar!
    • SystemAdmin
      SystemAdmin
      6042 Posts
      ACCEPTED ANSWER

      Re: com.ibm.websphere.naming.WsnInitialContextFactory not found

      ‏2004-07-16T09:38:51Z  in response to SystemAdmin
      I didn't found this jar (ibmcor) in my websphere studio installation.

      Do you know where it is?
      • SystemAdmin
        SystemAdmin
        6042 Posts
        ACCEPTED ANSWER

        Re: com.ibm.websphere.naming.WsnInitialContextFactory not found

        ‏2004-07-26T19:52:31Z  in response to SystemAdmin
        Try using the ibmorb.jar. It can be found under <WSAD_INSTALLATION>\java\jre\lib\ext. Also try using Websphere runtime. You have to initialize the ORB's in your code if you plan to use Standard Java VM.
  • SystemAdmin
    SystemAdmin
    6042 Posts
    ACCEPTED ANSWER

    Re: com.ibm.websphere.naming.WsnInitialContextFactory not found

    ‏2004-09-21T04:54:54Z  in response to SystemAdmin
    The new error message is:
    java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ObjectURL
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)

    The class that is missing,
    com/ibm/CORBA/iiop/ObjectURL
    can be found in ibmorb.jar which is a part of the IBM jdk.
    I would suggest you include all the jars of IBM JDK in your classpath.
    The IBM jdk is located at the following location,
    WEBSPHERE_HOME/java/jre/lib/ext
    This should work.
    • SystemAdmin
      SystemAdmin
      6042 Posts
      ACCEPTED ANSWER

      Re: com.ibm.websphere.naming.WsnInitialContextFactory not found

      ‏2005-08-31T13:00:29Z  in response to SystemAdmin
      This is caused by your JRE, so replace sun one with IBM. everything will be ok
      • SystemAdmin
        SystemAdmin
        6042 Posts
        ACCEPTED ANSWER

        Re: com.ibm.websphere.naming.WsnInitialContextFactory not found

        ‏2011-01-24T15:49:14Z  in response to SystemAdmin
        That is correct...compiling in Sun JDK and executing in IBM Runtime (JRE) environment causes this issue. Just change your JRE to IBM JRE and it will resolve this issue.