• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JNDI Context problem

 
Ranch Hand
Posts: 83
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to do a lookup of JMS Queue , I get the following error:

Could not create JNDI API context: javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory]

My Code is as follows:



Can any body let me know where I am going wrong? Do I need to set any classpath for it to work?

Thanks
Dinakar.K
 
author and cow tipper
Posts: 5000
1
Hibernate Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The jar containing this file seems to not be on your classpath:

com.ibm.websphere.naming.WsnInitialContextFactory

Find that class, and you should be good.

-Cameron McKenzie
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which server version you are using there? if 6.1 then check properties might be you need this :

< !-- IBM ORB Properties -->
property name="org.omg.CORBA.ORBClass" value="com.ibm.CORBA.iiop.ORB"

else check for that perticular class and load thar JAR to classpath.

good luck ...
[ January 30, 2008: Message edited by: Ravi Nikam ]
 
Ranch Hand
Posts: 42
Oracle Spring Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have this problem too, and I am trying to configure WAS 6 and 7 to use Apache ActiveMQ to create and use a Queue.
The code I am using is pretty similar to the one posted here in the first post, and I get an error when the code reaches this line:



This is the error:



The code above runs on Websphere where I have defined a QueueConnectionFactory and a Queue named "jms/systemMessageQueue" which exists on ActiveMQ (up and running).

I really don't understand why this happens, even if I tried to add the jar file to the classpath as suggested.

Can somebody help me please?
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to add MQ client jars to your app classpath. You can find some MQ client jars inside the MQ connector in WebSphere at ${WEBSPHERE_HOME}/AppServer/installedConnectors the MQ libs are inside the .rar file called: wmq.jmsra.rar



 
Francesco Bellini
Ranch Hand
Posts: 42
Oracle Spring Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, it seems that it was a bug of activemq. The snapshot version 5.8.0 seems to be bug free as regard such problem.
 
    Bookmark Topic Watch Topic
  • New Topic