http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2471 *** shadow/2471 Fri Jul 6 01:25:53 2001 --- shadow/2471.tmp.12655 Fri Jul 6 01:25:53 2001 *************** *** 0 **** --- 1,33 ---- + +============================================================================+ + | ClassCast Exception with ExtensionHandlerJava::getFromCache | + +----------------------------------------------------------------------------+ + | Bug #: 2471 Product: XalanJ2 | + | Status: NEW Version: 2.0.1 | + | Resolution: Platform: All | + | Severity: Critical OS/Version: Other | + | Priority: Other Component: org.apache.xalan.extens | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + When I'm using the java extension threw calls like : + + ... + <xsl:variable name="MyHash" select="java:java.util.Hashtable.new()" /> + <xsl:value-of select="java:put($MyHash,string('action'),$action)" /> + ... + + I have unpredictable crash in + org.apache.xalan.extensionsExtensionHandlerJavaPackage with class cast + exception for the returned Object of ExtensionHandlerJava::getFromCache. + In fact, the bug comes from a wrong key passes to this method which, in turn, + return the wrong type. ex: + Constructor c = (Constructor) getFromCache(methodKey, null, methodArgs); + should return a Constructor but the methodKey is for an other method (a + java.Method for exemple). + I don't know why this arise but I had to remove any calls to getFromCache to + get rid of this bug.