JBoss Community

Javassist-3.16.0-GA LocalVariableTable invalid length exception

created by rcoe67 in Javassist - View the full discussion

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