This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Websphere and the fly likes Jars required to run stanalone application for Websphere Application Server 5.0.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Jars required to run stanalone application for Websphere Application Server 5.0.1" Watch "Jars required to run stanalone application for Websphere Application Server 5.0.1" New topic
Author

Jars required to run stanalone application for Websphere Application Server 5.0.1

Seema
Greenhorn

Joined: Aug 05, 2002
Posts: 15
What all jar files are required to run a stanalone client for Websphere Application Server 5.0.1.
I am not able to run this code.
try {
Hashtable hash = new Hashtable();
hash.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
hash.put(Context.PROVIDER_URL,"iiop://test2.dev.prodigy.net:2809");
jndiContext = new InitialContext(hash);
System.out.println("Got Initial Context : "+ jndiContext);
} catch (NamingException e) {
System.out.println("Could not create JNDI API " +
"context: " + e.toString());
e.printStackTrace();
System.exit(1);
}

try {
System.out.println("Before Lookup Topic Factory");
TopicConnectionFactory topicConnectionFactory = (TopicConnectionFactory)jndiContext.lookup("TestTopicConnectionFactoryJNDI");
System.out.println("After Lookup Topic Factory");
topic = (Topic) jndiContext.lookup(topicName);
System.out.println("After Lookup TopicName ");
} catch (NamingException e) {
e.printStackTrace();
System.exit(1);
}

Its giving me this error :
Could not create JNDI API context: javax.naming.ConfigurationException: The prop
erty com.ibm.ws.naming.wsn.factory.initial is not set. The most likely cause is
that the jar which contains the file com/ibm/websphere/naming/jndiprovider.prope
rties cannot be found by the class loader.
javax.naming.ConfigurationException: The property com.ibm.ws.naming.wsn.factory.
initial is not set. The most likely cause is that the jar which contains the fil
e com/ibm/websphere/naming/jndiprovider.properties cannot be found by the class
loader.
at com.ibm.websphere.naming.WsnInitialContextFactory.init_implClassCtor(
WsnInitialContextFactory.java:190)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(W
snInitialContextFactory.java:108)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
74)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255
)
at javax.naming.InitialContext.init(InitialContext.java:231)
at javax.naming.InitialContext.<init>(InitialContext.java:207)
at TopicPublisher.main(TopicPublisher.java:59)
Sateesh Velaga
Greenhorn

Joined: Nov 18, 2004
Posts: 1
Please include the following files in the classpath - wssec.jar, naming.jar, namingclient.jar, lmproxy.jar,sas.jar and ecutils.jar in your classpath when you are trying to run a J2EE client outside of a J2EE Container. Also include the folder which has implfactory.properties in your classpath. I tried this and it worked for me.
JavaReach javareach
Greenhorn

Joined: Dec 21, 2005
Posts: 1
Yes it worked.....
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

JavaReach javareach, please refer to the JavaRanch naming policy http://www.javaranch.com/name.jsp on proper names for these forums. Normally, I don't even notice, but your name stuck out.


My Blog: Down Home Country Coding with Scott Selikoff
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

"Seema" and "JavaReach javareach", welcome to the ranch. Please take a few moments to read the Javaranch naming policy. We try to be friendly around here but we do have our rules, and not following the naming policy can result in having your account deleted.

Thanks.


A good workman is known by his tools.
parthasarathy madhira
Ranch Hand

Joined: Aug 31, 2001
Posts: 41
hi sateesh,

I am similarly trying to run an application client and I got the same error.

I have all the jars that you listed in the classpath.

But still I get the same error.

Any idea?

Thanks in advance
Partha
Usha Yedla
Greenhorn

Joined: Jan 19, 2006
Posts: 1
Hi,
I am unable to look up an object in WebSPhere 6.0
I get the following exception:

javax.naming.NamingException: Failed to initialize the ORB. Root exception is java.lang.ClassCastException
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:82)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:174)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:97)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:73)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:386)

And heres the code that I used to lookup

try {
//Hashtable properties = new Hashtable();
Properties properties= new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
properties.put(Context.PROVIDER_URL, "iiop://172.21.5.130:2809/");
context = new InitialContext(properties);
System.out.println(" Before returning the context object" + context);
Object queueFactory = context.lookup("TestJms");
System.out.println("InitialContextFactory: "+queueFactory);
} catch(Exception e) {
e.printStackTrace();
System.exit(-1);
}
william afonso
Greenhorn

Joined: Jan 20, 2006
Posts: 2
Hi,
I am getting the following Error for the code Below for a JMS standa lone application

Could not create JNDI API context: javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: NameService:Connection refused: connect:host=localhost,port=5557]


Can I be given a solution to this problem.
Thanks
william afonso
Greenhorn

Joined: Jan 20, 2006
Posts: 2
Hi,
I am getting the following Error for the code Below for a JMS standa lone application

Could not create JNDI API context: javax.naming.ConfigurationException: COS Name Service not registered with ORB under the name 'NameService' [Root exception is org.omg.CORBA.ORBPackage.InvalidName: NameService:Connection refused: connect:host=localhost,port=5557]
sarvananda sarvananda
Greenhorn

Joined: Mar 20, 2007
Posts: 21
Hi William,
Were you able to find a solution to your problem ?
I am facing the same now.

TIA
reinout korbee
Greenhorn

Joined: Dec 17, 2005
Posts: 2
Just as a reference for those we stumble upon this post while digging tgrough google with the same issue. I found that the following jar files are needed:

com.ibm.mq.jar
com.ibm.mqbind.jar
com.ibm.mqjms.jar
connector.jar
ecutils.jar
ffdc.jar
fscontext.jar
ibmorb.jar
idl.jar
iwsorb.jar
jms.jar
jndi.jar
jta.jar
ldap.jar
lmproxy.jar
naming.jar
namingclient.jar
ras.jar
rmm.jar
sas.jar
utils.jar
wsexception.jar
Jorge Morales
Greenhorn

Joined: Mar 28, 2012
Posts: 1
thanks a lot to everyone who wrote this posts.
Here still I'm using WAS 5.1 and recently had a problem that solved with it.
 
 
subject: Jars required to run stanalone application for Websphere Application Server 5.0.1
 
Similar Threads
javax.jms.JMSException: Communication exception.
On which port iiop protocol listens in Websphere application server 5.0.1
JNDI Context problem
Connecting to J2EE Server installed in Solaris
Unable to get JNDI lookup for JMS Topic Connection Factory