- Saved searches
- Use saved searches to filter your results more quickly
- java.lang.VerifyError: Expecting a stackmap frame at branch target 56 #16
- java.lang.VerifyError: Expecting a stackmap frame at branch target 56 #16
- Comments
- Saved searches
- Use saved searches to filter your results more quickly
- How to resolve «Expected stackmap frame at this location» #693
- How to resolve «Expected stackmap frame at this location» #693
- Comments
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.VerifyError: Expecting a stackmap frame at branch target 56 #16
java.lang.VerifyError: Expecting a stackmap frame at branch target 56 #16
Comments
When using the suggested workaround from #15 — to add dontpreverify — I get this (with dontoptimize ):
Error: Unable to initialize main class com.company.util.DbTools Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 56 Exception Details: Location: com/company/util/DbTools.main([Ljava/lang/String;)V @2: ifne Reason: Expected stackmap frame at this location. Bytecode: 0000000: 2abe 9a00 36b2 009e b801 1eb8 011e b801 0000010: 1eb8 011e b801 1eb8 011e b801 1eb8 011e 0000020: b801 1eb8 011e b801 1eb8 011e b801 1eba 0000030: 0159 0000 b601 10b1 2ab8 00f8 2ab8 00f5 0000040: 4b2a 0332 4c2b 4d02 3e2c b601 1aab 0000 0000050: 0000 008c 0000 0006 ce00 38c9 0000 0065 0000060: eb12 2233 0000 0073 0035 ce71 0000 0057 0000070: 38b6 e557 0000 003b 3f14 d5ab 0000 0081 0000080: 5d58 82ba 0000 0049 2c12 27b6 0118 9900 0000090: 4b03 3ea7 0046 2c12 35b6 0118 9900 3d04 00000a0: 3ea7 0038 2c12 3eb6 0118 9900 2f05 3ea7 00000b0: 002a 2c12 43b6 0118 9900 2106 3ea7 001c 00000c0: 2c12 42b6 0118 9900 1307 3ea7 000e 2c12 00000d0: 36b6 0118 9900 0508 3e1d aa00 0000 009c 00000e0: 0000 0000 0000 0005 0000 0026 0000 002c 00000f0: 0000 0032 0000 0077 0000 008c 0000 0092 0000100: b800 e6a7 007b b800 f7a7 0075 2ab8 00f5 0000110: 4b2a b801 2a12 31b9 0151 0200 3604 1504 0000120: 02a0 0007 2aa7 000d 2a03 1504 b801 2bc0 0000130: 0046 1504 02a0 0009 b200 9fa7 0010 2a15 0000140: 0404 602a beb8 012b c000 46b8 00f6 a700 0000150: 302a b800 f54b 2ab8 00f4 a700 243a 0504 0000160: b801 1ca7 001b b800 f9a7 0015 2ab8 00f5 0000170: b800 faa7 000b b200 9d12 1eb6 0110 b1 Exception Handler Table: bci [342, 346] => handler: 349
And this without dontoptimize :
Error: Unable to initialize main class com.company.util.DbTools Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 56 Exception Details: Location: com/company/util/DbTools.main([Ljava/lang/String;)V @2: ifne Reason: Expected stackmap frame at this location. Bytecode: 0000000: 2abe 9a00 36b2 009e b801 16b8 0116 b801 0000010: 16b8 0116 b801 16b8 0116 b801 16b8 0116 0000020: b801 16b8 0116 b801 16b8 0116 b801 16ba 0000030: 0151 0000 b601 08b1 2a59 4cbe 9d00 0eb2 0000040: 009d 1220 b601 08a7 0031 2b03 3203 bd00 0000050: 7db8 0143 b901 4501 00b6 011f b800 b2a7 0000060: 0019 4db2 009d 2b03 32ba 016b 0000 b601 0000070: 082c b200 9db6 011d 2ab8 00f0 594b 0332 0000080: 4c02 3d2b b601 12ab 0000 008a 0000 0006 0000090: ce00 38c9 0000 0063 eb12 2233 0000 0071 00000a0: 0035 ce71 0000 0055 38b6 e557 0000 0039 00000b0: 3f14 d5ab 0000 007f 5d58 82ba 0000 0047 00000c0: 2b12 27b6 0110 9900 4b03 3da7 0046 2b12 00000d0: 35b6 0110 9900 3d04 3da7 0038 2b12 3eb6 00000e0: 0110 9900 2f05 3da7 002a 2b12 43b6 0110 00000f0: 9900 2106 3da7 001c 2b12 42b6 0110 9900 0000100: 1307 3da7 000e 2b12 36b6 0110 9900 0508 0000110: 3d1c aa00 0000 02f3 0000 0000 0000 0005 0000120: 0000 0026 0000 004a 0000 0057 0000 0095 0000130: 0000 02bf 0000 02eb b800 f312 67b6 010b 0000140: 4cbb 0099 59b7 012f 2bba 016c 0000 b601 0000150: 3057 b800 a4b1 4db8 00a4 2cbf b200 9db8 0000160: 00dc b400 9ab6 0107 b12a b800 f059 4bb8 0000170: 0122 1231 b901 4902 0059 3c02 a000 072a 0000180: a700 0c2a 031b b801 23c0 0046 1b02 a000 0000190: 09b2 009f a700 0f2a 1b04 602a beb8 0123 00001a0: c000 46b8 00f1 b12a b800 f04b 2a4c b800 00001b0: dd4d 1243 01b8 00bf 57bb 0065 59b7 00da 00001c0: b801 2dbb 0052 592c b700 b559 4bb8 00e4 00001d0: 594e 1240 b600 c3c0 005a 3a04 bb00 5259 00001e0: 2c12 2612 24b9 013a 0300 b700 b559 3a05 00001f0: 1224 1904 b901 3201 00b8 00e7 1905 1904 0000200: b901 3201 002d 1241 b600 c3c0 008e b800 0000210: e8b8 00a3 b601 054e 1006 bd00 7c59 0312 0000220: 0453 5904 2c12 29b9 013d 0200 5359 0512 0000230: 0353 5906 123b 5359 0712 0253 5908 2db9 0000240: 0144 0100 53b8 00d9 3a04 1239 1904 b800 0000250: d8a7 0015 593a 04b2 009d b601 06b8 012c 0000260: b801 2e19 04bf bb00 5259 2c12 2612 25b9 0000270: 013a 0300 b700 b53a 0419 05b8 00e5 3a06 0000280: 1904 b800 e53a 042b b801 25b8 00cd ba01 0000290: 6d00 00ba 016e 0000 b901 5004 00c0 0060 00002a0: b600 d04c 1904 1906 1905 2a2b b800 e912 00002b0: 2b06 bd00 7c59 0312 2553 5904 1224 5359 00002c0: 0512 2553 b801 114b 06bd 007c 5903 2c12 00002d0: 29b9 013d 0200 5359 0412 0153 5905 2a53 00002e0: b800 d94c 1238 2bb8 00d8 b801 2cb8 012e 00002f0: 2db8 00c7 b14b b200 9d12 11b6 0108 2ab2 0000300: 009d b601 06b1 594b b200 9db6 0118 06bd 0000310: 007c 5903 2c12 29b9 013d 0200 5359 0412 0000320: 0153 5905 122c 53b8 00d9 4c12 382b b800 0000330: d8a7 0013 4cb2 009d 1212 b601 082b b200 0000340: 9db6 0106 2db9 0144 0100 05bd 007d 5903 0000350: 2c12 29b9 013d 0200 c000 7d53 5904 123c 0000360: 53b8 0143 4e08 bd00 7c59 0312 0453 5904 0000370: 2c12 29b9 013d 0200 5359 0512 0353 5906 0000380: 123b 5359 072d b901 4401 0053 b800 d94c 0000390: 123a 2bb8 00d8 a700 134c b200 9d12 13b6 00003a0: 0108 2bb2 009d b601 062a bf4b b801 2cb8 00003b0: 012e 2db8 00c7 a700 134c b200 9d12 11b6 00003c0: 0108 2bb2 009d b601 062a bf57 04b8 0114 00003d0: b1b8 00f3 b200 9b12 16b8 00be b600 a7b8 00003e0: 00b1 59b8 012a 57ba 016f 0000 b600 fcb6 00003f0: 00fa 57b8 00a4 b14c b800 a42b bf2a b800 0000400: f0b8 00f2 b1b2 009d 121e b601 08b1 Exception Handler Table: bci [74, 95] => handler: 98 bci [315, 338] => handler: 342 bci [536, 593] => handler: 596 bci [752, 756] => handler: 757 bci [676, 746] => handler: 774 bci [782, 817] => handler: 820 bci [836, 918] => handler: 921 bci [676, 746] => handler: 939 bci [946, 950] => handler: 953 bci [774, 940] => handler: 939 bci [980, 1011] => handler: 1015 bci [428, 971] => handler: 971
Any ideas what might be wrong?
The text was updated successfully, but these errors were encountered:
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to resolve «Expected stackmap frame at this location» #693
How to resolve «Expected stackmap frame at this location» #693
Comments
I’m using powermock in my code base for quite a while. After minor modification to the code, I’m getting this error when running «mvn clean install». I’m wondering how to investigate an drill down this issue.
- Using OpenJDK 1.7.0_55 on debian linux x86_84
- Using powermock latest version (1.6.5)
- All the test are running using Java Agent (@rule public PowerMockRule rule = new PowerMockRule())
- I’m compiling my code for java 1.6 (enforced using maven-compiler-plugin)
java.lang.VerifyError: Expecting a stackmap frame at branch target 17 Exception Details: Location: org/neo4j/jdbc/Driver.createExecutor(Ljava/lang/String;Ljava/util/Properties;)Lorg/neo4j/jdbc/QueryExecutor; @4: ifnonnull Reason: Expected stackmap frame at this location. Bytecode: 0000000: 2ab4 0024 c700 0dbb 00b3 5912 b5b7 00b8 0000010: bf2a b400 242b 2cb9 00ba 0300 b0
The text was updated successfully, but these errors were encountered:
@thekingnothing, I’m using powermock 1.5.5 and javassist 3.18.2-GA , but still I’m getting the same error.
Any idea why it’s failing or how we can fix this? We don’t want to use -noverify .
@risha8h if you’re using gradle
add lines below to your build.gradle — should do the trick
java.lang.VerifyError: Expecting a stackmap frame at branch target 95
Exception Details:
Location:
com/paypal/report/paymentinfo/bl/impl/XYZ.()V @37: if_acmpeq
Reason:
Expected stackmap frame at this location.
Bytecode:
0000000: 2ab7 0001 2a00 0000 0001 4c01 4d13 0195
0000010: b801 9803 bd00 2213 019a b801 9cb8 01a0
0000020: 4e2d b201 a2a5 003a 2dc1 01a4 9900 2bb8
0000030: 01aa 1301 abb8 01ad 1301 afb8 01b4 a700
0000040: 07b8 01bc bf01 b601 c0b6 01c4 01b6 01c9
0000050: c000 024d a700 082d c000 024d a700 0bbb
0000060: 0002 59b7 01cb 4d2c b500 04b1
Exception Handler Table:
bci [56, 62] => handler: 65
at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2531) at java.lang.Class.privateGetPublicMethods(Class.java:2651) at java.lang.Class.getMethods(Class.java:1467) at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.getTestMethods(PowerMockJUnit44RunnerDelegateImpl.java:95) at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.(PowerMockJUnit44RunnerDelegateImpl.java:71) at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl.(PowerMockJUnit47RunnerDelegateImpl.java:42) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:144) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:39) at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:217) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.(JUnit4TestSuiteChunkerImpl.java:59) at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.(AbstractCommonPowerMockRunner.java:32) at org.powermock.modules.junit4.PowerMockRunner.(PowerMockRunner.java:31) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
I was getting above issue. The resolution was to add a javassist dependency (added in test scope)
javassist javassist 3.12.1.GA test
Then, I was getting some error like «NoClassDefFound org/mockito/mock/MockNam»
Which was because of the version compatibility issue between Mockito and PoweMock-API. The below mentioned version worked for me
org.powermock powermock-module-junit4 1.5.4 test org.powermock powermock-api-mockito 1.4.12 test
Thanks everyone for your inputs