Solved

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

Posted on 2011-02-23
3
575 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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
map related example 6 59
servlet example 17 58
Eclipse Help Java EE 5,6,7 Documentation, why not Java EE 8 8 40
Java class and jar 3 41
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
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.

679 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