[
https://issues.jboss.org/browse/JASSIST-177?page=com.atlassian.jira.plugi...
]
ami tabak commented on JASSIST-177:
-----------------------------------
I noticed a mismatch between the ojdbc6.jar manifest and the actual major number of the
problematic class in the example. The class major number is 50 but the manifest states jar
was build using java 1.5 which as far as I understand should result in major number 49.
I see that javassist bases its decision whether to support the java6 based on the major
number. Could it be that Oracle had a bug on their side in one of the compilers which
wrote the wrong major number to the class file ? Is there any other way to verify class
file structure?
javassist.bytecode.BadBytecode on weblogic.jdbc.jts.Driver:
-----------------------------------------------------------
Key: JASSIST-177
URL:
https://issues.jboss.org/browse/JASSIST-177
Project: Javassist
Issue Type: Bug
Affects Versions: 3.17.0-GA
Reporter: ami tabak
Assignee: Shigeru Chiba
Priority: Critical
Fix For: 3.17.1-GA
Attachments: javassist-3-17-GA-weblogicBugSample.zip,
weblogicBugSampleWithOracleDriver.zip
Once upgraded from 3.13 to 3.17 GA started receiving the following error:
Might be reappearance of JASSIST-125.
I tried to run the test with JDK 1.5 / 6/ 7 Same result.
java version:1.6.0_16
test: loading class data from pool:weblogic.jdbc.jts.Driver
(2)javassist.CtMethod@3b9ab065[public connect
(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;]
Found method:(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;
Fetching method attribute:
Exception in thread "main" javassist.CannotCompileException: by
javassist.bytecode.BadBytecode: connect
(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection; in
weblogic.jdbc.jts.Driver: dead code detected at 664. No stackmap table generated.
at javassist.CtBehavior.insertBefore(CtBehavior.java:773)
at javassist.CtBehavior.insertBefore(CtBehavior.java:730)
at com.optier.bug.report.Test.main(Test.java:76)
Caused by: javassist.bytecode.BadBytecode: connect
(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection; in
weblogic.jdbc.jts.Driver: dead code detected at 664. No stackmap table generated.
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:103)
at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:423)
at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:405)
at javassist.CtBehavior.insertBefore(CtBehavior.java:764)
... 2 more
Caused by: javassist.bytecode.BadBytecode: dead code detected at 664. No stackmap table
generated.
at javassist.bytecode.stackmap.MapMaker.fixDeadcode(MapMaker.java:314)
at javassist.bytecode.stackmap.MapMaker.fixTypes(MapMaker.java:297)
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:151)
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:100)
... 5 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira