Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
changePi Challenge 15 76
maven example error 3 35
what is a "java.lang.System Property"   ? 20 37
eclipse java  build path 6 21
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

706 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now