• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Create Exception  RSS feed

 
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
 
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.
 
Would you turn that thing down? I'm controlling a mind here! Look ... look at the tiny ad ...
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!