DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41766>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41766

           Summary: apache-tomcat-5.5.20-src.tar.gz includes broken class
                    files
           Product: Tomcat 5
           Version: 5.5.20
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


If one downloads and unpacks apache-tomcat-5.5.20-src.tar.gz, one can observe
that some of the .class files in it are broken.

For example:

$ /usr/java/jdk1.5/bin/java -classpath
./connectors/jk/jkstatus/build/classes/org/apache/jk/status JkServer

Exception in thread "main" java.lang.ClassFormatError: Unknown constant tag 97
in class file JkServer
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


When we rebuild tomcat ourselves, our resultant .class files are OK.

When we compare your original and our .class files, we observe that the
differences are that where you have 0x0a bytes, we have 0x0d bytes.

E.g. if we hex dump
./connectors/jk/jkstatus/build/classes/org/apache/jk/status/JkServer.class,
your file reads:

                        VV  
0000160: 4669 6c65 0100 0a4a 6b53 6572 7665 722e  File...JkServer.
0000170: 6a61 7661 0c00 0e00 0f0c 0009 000a 0c00  java............

whereas our is:
                        VV 
0000160: 4669 6c65 0100 0d4a 6b53 6572 7665 722e  File...JkServer.
0000170: 6a61 7661 0c00 0e00 0f0c 0009 000a 0c00  java............

The length of the string 'JkServer.java' is 13 chars (0x0d), and not
the 10 chars (0x0a) which your length byte tells us.


Looks to me like you're got an erroneous end-of-line character translation
happening, perhaps in your source code versioning system.

We now delete all your .class files because they are suspect.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to