java.lang.VerifyError: Bad type on operand stack

1,122 views
Skip to first unread message

E. Ulrich Kriegel

unread,
Jan 21, 2016, 9:39:00 AM1/21/16
to vert.x
Hi there,
i use man to build a fat jar containing a REST service. The vertical starts, but when the REST-service is called, the following error occur.

java.lang.VerifyError: Bad type on operand stack

Exception Details:

  Location:

    de/fraunhofer/fokus/adep/FuzzyAttributeFinderWithFilter.findAux(Ljava/lang/String;Ljava/lang/String;Lio/vertx/ext/jdbc/JDBCClient;Lio/vertx/redis/RedisClient;Lde/fraunhofer/fokus/adep/Bloom;Lde/fraunhofer/fokus/adep/model/Query;Lio/vertx/core/Handler;)V @1009: invokedynamic

  Reason:

    Type 'java/lang/String' (current frame, stack[1]) is not assignable to 'de/fraunhofer/fokus/adep/FuzzyAttributeFinderWithFilter'

  Current Frame:

    bci: @1009

    flags: { }

    locals: { 'java/lang/String', 'java/lang/String', 'io/vertx/ext/jdbc/JDBCClient', 'io/vertx/redis/RedisClient', 'de/fraunhofer/fokus/adep/Bloom', 'de/fraunhofer/fokus/adep/model/Query', 'io/vertx/core/Handler', 'java/lang/String', 'io/vertx/core/json/JsonArray', integer, integer, integer, 'java/lang/String', 'java/lang/String', double, double_2nd, 'java/lang/String', 'io/vertx/redis/op/RangeLimitOptions' }

    stack: { 'io/vertx/ext/jdbc/JDBCClient', 'java/lang/String', 'java/lang/String', 'io/vertx/core/json/JsonArray', 'de/fraunhofer/fokus/adep/Bloom', 'de/fraunhofer/fokus/adep/model/Query', integer, double, double_2nd, 'io/vertx/redis/RedisClient', 'java/lang/String', 'io/vertx/core/Handler', 'io/vertx/redis/op/RangeLimitOptions' }

  ....


However, this error doesn't occur and everything runs fine, if the vertical is started via Eclipse!


The pom file is attached.


I really have no idea, how to fix that problemm


Thanks in advance


Ulrich

pom.xml

Paulo Lopes

unread,
Jan 21, 2016, 9:49:49 AM1/21/16
to vert.x
That does sound like a compiler error... Can you try to upgrade your JDK and see how it goes?

E. Ulrich Kriegel

unread,
Jan 21, 2016, 9:55:13 AM1/21/16
to vert.x
Hi Paolo,
i upgraded yesterday to Java(TM) SE Runtime Environment (build 1.8.0_72-b15)


On Thursday, January 21, 2016 at 3:39:00 PM UTC+1, E. Ulrich Kriegel wrote:

Paulo Lopes

unread,
Jan 21, 2016, 10:04:43 AM1/21/16
to vert.x
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8006684

Looks like it? claims to be fixed on 8b75

E. Ulrich Kriegel

unread,
Jan 22, 2016, 2:31:57 AM1/22/16
to vert.x

I tried 8b76 but it is still there. 
Why does the version compiled inside Eclipse using the auto build feature doesn't show this error. Both, mvn and eclipse use the same JDK?

E. Ulrich Kriegel

unread,
Jan 22, 2016, 3:00:48 AM1/22/16
to vert.x
Here are the differences:
  • Eclipse
    Main class: io.vertx.core.Launcher
    Start: run vehicle -conf ...
  • command line/mvn build
    Main class: io.vertx.core.Launcher
    Start: java -jar far.jar -conf ...

Paulo Lopes

unread,
Jan 22, 2016, 4:17:59 AM1/22/16
to vert.x
I'm no eclipse expert at all but If i remember correctly i think eclipse has its own internal compiler if that is still the case it could be that, that compiler is broken...

Can you try to compile and run just with the JDK tools, e.g.: from the command line using the right JAVA_HOME variable run "mvn clean install" and see if it behaves the same?

E. Ulrich Kriegel

unread,
Jan 22, 2016, 4:27:54 AM1/22/16
to vert.x
Paolo,
the command line build using mvn  with  jdk8_066 and idk8_072 was tested before i started to bother anyone ;-)

Paulo Lopes

unread,
Jan 22, 2016, 5:11:18 AM1/22/16
to vert.x
Can you try to strip down your project to the minimum so we have a reproducer and share it with us? I'd need to look at code/pom/run it locally to see what's going on...

E. Ulrich Kriegel

unread,
Jan 22, 2016, 5:15:21 AM1/22/16
to vert.x
I already tried, but i stripped to much, postgres database and redis. 
It will take a certain time

Tamás Cservenák

unread,
Jan 22, 2016, 5:35:50 AM1/22/16
to vert.x
Hi there,

Several possible reasons:
1- try "mvn clean install" to make sure no incremental compilation leftovers are in place and fresh copy is installed into local repo
2- if ${adep.version} is a maven SNAPSHOT, 1) might be needed for module vertx-foundation too (it might be stale, compiled against old)
3- re "works in eclipse": if you have opened both modules in eclipse workspace, m2e will _resolve it from workspace_, not local repo (as Maven CLI would do), hence the difference (workspace compiled by eclipse is probably up-to-date compared to maven local repo)

Hope helps (some of these)


On Fri, Jan 22, 2016 at 11:15 AM E. Ulrich Kriegel <ulrich....@gmail.com> wrote:
I already tried, but i stripped to much, postgres database and redis. 
It will take a certain time

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/a287e0b4-c6df-480a-9dbe-8bc24fd6d914%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

E. Ulrich Kriegel

unread,
Jan 22, 2016, 6:09:44 AM1/22/16
to vert.x

Thanks, 
but I always compile the parent project which than compiles all the modules.

To be sure, that there are no wrong jars are used, the complete path de in my m2-repository was removed. After that, mvn clean install was used. So, everything is up to date, but the problem still remains. Currently I'm stripping down the application to generate a test case 


E. Ulrich Kriegel

unread,
Jan 22, 2016, 11:52:04 AM1/22/16
to vert.x
Unfortunately, i didn't manage to build a demonstrator which runs without redis and a postgres database, but i found the source of trouble:

It is the last Observable.from(..).forEach  a hierarchy of Observable.from(...).forEach-Statements
If this statement is replaced by a simple for(int i=0; .....) loop, this error doesn't occur any more.

I intend to reorganize my code with the reactive vertx classes.

E. Ulrich Kriegel

unread,
Jan 24, 2016, 8:19:32 AM1/24/16
to vert.x
Even with Reactive redis and JDBC the error occurs. The error occurs in a helper class which contains static methods only.
If these helper classes is refactored to a normal class, which is initialized properly, the error doesn't occur any more, neither in the normal version nor in the rx-ified one. 

Paulo Lopes

unread,
Jan 25, 2016, 3:38:22 AM1/25/16
to vert.x
This is a compiler issue i think it should be reported against jdk bugzilla.
Reply all
Reply to author
Forward
0 new messages