Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with my ejb application

 
Gajanan Kulkarni
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to deploy a small ejb application on Websphere 5.1


META-INF\ibm-ejb-jar-bnd.xmi contains

<ejbbnd:EJBJarBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejbbnd="ejbbnd.xmi" xmlns:ejb="ejb.xmi" xmi:id="EJBJarBinding_1135894932186">
<ejbJar href="META-INF/ejb-jar.xml#ejb-jar_ID"/>
<ejbBindings xmi:id="EnterpriseBeanBinding_1135894932186" jndiName="ejb/com/test/FirstEJBHome">
<enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#FirstEJB"/>
</ejbBindings>
</ejbbnd:EJBJarBinding>


Here is the code in my client file
Properties p = new Properties();
p.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
p.put("java.naming.provider.url", "iiop://localhost:2809/");
ic = new InitialContext(p);
System.out.println("b4 lookup");
Object myobj = ic.lookup("ejb/com/test/FirstEJBHome");

on loopup line it gives error as follows :
javax.naming.NamingException: The JNDI operation "lookup"on the context "localhost/nodes/localhost/servers/server1" with the name "ejb/com/test/FirstEJBHome" failed. Please get the root cause Throwable contained in this NamingException for more information. Root exception is java.lang.NoClassDefFoundError: com/ibm/ejs/jts/jts/CurrentFactory
at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4064)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3521)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.client.MyEJBClient.main(MyEJBClient.java:35)



can anybody help me out?
 
Gajanan Kulkarni
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any clues from anybody?
 
Mark Spritzler
ranger
Sheriff
Posts: 17290
9
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"GK"

Please click on the my profile link above and change your display name to be your real first and real last names to meet the JavaRanch Naming policy.

Thanks

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17290
9
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"java.lang.NoClassDefFoundError: com/ibm/ejs/jts/jts/CurrentFactory"

Tells you that it can't find this CurrentFactory class, which is in some jar file from IBM probably from its Websphere stuff.

The error you see looks to me like it is from the client side. Is there any exception showing on the server side. Either way it looks like you have a Jar file missing or sometimes an out of date jar file versus the class that is loaded by the class loader.

Mark
 
George Sanchez
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Mark =) the class must be in the classPath of WebSphere
but usually when you installe WebSphere all of its needed classes are already there.
Check your WebSphere installation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!