ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Cannot instantiate class: com.ibm.websphere.naming.WsnInitia

Post new topic  Reply to topic
 Cannot instantiate class: com.ibm.websphere.naming.WsnInitia « View previous topic :: View next topic » 
Author Message
vc1981
PostPosted: Thu Apr 12, 2007 9:27 pm    Post subject: Cannot instantiate class: com.ibm.websphere.naming.WsnInitia Reply with quote

Apprentice

Joined: 18 Jan 2006
Posts: 46

Hi ,

I have a java application as depicted below :


Hashtable env = new Hashtable ();

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL,"iiop://localhost:2809");
env.put(Context.REFERRAL,"throw");

try{
ctx = new InitialDirContext(env);


}catch(Exception e){
System.err.println("Error in Context Factory Lookup"+ e.getMessage() );
}
try{
factory = (QueueConnectionFactory)ctx.lookup("jms/TestJMSMQCF");

}catch(Exception e){

System.err.println("Error in Queue Connection Factory lookup"+ e.getMessage());
}





I have created the QCF with the JNDI name as jms/TestJMSMQCF in my WAS.This code gets compiled but when i try to execute the same i get a an error which says :

Error in Context Factory LookupCannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory
_________________
Regards ,
VC
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Apr 13, 2007 3:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Use the WebSphere Application Server Client environment.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vc1981
PostPosted: Sun Apr 15, 2007 10:10 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Jan 2006
Posts: 46

jefflowrey wrote:
Use the WebSphere Application Server Client environment.


Could you please point me to some documentation which tells me as to how i can go about doing this ?
_________________
Regards ,
VC
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Apr 16, 2007 12:53 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

vc1981 wrote:
jefflowrey wrote:
Use the WebSphere Application Server Client environment.


Could you please point me to some documentation which tells me as to how i can go about doing this ?


Piece of advice for new comers and JMS.
Start with the FILE Based JNDI. It is the most simple to setup and has the tiniest foot print.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
vc1981
PostPosted: Mon Apr 16, 2007 9:20 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Jan 2006
Posts: 46

[quote="fjb_saper"]
vc1981 wrote:
jefflowrey wrote:
Use the WebSphere Application Server Client environment.


Start with the FILE Based JNDI. It is the most simple to setup and has the tiniest foot print.


Yeah i did that couple of days back and now wanted to try the one with WAS and that 's when i am getting all these errors !
_________________
Regards ,
VC
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 17, 2007 6:30 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

vc1981 wrote:
Yeah i did that couple of days back and now wanted to try the one with WAS and that 's when i am getting all these errors !


Well if you try to use the WAS JNDI outside of WAS app server you need to use the J2EE client footprint and that one is quite massive....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Apr 17, 2007 7:31 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Actually, you can try this:

http://www-1.ibm.com/support/docview.wss?uid=swg24012804
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Cannot instantiate class: com.ibm.websphere.naming.WsnInitia
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.