hello Im having a problem trying to run a simple application that i developed. I have 2 components, a war file(WebApp1) and an ejb jar file (Ejb1). In the war file i have a servlet that calls a EJB bean in the jar file. The war file has a reference to the JNDI of the bean. The deploy gives me this error: Error: Class [ login ] not found in WEB-INF/classes or WEB-INF/lib. For [ /WebApp1 ] Error: class [ login ] cannot be found within this jar [ WebApp1 ]. So the servlet code gets a reference to the bean like this: loginHome home = (loginHome) PortableRemoteObject.narrow(objRef, loginHome.class); So obvisously the deploytool cant find the loginHome.class. But surely i shouldnt have to add this class to the web war? shouldnt it be able to find it from the ejb component???
Can someone polease shed a little light on this for me?? Dave
SCJP, SCWCD, SCBCD
Joined: Oct 08, 2003
(Note: deploytool with j2sdkee1.3.1) ok now its working, i had to completely setup a new application and add go through the "add component wizard" again. The deploytool is very erratic. I've been trying this for hours and its just worked for me now. Also the verifier is giving me the same error about the homeclass but when i actually deploy the app its fine???!!!???!!! Ive tried using Sun One Studio 5 SE and its not very intuitive to use. Very quickly becomes a mess when you use a few EJBs. Can anyone tell me what they use to create EJBs, Servlets and JSPs and deploy them???
Just an opinion... the Eclipse platform supports various plug-ins for Servlets/JSP and J2EE development. If you are doing Servlets/JSP there is a plug-in called Sysdeo Tomcat www.sysdeo.com/eclipse/tomcatPlugin.html that does a decent job of creating Web project deployment directory structures /WEB-INF, web.xml etc, and creates the associated WAR files with a configurable WAR file generator. It also lets you configure and run Tomcat 3, 4, or 5 from within the Eclipse IDE. (both the 2.1.2 release and the newer 3.0 milestone builds). As for EJBs along with servlets/JSPs, etc.) - ie: full J2EE apps, there are some other more complete plug-in frameworks for Eclipse like: http://www.myeclipseide.com/ http://www.lomboz.com/ These are usually compatible w/ Eclipse 2.1.x as 3.0 is not an official production release yet - currently at build M7) Hope that might help. [ February 20, 2004: Message edited by: Mark S ]