aspose file tools
The moose likes EJB and Other Java EE Technologies and the fly likes (to Kyle Brown) question about calling a no-ejb class's method in ejb method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and Other Java EE Technologies
Reply Bookmark "(to Kyle Brown) question about calling a no-ejb class Watch "(to Kyle Brown) question about calling a no-ejb class New topic
Author

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

liang sun
Ranch Hand

Joined: May 12, 2001
Posts: 51
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

Joined: May 12, 2001
Posts: 51
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

Joined: Apr 20, 2000
Posts: 3252
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

Joined: Aug 10, 2001
Posts: 3878
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.


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
 
subject: (to Kyle Brown) question about calling a no-ejb class's method in ejb method
 
Threads others viewed
question about calling a no-ejb class's method in ejb method
dependant class paths in WAS 4.0
Java Compilation tips
How to make utility JAR's in EAR's available to WAR's....
Attn Kyle,Problem with classpath(Urgent)
IntelliJ Java IDE