Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Tomcat: getting error "PopulateSpreadsheet cannot be resolved to a type"

Posted on 2011-02-23
3
Medium Priority
?
595 Views
Last Modified: 2012-06-21
I have a jsp page that uses a class library located in the classes/pikefin folder. In the JPS page it is being imported with this line:
<%@ page import="pikefin.*" %>

BTW, this was all working fine until I changed some code in the class library and recompiled.

Here is the full error message from the tomcat log:
 
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: org.apache.jsp.jsp.JSPEssbase2.essbasedatasource_jsp
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
        at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
        at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:628)
        at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)

Open in new window


I checked the permissions on the .class files in :
/var/lib/tomcat6/webapps/JSPEssbase2/WEB-INF/classes/pikefin

and they are all set to 777.

I've restarted tomcat several times.
0
Comment
Question by:opike
  • 2
3 Comments
 

Author Comment

by:opike
ID: 34962216
Sorry, that error message I gave before is further down the log file.

This is the part that appears before that:
Feb 23, 2011 9:30:48 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 15 in the jsp file: /jsp/JSPEssbase2/essbasedatasource.jsp
PopulateSpreadsheet cannot be resolved to a type
12: <body>
13: <%
14: out.println(" Hello Oracle World5");
15: PopulateSpreadsheet tmp = new PopulateSpreadsheet();
16:
17: ArrayList<String[]> tmpArrayList = tmp.getArrayList();
18:

Open in new window


And a similar message appears in the browser:
An error occurred at line: 15 in the jsp file: /jsp/JSPEssbase2/essbasedatasource.jsp
PopulateSpreadsheet cannot be resolved to a type
12: <body>
13: <% 
14: out.println(" Hello Oracle World5");
15: PopulateSpreadsheet tmp = new PopulateSpreadsheet();
16: 
17: ArrayList<String[]> tmpArrayList = tmp.getArrayList();
18: 


Stacktrace:
	org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
	org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
	org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)

Open in new window

0
 
LVL 47

Accepted Solution

by:
for_yan earned 2000 total points
ID: 34962268
0
 

Author Comment

by:opike
ID: 34962359
Yeah... I know I had it working and then it stopped all of sudden. But now I realized what the problem was, the browser was using a cached older url that was only slightly different and I didn't noticed the difference until now.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question