Closed GoogleCodeExporter closed 9 years ago
I have also replicated this problem, using jarjar-1.0rc6.jar with
mysql-connector-java-5.1.5.jar.
My ant task is
<jarjar jarfile="out.jar">
<zipfileset src="mysql-connector-java-5.1.5.jar"/>
</jarjar>
This always fails with an IllegalStateException
java.lang.IllegalStateException: ClassReader.accept() should be called with
EXPAND_FRAMES flag
at
com.tonicsystems.jarjar.asm.commons.LocalVariablesSorter.visitFrame(Unknown
Source)
at
com.tonicsystems.jarjar.asm.commons.RemappingMethodAdapter.visitFrame(Unknown
Source)
at com.tonicsystems.jarjar.asm.ClassReader.accept(Unknown Source)
at com.tonicsystems.jarjar.asm.ClassReader.accept(Unknown Source)
at
com.tonicsystems.jarjar.ext_util.JarTransformer.process(JarTransformer.java:39)
at
com.tonicsystems.jarjar.ext_util.JarProcessorChain.process(JarProcessorChain.jav
a:31)
at com.tonicsystems.jarjar.MainProcessor.process(MainProcessor.java:82)
at
com.tonicsystems.jarjar.ext_util.AntJarProcessor.zipFile(AntJarProcessor.java:55
)
at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:585)
at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:415)
at
com.tonicsystems.jarjar.ext_util.AntJarProcessor.execute(AntJarProcessor.java:42
)
at com.tonicsystems.jarjar.JarJarTask.execute(JarJarTask.java:50)
at org.apache.tools.ant.Task.perform(Task.java:341)
I added some debugging into the jarjar task and found that the error occurs when
JarTransformer.process() is called with an EntryStruct representing the class
JDBC4Connection.class found in the mysql jar file.
com/mysql/jdbc/JDBC4Connection.class
I'm afraid I don't know much about asm and haven't been able to debug further,
to see
what the actual problem is with processing this class.
Original comment by matt.r.p...@gmail.com
on 30 Jan 2008 at 10:25
Does the mysql-connector-java-5.1.5.jar contain classes compiled for Java 1.6?
Can
you attach it? There is an easy fix but it will hurt performance.
Original comment by chris.no...@gmail.com
on 7 Feb 2008 at 1:38
Fixed in SVN.
Original comment by chris.no...@gmail.com
on 7 Feb 2008 at 1:54
How about releasing a new RC that includes this fix? Thanks.
Original comment by fullung@gmail.com
on 3 Mar 2008 at 10:37
I am getting this same exception when I am trying to find dependencies between
the jars.
java -jar jarjar-1.0rc7.jar find jar activation-1.0.2.jar [very big long
classpath]
It doesn't do it all the time, but does appear to do it when there are java 6
compiled classes.
Original comment by jason...@gmail.com
on 24 Mar 2008 at 7:32
This issue is happening at my company as well.
Would be nice to have a RC with the fix, and tests that include Java 6.
Original comment by naa...@gmail.com
on 7 May 2008 at 2:32
Is this issue supposedly fixed in rc7? I have just started getting this (using
rc7).
I tried a fresh build from svn (checked out 06/31/08), but that had other
problems
and didn't get far enough to tell if this issue still existed.
Original comment by pdgro...@gmail.com
on 1 Jul 2008 at 3:17
I'm getting this issue in rc7
Original comment by dennis.p...@gmail.com
on 25 Jul 2008 at 8:35
I compiled my classes in jdk 1.5 (OSX) and I still get the EXPAND_FRAMES error.
Original comment by dennis.p...@gmail.com
on 27 Jul 2008 at 1:39
Change line 53 in DepFind.java to :
.accept(new DepFindVisitor(classes, source, handler),
ClassReader.SKIP_DEBUG ^ ClassReader.EXPAND_FRAMES);
Works for me!!
Original comment by tommymcg...@gmail.com
on 6 Aug 2008 at 1:37
Attachments:
This off course will only fix the issues for dependency generation.
Original comment by tommymcg...@gmail.com
on 6 Aug 2008 at 1:44
where do I get the fixed code from. I have version 1.1 and it gives the same
error?
Original comment by carl.rob...@gmail.com
on 19 Aug 2011 at 4:25
This is issue is NOT fixed in trunk!
Line 65 of src/main/com/tonicsystems/jarjar/DepFind.java needs to be changed
from:
ClassReader.SKIP_DEBUG);
to:
ClassReader.SKIP_DEBUG | ClassReader.EXPAND_FRAMES);
Please apply this change!
Original comment by pan...@gmail.com
on 6 Oct 2011 at 6:42
Original issue reported on code.google.com by
seancsaw...@gmail.com
on 10 Dec 2007 at 2:23