Anonymous | Login | Signup for a new account | 12-17-2024 11:33 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0005408 | [Resin] | major | always | 03-26-13 06:35 | 05-29-13 11:34 | ||||
Reporter | stefan_bieler2 | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 4.0.37 | Product Version | 4.0.35 | ||||
Product Build | |||||||||
Summary | 0005408: JSP recompilation on every request causing performance problems | ||||||||
Description |
We are currently facing a problem with Tag-Classes which do define inner classes (e.g. http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/jsp/taglib/UseAttributeTag.html, [^] which defines a nested class "Tei"). If a JSP-file is using such a Tag, the check for changes on the JSP, always return true (com.caucho.server.dispatch.PageFilterChain#140), which causes recompilation on every "jsp include". After some investigation, we found out, that this is due to the "UseAttributeTag.Tei" dependency's timestamp, which is always "-1" (com.caucho.make.ClassDependency#89). When stepping deeper into, we found out, that the call to "java.lang.Class#forName" in com.caucho.make.ClassDependency#84 is the problem, as it is using "UseAttributeTag.Tei" to reference the inner class, which leads to a "ClassNotFoundException". The correct reference to an inner class would be "UseAttributeTag$Tei". The ClassName-Reference is written while JSP-to-Servlet generation, resp. while Creating "dependency"-Entries. There, in com.caucho.make.ClassDependency#getJavaCreateString, an explicit replace for "$" to "." is taking place before writing out the ClassName to the generated servlet. Generated Servlet-Code looks as follows: public void init(com.caucho.vfs.Path appDir) throws javax.servlet.ServletException { com.caucho.vfs.Path resinHome = com.caucho.server.util.CauchoSystem.getResinHome(); com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath(); mergePath.addMergePath(appDir); mergePath.addMergePath(resinHome); com.caucho.loader.DynamicClassLoader loader; loader = (com.caucho.loader.DynamicClassLoader) getClass().getClassLoader(); String resourcePath = loader.getResourcePathSpecificFirst(); mergePath.addClassPath(resourcePath); com.caucho.vfs.Depend depend; depend = new com.caucho.vfs.Depend(appDir.lookup("..."), 3569174199620245524L, false); _caucho_depends.add(depend); depend = new com.caucho.vfs.Depend(mergePath.lookup("jar:file:/iad/ocn/dev/htdocs/WEB-INF/lib/tiles-jsp-2.2.2.jar!/META-INF/tld/tiles-jsp.tld"), -3290222249785851653L, false); _caucho_depends.add(depend); _caucho_depends.add(new com.caucho.make.ClassDependency("org.apache.tiles.jsp.taglib.UseAttributeTag.Tei", -246186801486030713L)); } Now the question is, why com.caucho.make.ClassDependency#getJavaCreateString is explicitly replacing "$" with ".". Is it a bug? Do we have to fix our setup? |
||||||||
Steps To Reproduce | |||||||||
Additional Information |
Environment: JDK 1.7.0_15 Resin 4.0.35 |
||||||||
Attached Files | |||||||||
|
There are no notes attached to this issue. |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed. 25 unique queries executed. |