Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 30928 invoked by uid 500); 18 Jul 2001 19:34:39 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 30917 invoked from network); 18 Jul 2001 19:34:39 -0000 Message-ID: <20010718193441.68773.qmail@web20009.mail.yahoo.com> Date: Wed, 18 Jul 2001 12:34:41 -0700 (PDT) From: Greg Merrill Subject: Research on XSP compile-time/run-time classpaths To: cocoon-users@xml.apache.org In-Reply-To: <3B5587F9.E0D48A8B@atmiralis.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I took a look at the XSP processing code to see if I could figure out why XSPs which compile cannot be run due to NoClassDefFoundExceptions. Here is what I found. (I am running Cocoon 1.8.2, so line numbers correspond to that version of the sourcecode.) Beginning in line 228 of org.apache.cocoon.processor.xsp.XSPProcessor, an attempt is made to determine the JSP classpath so it can be used for XSP compilation. It sequentially looks through several environment values to find the classpath; in my case, it finds it on the following lookup: this.servletContext.getAttribute("org.apache.tomcat.jsp_classpath") A printout of this value shows all of my WEB-INF/lib jars in the classpath. In line 257, the cached languageProcessors are each assigned this classpath. So far, so good. Later on down the road, there is a request to process my XSP. This results in a call to the process() method of XSPProcessor. It attempts to compile the XSP, and does so successfully, since the cached languageProcessor has been initialized with the correct classpath. However, when it tries to load & execute the compiled page thereafter (beginning line 523), we run into problems. As far as I can see, there was no resolution between the compile-time XSP classpath and the run-time classpath. Either I have failed to locate the code which adds necessary jars/classes from the XSP compilation classpath to the current runtime classpath, or there is a bug in the code. Does anyone know anything further about this issue? Can any Cocoon developers comment on this seeming discrepancy? --- Michael Bierenfeld wrote: > Greg Merrill wrote: > > > > Does XSP use a different classpaths at > compile-time > > and run-time? The reason I ask is because I'm > seeing > > the following strange behavior: > > > > I have an XSP which imports/uses some utility > classes > > which live in a jar file within my war's > WEB-INF/lib. > > When I access this XSP, it compiles just fine. I > can > > go to the repository & see both the .java and > .class > > file. > > > > However, when the XSP processor attempts to *run* > the > > compiled XSP, I get a NoClassDefFoundError; the > > message cites my utility class (remember, this > lives > > in a jar in WEB-INF/lib) as the class which can't > be > > located. > > > > Has anyone seen behavior like this before? I'm > > running JBoss w/embedded Tomcat. > > *gg* I am experiencing the same problems. must be > the weather or some > solar activity related phenomen. > > Regards > > Michael > > --------------------------------------------------------------------- > Please check that your question has not already been > answered in the > FAQ before posting. > > > To unsubscribe, e-mail: > > For additional commands, e-mail: > > __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: