• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jars required to run stanalone application for Websphere Application Server 5.0.1

 
Greenhorn
Posts: 15
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it worked.....
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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);
}
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
william afonso
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi William,
Were you able to find a solution to your problem ?
I am facing the same now.

TIA
 
Greenhorn
Posts: 2
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic