• Post Reply Bookmark Topic Watch Topic
  • New Topic

Create Exception

 
ashok ganesan
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i m using SUN APPLICATION SERVER 8.0 to run my ejb programs. when my clients calls the business methods in ejb it throws the following exception
i could not understand what it means ... if someone could help me to get rid off it ......
error :java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB: java.lang.reflect.InvocationTargetException; nested exception is:
javax.ejb.EJBException: nested exception is: javax.ejb.CreateException:
Could not create stateless EJB: java.lang.reflect.InvocationTargetException



thanks in advance

ashok
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To start with, two things to check:

1. is the bean deployed on the server?

2. the client code that calls the bean.
 
ashok ganesan
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi thanks Edvins ,
i checked from the deploy tool that my application is running in the server .
the following is the piece of code for creating the EJB

String deployName = "cartBean" ;
Context ic = new InitialContext();
Object o = (Object)ic.lookup(deployName);
cartHome ch = (cartHome)PortableRemoteObject.narrow(o,cartHome.class);
cartRemote cr = ch.create();


but the error occurs when i call the business methid using my remote object

that is cr.businessmethod()

still i couldnot figure out the wher the problem is ...
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. You need to check whether the bean(within the application) is deployed, and by which name it is available in JNDI.
2. In the client code above, it is likely that at some point you get a null reference. When?
3. The client needs to access the directory to which the bean is bound, for example by supplying server-specific application properties. Check this in the docs or in a product-specific forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!