• 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

problem running Client program

 
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I run the Client program , I get the following error. Please check my classpath settings given below. Where is the problem ?
D:\Ravindra\Weblogic\statelessSession>java examples.ejb.basic.statelessSession.Client
Connection made to server
Cannot instantiate class: weblogic.jndi.IIOPInitialContextFactory
D:\Ravindra\Weblogic\statelessSession>set classpath
classpath=.;c:\j2sdkee1.2.1\lib\j2ee.jar;c:\jdk1.3lib\dt.jar;c:\jdk1.3\lib\tools.jar;c:\XmlParser\jaxp1.0.1\jaxp.jar;c:\XmlParser\jaxp1.0.1parser.jar;c:\Inprise\vbroker\lib\vbjorb. jar;c:\Inprise\vbroker\lib\vbjdev.jar;c:\Inprise\vbroker\lib\migration.jar;c:\Inprise\vbroker\lib\vbdev.jar;d:\weblogic\lib\weblogicaux.jar;d:\weblogic\lib\weblogicbeans.jar;d:\web logic\lib\poolorb.jar
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IIOPInitialContextFactory.class is located in
d:\weblogic\classes\jndi\cosnaming\IIOPInitialContextFactory
I am using the following code in my Client for making connection to server
private static Context getInitialContext() throws NamingException {
try {
// Get an InitialContext
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.IIOPInitialContextFactory");
h.put(Context.PROVIDER_URL,"t3://localhost:7001");
System.out.println("Connection made to server");
return new InitialContext(h);
} catch (NamingException ne) {
System.out.println(ne.getMessage());
throw ne;
}
}
I have tried giving value of weblogic.jndi.cosnaming.IIOPInitialContextFactory for the
property Context.INITIAL_CONTEXT_FACTORY
The problem remain same i.e Cannot instantiate class
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ravi
Try adding your own directory to the classpath and execute.
Regards
Suneel
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Suneel,
Thanks for the suggestion, I have been able to run the client.
I had to make certain changes to succesfully execute the client. This I have gathered after going through some sites. Some important points are
weblogicaux.jar should always be the first in the list of library files in the classpath
The system environment settings are as follows :
classpath
.;%WL_HOME%\lib\weblogicaux.jar;%J2EE_HOME%\lib\j2ee.jar;c:\jdk1.3\lib\dt.jar;c:\jdk1.3\lib\tools.jar;c:\XmlParser\jaxp1.0.1\jaxp.jar;c:\XmlParser\jaxp1.0.1\parser.jar;c:\Inprise\v broker\lib\vbjorb.jar;c:\Inprise\vbroker\lib\vbjdev.jar;c:\Inprise\vbroker\lib\migration.jar;c:\Inprise\vbroker\lib\vbdev.jar;%WL_HOME%\lib\poolorb.jar;d:\weblogic\classes;
J2EE_HOME
c:\j2sdkee1.2.1
WL_HOME
d:\weblogic
path
.;c:\jdk1.3\bin;c:\Inprise\vbroker\bin;d:\weblogic\bin;
regds
Ravi
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use the same Client program exactly as given in the documentation of your Weblogic installation examples
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the command to execute the client program which is given in weblogic examples ejb basic statelessSession is as follows
D:\Ravindra\Weblogic\statelessSession>java examples.ejb.basic.statelessSession.Client t3://
calhost:7001 system weblogic
where The username for the privileged user is ALWAYS "system" and password being used is "weblogic"
 
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic