This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

home.create()=>failed : java.lang. NoClassDefFoundError  RSS feed

Bruno Korcinski
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I'm running example from Orion app.server ,everything works fine /compiling,running,binding,authentication,/but I stoped on the line
home.create() where I got error
Exception in thread "main" java.lang. NoClassDefFoundError
org/omg /PortableServer/ POAOperations

. I spent two days with investigations(setuping classpath..and looking on net for similar errors..etc.
I set-up debug for Orion but there is not enough info for me to correct problem.can somebody help me? I put some prints to log so you can see
classpaths and running CartClient program print out....
D:\orion2.0.2\orion\demo\ejb\cart>set classpath
D:\orion2.0.2\orion\demo\ejb\cart>cmd.exe /k java CartClient
************list of bind objects*************************************
java:comp, javax.naming.Context
MyProduct, ProductHome
MyCart, CartHome
com.evermind.ejb.EJBUser, com.evermind.ejb.EJBUserHome
************list of commands to get reference of MyCart object***********
1.Object homeObject = context.lookup(MyCart)...done.
2.CartHome home= (CartHome)PortableRemoteObject.narrow(homeObject, CartHome.class)...done.
Exception in thread "main" java.lang.NoClassDefFoundError: org/omg/PortableServer/POAOperations
at com.evermind._bp.invokeMethod(.:1420)
at com.evermind._oi.invoke(.:53)
at com.evermind._yp.invoke(.:22)
at __Proxy1.create(Unknown Source)
at CartClient.main(
code for CartClient
import java.rmi.RemoteException;
import javax.ejb.*;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import java.util.*;
* A simple client for accessing a Cart.
public class CartClient
public static void main(String[] args)
Context context;

Hashtable env = new Hashtable();
env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationClientInitialContextFactory");
env.put(javax.naming.Context.PROVIDER_URL , "ormi://localhost/ejbsamples");
env.put(javax.naming.Context.SECURITY_PRINCIPAL , "admin");

context = new javax.naming.InitialContext(env);

System.out.println("\n************list of bind objects**********");

NamingEnumeration items = context.list("");
while(items.hasMoreElements()) {
NameClassPair item = (NameClassPair);
System.out.println(" " + item.getName() + ", " +item.getClassName());

System.out.println("\n**list of commands to get reference of MyCart object\n");
Object homeObject = context.lookup("MyCart");
System.out.println("1.Object homeObject = context.lookup(MyCart)...done");
CartHome home =(CartHome)PortableRemoteObject.narrow(homeObject, CartHome.class);
System.out.println("2.Object CartHome home= (CartHome)PortableRemoteObject.narrow(homeObject, CartHome.class)...done");
Cart cart = (Cart)PortableRemoteObject.narrow(home.create(), Cart.class);
System.out.println("3.Cart = home.create();...done");

// Add some items to the Cart.

// Remove an item.

// Remove an unexistant item from the Cart, will generate a NotInCartException.
catch(RemoteException e)
System.err.println("System/communication error: " + e.getMessage());
catch(NamingException e)
System.err.println("Communication error: " + e.getMessage());
catch(CreateException e)
System.err.println("Error creating cart: " + e.getMessage());
catch(NotInCartException e)
System.err.println("Item not found in cart: " + e.getMessage());
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.2//EN" "">
<display-name>A simple cart jar</display-name>
<description>A demo cart bean package.</description>
<display-name>Shopping Cart</display-name>
<description>A simple shopping cart.</description>
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!