- This topic has 5 replies, 3 voices, and was last updated 15 years, 7 months ago by rmcvay.
-
AuthorPosts
-
sechassMemberI have problems with JSP compilation in tomcat which is launched inside of (My)Eclipse.
The Runtime for tomcat is JDK 1.5.018 (full JDK – not only JRE).
The project can be deployed. tomcat starts without problems.
The access to the JSP from the browser results in a compiler exception.I have searched the web. In most cases missing libraries (tools.jar, servlet.jar, …) were missing or a JRE instead of a JDK was missing. But in this case seems to be different. I have added those libraries to the classpath in Lauch configuration of Eclipse/Tomcat.
It is strange for me, that on one computer the problem was solved by referencing to the JDK – but it still remains on an other computer.
## ERROR [http-8080-1] (Log4JLogImpl.java:275) – ServletException in doPost:
org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:574)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at de.tmobile.ecare.wi.servlets.ECareRequestHandler.forward(ECareRequestHandler.java:79)
at de.tmobile.ecare.wi.servlets.DeveloperRequestHandler.getPortalAuthentification(DeveloperRequestHandler.java:80)
at de.tmobile.ecare.wi.servlets.ECareRequestHandler.handle(ECareRequestHandler.java:91)
at de.tmobile.ecare.wi.servlets.AuthorisationServlet.proceedWithLogin(AuthorisationServlet.java:323)
at de.tmobile.ecare.wi.servlets.AuthorisationServlet.doPost(AuthorisationServlet.java:210)
at de.tmobile.ecare.wi.servlets.AuthorisationServlet.doGet(AuthorisationServlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at de.tmobile.ecare.wi.servlets.NoCacheFilter.doFilter(NoCacheFilter.java:115)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at de.tmobile.ecare.wi.servlets.Log4jSupportFilter.doFilter(Log4jSupportFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -2
at org.eclipse.jdt.internal.compiler.parser.Parser.concatExpressionLists(Parser.java:1138)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeDimWithOrWithOutExprs(Parser.java:2565)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:5543)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8839)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9062)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9019)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:7707)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:371)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:397)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:413)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
… 37 more
sechassMemberAnother hint:
The .java files in the work directory of tomcat are generated. But the compilation to .class files obviously fails.
support-joyMembersechass,
I need to understand your current configuration. Can you answer couple of questions for me –
1. What is your installation detail? Can you copy and paste your MyEclipse installation details. You can get it from MyEclipse > Installation Summary > Installation Detail.
2. Check Window > Preferences > MyEclipse Enterprise Workbench > Java Enterprise Project > Web Project > Deployment tab > Library deployment policies.
3. If you have changed the project specific deployment policies then right click on your project > properties > MyEclipse > Web > Deployment > Library Deployment Policies.
4. Can you attach the screenshots of 2 and 3.
5. Have you deployed using exploded archive or packaged archive?
6. Right click on your project > MyEclipse > Add/Remove Project Deployments > Select your deployment > click on [Browse]. Check if you have classes listed under WEB-INF.
7. Is this a new web application created in MyEclipse? Or have you imported any war file?
sechassMemberAnswers for above questions:
1: see below
2-4: I tried different configurations for “project > properties > MyEclipse > Web > Deployment”.The current configuration:
2: “Dependent Java Project Deployment Policy” = Use Smart Deployment
“Library Deployment Policies” = All checkboxes checked.
3: “Use workbench default settings” checked for both
5: exploded archive
6. classes contained under WEB-INF/classes. The libraries under WEB-INF/lib were copied depending on the configuration of 3. I tried to copy the libs manually, too.
7. This is a new webapplication project in MyEclipse, but i imported web.xml + source code + libraries from other eclipse projects.*** Date:
Donnerstag, 2. April 2009 15.28 Uhr CEST** System properties:
OS=WindowsXP
OS version=5.1.0
Java version=1.5.0_11*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 7.0
Build id: 7.0-20081201*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 7.0
Build id: 7.0-20081201Eclipse Platform
Version: 3.4.1.r341_v20080731-9I96EiDElYevwz-p1bP5z-NlAaP7vtX6Utotqsu
Build id: M20080911-1700Eclipse Java Development Tools
Version: 3.4.1.r341_v20080709-0800-7o7tEAfEF_U5qyUgrb2HAp539P97
Build id: M20080709-0800Eclipse Graphical Editing Framework GEF
Version: 3.4.1.v20080806-67718083A56B4H2A3213573
Build id: 200809101400Eclipse RCP
Version: 3.4.100.r341_v20080814-989JESIEdAciFYfkZZsBfSwQ2341
Build id: M20080703-0800Eclipse Plug-in Development Environment
Version: 3.4.1.r341_v20080731-7T7U0E9mlRIuGUYviF_VP
Build id: M20080703-0800Insallation detail:
Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\Program Files\Genuitec\MyEclipse 7.0\myeclipse.exe
-name
Myeclipse
–launcher.library
C:\Program Files\Genuitec\MyEclipse 7.0\../Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
-startup
C:\Program Files\Genuitec\MyEclipse 7.0\../Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
-clean
-configuration
configuration
-vm
C:\Program Files\Genuitec\Common\binary\com.sun.java.jre.win32.x86_1.5.0.011\bin\client\jvm.dll
support-joyMembersechass,
Thanks for the details. Can you check web.xml, and review the entries, since you are using the same web.xml from your earlier application. I am wondering if the problem lies there.
You can download any simple JSP application from Examples on Demand and deploy using tomcat, if this works, we can eliminate that you don’t have a problem with settings/configurations.
rmcvayMemberIt still really sounds like that Tomcat is running on a JRE.
-
AuthorPosts