[jboss-jira] [JBoss JIRA] (JASSIST-225) VerifyError: Bad type on operand stack is thrown in Java 8 when calling a particular method.

Karthik Abram (JIRA) issues at jboss.org
Sun Jun 15 17:27:24 EDT 2014


     [ https://issues.jboss.org/browse/JASSIST-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthik Abram closed JASSIST-225.
---------------------------------



Thanks for the prompt feedback and help with the resolution. I now know how to interpret the statement "javassist doesn't support generics" - gotta think reified bytecode!

> VerifyError: Bad type on operand stack is thrown in Java 8 when calling a particular method.
> --------------------------------------------------------------------------------------------
>
>                 Key: JASSIST-225
>                 URL: https://issues.jboss.org/browse/JASSIST-225
>             Project: Javassist
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.18.2-GA
>         Environment: Java SE 1.8.0_05 64-bit
>            Reporter: Karthik Abram
>            Assignee: Shigeru Chiba
>         Attachments: javassist-error.zip
>
>
> Please see attached Eclipse project. In the JavassistErrorDemo.java if you run the program with line 64 uncommented, it works. However, including line 64 causes the program to fail with the following stack trace:
> Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
> Exception Details:
>   Location:
>     com/javassist/test/Student$CopyExtractor.getValueList(Ljava/lang/Object;)Ljava/lang/String; @58: invokevirtual
>   Reason:
>     Type 'java/lang/Object' (current frame, stack[0]) is not assignable to 'com/javassist/test/GradeConverter'
>   Current Frame:
>     bci: @58
>     flags: { }
>     locals: { 'com/javassist/test/Student$CopyExtractor', 'java/lang/Object', 'java/lang/StringBuilder', 'com/javassist/test/Student', 'java/lang/Object' }
>     stack: { 'java/lang/Object', 'com/javassist/test/Grade' }
>   Bytecode:
>     0000000: bb00 0c59 b700 104d 2bc0 0012 4e2c 2db6
>     0000010: 0016 b600 1a57 2c12 1cb6 001a 572c 2db6
>     0000020: 0020 b600 2357 2c12 1cb6 001a 5712 25b6
>     0000030: 002b 3a04 1904 2db6 002f b600 3357 2c2d
>     0000040: b600 2fb6 0036 572c b600 39b0 3a05 bb00
>     0000050: 3d59 1905 b700 40bf                    
>   Exception Handler Table:
>     bci [0, 76] => handler: 76
>   Stackmap Table:
>     same_locals_1_stack_item_extended(@76,Object[#59])
> 	at java.lang.Class.getDeclaredConstructors0(Native Method)
> 	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658)
> 	at java.lang.Class.getConstructor0(Class.java:2964)
> 	at java.lang.Class.newInstance(Class.java:403)
> 	at com.javassist.test.JavassistErrorDemo.makeClass(JavassistErrorDemo.java:83)
> 	at com.javassist.test.JavassistErrorDemo.main(JavassistErrorDemo.java:37)



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jboss-jira mailing list