Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

(to Kyle Brown) question about calling a no-ejb class's method in ejb method  RSS feed

 
liang sun
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I must use manual means for adding no-ejb class to jar.
how to do?

***********************************************
I call a no-ejb class's method in ejb method,
import a.wu;
.....
public void bean_method()
{
wu k=new wu();
k.show();
}
..........
complie success,but in runTIME, throws
java.rmi.RemoteException: EJB Exception: ;
nested exception is: java.lang.NoClassDefFoundError: a/wu��
( NOTE: you must konw classpath of Class a.wu have already been set,complie success )
by liang sun
Kyle Brown
bartender posted November 09, 2001 09:28 AM
--------------------------------------------------------------------------------
It doesn't matter that you can compile the class -- that's a different classpath.
Make sure that your a.wu class is included inside the EJB JAR file along with your EJB classes and it should work fine.
Kyle
------------------
Kyle Brown,
******************************
 
liang sun
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I set path of Class a.wu to Classpath of application server.
but still can't solve question!
why?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An application server may well ignore the CLASSPATH; besides, it's not a good idea to put application-specific classes in a shared location like that. Have you tried Kyle's suggestion of including it in your EJB jar?
- Peter
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter. Yes, by all means TRY MY SUGGESTION!
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!