-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Trung,
On 11/14/12 10:18 AM, Duc Trung TRAN wrote: > We are trying to migrate Tomcat 5.5 to Tomcat 7. And We have > issues in an old application which make use of JspC class. In fact, > this application has an internal jsp templating and use JspC to > generate java files from templates. So it has an old version of > jasper-compiler.jar in it WEB-INF/lib. Stop right there. You can't use an older JSP compiler with a newer version of Tomcat: the JSP compiler references all kinds of Tomcat internal stuff that isn't compatible across versions (sometimes even across minor releases like x.y.1). You will have to update your compiler JAR in order for any of this to work. > In Tomcat 7, this application works but not all other > applications. There are errors as below. > > SEVERE: Servlet.service() for servlet [jsp] in context with path > [] threw exception [java.lang.AbstractMethodError: Yep, that's the kind of stuff that will happen to you if you have mismatched versions. > I suppose there is a classloader issue when we use old version of > jasper compiler (???). Perhaps, but the best thing to do would be to upgrade. > Because when we remove the old jasper-compiler.jar, all other > applications work but not the former :(. It reference indeed an old > method (JspC.setLog) which is removed in the new version of JspC. > And we don't have the source (only binary) of the application to > make change. How big is the application? Perhaps you could decompile the class that calls JspC.setLog, modify it, recompile it and put it back into your application. You could even do it as a separate JAR file earlier in the CLASSPATH. The best way to do that, actually, is to put the patched version into WEB-INF/classes because those take precedence over classes in WEB-INF/lib/*.jar. > Do you have any idea why old jasper-compiler (used inside an > application) provoke errors to other applications? Is it a bug? Or > is there some additional config to make it works? Oh, this breaks *other* applications? There may be some weirdness, here, because Tomcat internals might be polluted by classes loaded from a particular webapp. That definitely shouldn't happen if we can help it. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCj2H4ACgkQ9CaO5/Lv0PDbTwCggwSbRl3hoD/4jLkk2RvVEDry MYMAoKVBo0Xrsb/BIR6wVj+uVheO2llH =UMXY -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org