File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Problems in EJB/JSP Deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problems in EJB/JSP Deployment" Watch "Problems in EJB/JSP Deployment" New topic
Author

Problems in EJB/JSP Deployment

Ketan KC Chachad
Ranch Hand

Joined: Nov 23, 2003
Posts: 76
Hi,

I have got Sun Microsystem's J2EE 1.4 SDK installed on Windows 2000 system. I have written an EJB class SessBeanObj which implements SessionBean interface and the EJBObject and Home interfaces are SessBean and SessHome respectively. The method declared in SessBean and implemented in SessBeanObj is reverse() that simply reverses the given parameter string and returns this reversed string.
Well I've created an Application file (.ear) and within it the .war and .jar files are present. The web component is a JSP file by the name index.jsp. I've used the Deployment Tool provided in the SDK and while deploying, no errors were generated. But when I access the application through the browser, the following error message is displayed

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:132)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:356)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:420)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:444)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:557)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)

Can any one tell me what the exact problem could be? If required I'll paste the code i've written in both the Java and JSP files.
Another doubt I've in mind is that if the JSP file given as the Web Component is not named index.jsp then when the application is accessed the name of the JSP file is shown as a link. Does this mean that the name of the web component file (JSP file) should be index.jsp??


Regards,<br />Ketan KC Chachad
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems in EJB/JSP Deployment