[jboss-user] [Javassist] - Javassist-3.16.0-GA LocalVariableTable invalid length exception

rcoe67 do-not-reply at jboss.com
Thu Jan 5 11:17:18 EST 2012

rcoe67 [http://community.jboss.org/people/rcoe67] created the discussion

"Javassist-3.16.0-GA LocalVariableTable invalid length exception"

To view the discussion, visit: http://community.jboss.org/message/644876#644876

I'm using PowerMock's @PrepareForTest annotation, specifying my own class, DbUtil's QueryRunner.class, DbUtil's ResultSetHandler.class and DataSource.class.  Both my own class and QueryRunner.class cause javassist to throw an Invalid Length in LocalVariable Table.

I built from svn trunk the 3.16-GA library, because I saw the same behaviour with 3.15-GA.

java.lang.ClassFormatError: Invalid length 124 in LocalVariableTable in class file org/apache/commons/dbutils/QueryRunner
java.lang.ClassFormatError: Invalid length 1000 in LocalVariableTable in class file com/***/***/query/RemanenceSummaryQuery

The stack trace I receive is dependent on the order in which the clases are declared in the annotation list, i.e. if QueryRunner is before my Query, then I get the QueryRunner exception.

My declaration looks like:
@RunWith( PowerMockRunner.class )
@PrepareForTest( value = { RemanenceSummaryQuery.class, DataSource.class, QueryRunner.class,
                          ResultSetHandler.class } )
public class RemanenceSummaryQueryTest

If desired, I can upload the profile for my class but not sure how to generate one for QueryRunner.

Reply to this message by going to Community

Start a new discussion in Javassist at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120105/801675be/attachment.html 

More information about the jboss-user mailing list