Greetings, oh most gracious and knowledgable tomcat-users community. I'm hopeful someone(s) of you can shed some light on our problem. We're encountering a 'Package does not exist' and 'cannot resolve symbol' errors when attempting to load some JSP pages. This error appears to be one that's been discussed at length on this group. I've reviewed many of the postings, and have tweaked our files in accordance with what I saw in the responses, but without success so far.
I'll try to present our configuration as concisely as I can, while still including enough information for someone to ascertain what's wrong. Below this short discussion of our problem, I've included the following pieces of information: o Configuration notes o Error message snippet displayed in the browser o Offending JSP portion o Contents of the nexlbundle.jar file The part that's got me stumped is that I've got multiple copies of the com.nexl.dmgr.DashboardUnmarshaller class and other com.nexl classes in places I think Tomcat should be looking to find them, yet it's still unable to find the package. The .java and compiled .class files are in /home/msdadm/htdocs/WEB-INF/classes/com/nexl/dmgr/, as well as in the nexlbundle.jar file in /home/msdadm/htdocs/WEB-INF/classes/lib/, and /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/shared/lib/. As you can see from the classpath listed in the error message below, all three of these directories are on the classpath. One other note, a trivial JSP page such as: 2 + 2 = <%= 2 + 2%> compiles and displays properly. It's just when you go including customized classes to make a useful page that things break down... :-) Thanks for reading, and hope you can help us! -matt ---------- Configuration notes o I generally followed PixelFreak's HOWTO to get the system set up. - http://www.pixelfreak.net/howto/apache2_jk2_tomcat/socket.html o We're running Apache 2.0.47, Tomcat 4.1.24/LE, and jk2 2.0.2, currently on a Mandrake Linux 9.1 system (this is merely a test-bed, and we'll be moving to Redhat later on). o I pulled down the Tomcat binaries, built the Apache from source, then built the jk2 from source so it matches up with the minor version of Apache. o Tomcat's server.xml points the localhost appBase at /home/msdadm/htdocs. I'm not sure what else might be helpful to put here. ---------- Error message snippet displayed in the browser The error message we're getting is (I edited the -classpath string to put carriage returns after the ':' to make the classpath a little easier to read): 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 An error occurred at line: 11 in the jsp file: /dashboardTree.jsp Generated servlet error: Project base dir set to: /usr/local/tomcat Detected Java version: 1.4 in: /usr/local/j2sdk1.4.2/jre Detected OS: Linux [javac] dashboardTree_jsp.java added as /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/work/Standalone/localhost/_/dashbo ardTree_jsp.class doesn't exist. [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Using external javac compiler [javac] Since fork is true, ignoring compiler setting. [javac] Compilation arguments: [javac] '-classpath' [javac] '/usr/local/java/lib/tools.jar: /usr/local/tomcat/bin/bootstrap.jar: /home/msdadm/htdocs/WEB-INF/classes: /home/msdadm/htdocs/WEB-INF/lib/dom.jar: /home/msdadm/htdocs/WEB-INF/lib/jaxp.jar: /home/msdadm/htdocs/WEB-INF/lib/jcommon-0.7.2.jar: /home/msdadm/htdocs/WEB-INF/lib/jfreechart-0.9.6.jar: /home/msdadm/htdocs/WEB-INF/lib/nexlbundle.jar: /home/msdadm/htdocs/WEB-INF/lib/rrdj.jar: /home/msdadm/htdocs/WEB-INF/lib/sax.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/shared/classes: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/shared/lib/sax.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/shared/lib/rrdj.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/shared/lib/jfreechart-0.9.6.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/shared/lib/jcommon-0.7.2.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/shared/lib/jaxp.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/shared/lib/dom.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/shared/lib/nexlbundle.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/classes: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/lib/servlet.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/lib/commons-logging-api.jar : /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/lib/commons-collections.jar : /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/lib/jasper-compiler.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/lib/naming-factory.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/lib/jasper-runtime.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/lib/naming-resources.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/lib/naming-common.jar: /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/common/lib/ant.jar' [javac] '-sourcepath' [javac] '/usr/local/jakarta-tomcat-4.1.24-LE-jdk14/work/Standalone/localhost/_' [javac] '-encoding' [javac] 'UTF8' [javac] '-g' [javac] [javac] The ' characters around the executable and arguments are [javac] not part of the command. [javac] File to be compiled: [javac] /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/work/Standalone/localhost/_/dashbo ardTree_jsp.java [javac] /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/work/Standalone/localhost/_/dashbo ardTree_jsp.java:14: package com.nexl does not exist [javac] import com.nexl.*; [javac] ^ [javac] /usr/local/jakarta-tomcat-4.1.24-LE-jdk14/work/Standalone/localhost/_/dashbo ardTree_jsp.java:89: cannot resolve symbol [javac] symbol : class DashboardUnmarshaller [javac] location: class org.apache.jsp.dashboardTree_jsp [javac] DashboardUnmarshaller dunmars = new DashboardUnmarshaller(); [javac] ^ This is followed by a series of similar 'cannot resolve symbol' messages... ---------- Offending JSP portion The top portion of the offending JSP reads as follows: <%@ page language="java" import="java.lang.*" %> <%@ page import="java.io.*" %> <%@ page import="java.util.*" %> <%@ page import="java.net.*" %> <%@ page import="java.sql.*,javax.servlet.*" %> <%@ page import="org.w3c.dom.*" %> <%@ page import="com.nexl.*" %> <jsp:useBean id="docref" class="com.nexl.xml.XmlAccessBean" scope="session" /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN" --> <% // Set the filename and report types based on the passed parameters // request.getParameter returns the data on the right hand side of an equals sign // it returns an empty string if the parameter exists but with no data // it returns null if the parameter does not exist String strNetWatch = request.getParameter("NetWatch"); String strParamHostType = request.getParameter("HostType"); String strParamHost = request.getParameter("Host"); String strParamService = request.getParameter("Service"); String strDashboardFile = "/home/msdadm/bbvar/dashboard/dashboard.xml"; String strWebPath = "/home/msdadm/htdocs/"; String strReportType = request.getParameter("ReportType"); docref.setXmlConnFile(strDashboardFile); Document docDashboard = docref.getXmlDocObject(); DashboardUnmarshaller dunmars = new DashboardUnmarshaller(); Dashboard thisDashboard = (Dashboard)dunmars.unmarshallDashboard(docDashboard.getDocumentElement()); %> ---------- Contents of the nexlbundle.jar file The contents of the nexlbundle.jar file are: [EMAIL PROTECTED] lib]$ jar tvf nexlbundle.jar 0 Thu Jul 17 16:33:54 EDT 2003 META-INF/ 68 Thu Jul 17 16:33:54 EDT 2003 META-INF/MANIFEST.MF 0 Thu Jul 17 16:32:18 EDT 2003 com/ 0 Thu Jul 17 16:32:18 EDT 2003 com/nexl/ 0 Thu Jul 17 16:32:58 EDT 2003 com/nexl/dmgr/ 841 Thu Jul 17 16:32:18 EDT 2003 com/nexl/dmgr/Dashboard.java 4081 Thu Jul 17 16:32:18 EDT 2003 com/nexl/dmgr/DashboardUnmarshaller.java 770 Thu Jul 17 16:32:18 EDT 2003 com/nexl/dmgr/Host.java 805 Thu Jul 17 16:32:18 EDT 2003 com/nexl/dmgr/HostType.java 764 Thu Jul 17 16:32:18 EDT 2003 com/nexl/dmgr/Service.java 1004 Thu Jul 17 16:33:10 EDT 2003 com/nexl/dmgr/Dashboard.class 980 Thu Jul 17 16:33:10 EDT 2003 com/nexl/dmgr/HostType.class 960 Thu Jul 17 16:33:10 EDT 2003 com/nexl/dmgr/Host.class 820 Thu Jul 17 16:33:10 EDT 2003 com/nexl/dmgr/Service.class 2989 Thu Jul 17 16:33:10 EDT 2003 com/nexl/dmgr/DashboardUnmarshaller.class 0 Thu Jul 17 16:32:44 EDT 2003 com/nexl/xml/ 1260 Thu Jul 17 16:32:18 EDT 2003 com/nexl/xml/XmlAccessBean.java 1512 Thu Jul 17 16:32:44 EDT 2003 com/nexl/xml/XmlAccessBean.class ---------- Matt Newby Senior Application Developer NEXL, Inc. 137 Summit Street Peabody, MA 01960 Phone: 978-538-3000 x520 Fax: 978-538-3033 [EMAIL PROTECTED] www.nexl.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
