You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/03/15 16:37:01 UTC

DO NOT REPLY [Bug 52919] New: WebappClassLoader.clearReferencesJdbc is not loading the exact content of the JdbcLeakPrevention.class file

https://issues.apache.org/bugzilla/show_bug.cgi?id=52919

             Bug #: 52919
           Summary: WebappClassLoader.clearReferencesJdbc is not loading
                    the exact content of the JdbcLeakPrevention.class file
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: kelapure@gmail.com
    Classification: Unclassified


org.apache.catalina.loader.WebappClassLoader.clearReferencesJdbc() is
incorrectly reading org/apache/catalina/loader/JdbcLeakPrevention.class file
from disk causing extra bytes in the byte[] passed to
java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain).

Having extra bytes at the end of a .class file has always been illegal.  This
did NOT cause any issues in the past because in previous JDK releases, the test
for this condition rarely active. 

Oracle change their behaviour in java 6 to mark this as an error consequently
any extra bytes leads to errors like these

Caused by: java.lang.ClassFormatError: JVMCFRE118 extra bytes after EOF;
class=com/ibm/ws/runtime/component/JdbcLeakPrevention, offset=2499

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 52919] WebappClassLoader.clearReferencesJdbc is not loading the exact content of the JdbcLeakPrevention.class file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52919

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 52919] WebappClassLoader.clearReferencesJdbc is not loading the exact content of the JdbcLeakPrevention.class file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52919

--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> 2012-03-15 15:53:13 UTC ---
With what exact version of Java and what exact version of Tomcat are you
observing an error? Or it is just a theoretical speculation?  I assure you that
many people are using Tomcat 7 with Java 6.

It does not matter whether there are extra unused bytes in the bytes array,
because offset and length of the used part of the array are explicitly
specified in the call. The offset is always "0" and the length is provided by
variable named "offset" which counts the bytes that have been read into the
classBytes array.

I am closing this as INVALID, unless you can provide some evidence.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 52919] WebappClassLoader.clearReferencesJdbc is not loading the exact content of the JdbcLeakPrevention.class file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52919

--- Comment #2 from Rohit Kelapure <ke...@gmail.com> 2012-03-15 15:58:35 UTC ---
Upon closer inspection of the code I have realized that this is not an issue. 
Please cancel this defect

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org