Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

java.lang.VerifyError (a ClassPath problem?) #1667

Closed
berdario opened this issue Oct 10, 2014 · 2 comments
Closed

java.lang.VerifyError (a ClassPath problem?) #1667

berdario opened this issue Oct 10, 2014 · 2 comments
Labels

Comments

@berdario
Copy link

I created a minimal project/test-case, built from this and with the dependencies updated: it works with plain leiningen from the command line, but fails inside LT with java.lang.VerifyError

https://github.com/berdario/protobuf-example

According to this bug it could be a mismatch of the used protobuf runtime library, which is weird, since lein-protobuf builds its own version of protobuf and then uses it both for generating the code and for using it, but due to this other bug I can't know for sure. I believed that LT uses the same ClassPath as leiningen, but if that's not the case this might be an explanation for this bug.

I've been able to reproduce this issue on 2 different machines

Still happens with LT 0.6.7

original issue

@cldwalker
Copy link
Member

Thanks for reconfirming this is an issue. When I checkout your project on java 8 and osx9 and eval I get a popup with:

We couldn't connect
...
* Bunch of build info *
...
Compiling 1 source files to /Users/gabrielhorner/code/protobuf-example/target/classes
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:97: error: getUnknownFields() in Person cannot override getUnknownFields() in GeneratedMessage
        getUnknownFields() {
        ^
  overridden method is final
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:117: error: cannot find symbol
              if (!parseUnknownField(input, unknownFields,
                   ^
  symbol:   method parseUnknownField(CodedInputStream,Builder,ExtensionRegistryLite,int)
  location: class Person
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:149: error: cannot find symbol
        throw e.setUnfinishedMessage(this);
               ^
  symbol:   method setUnfinishedMessage(Person)
  location: variable e of type InvalidProtocolBufferException
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:152: error: cannot find symbol
            e.getMessage()).setUnfinishedMessage(this);
                           ^
  symbol:   method setUnfinishedMessage(Person)
  location: class InvalidProtocolBufferException
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:158: error: cannot find symbol
        makeExtensionsImmutable();
        ^
  symbol:   method makeExtensionsImmutable()
  location: class Person
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:169: error: cannot find symbol
          .ensureFieldAccessorsInitialized(
          ^
  symbol:   method ensureFieldAccessorsInitialized(Class<Person>,Class<Builder>)
  location: variable internal_static_Person_fieldAccessorTable of type FieldAccessorTable
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:183: error: method does not override or implement a method from a supertype
    @java.lang.Override
    ^
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:225: error: cannot find symbol
        if (bs.isValidUtf8()) {
              ^
  symbol:   method isValidUtf8()
  location: variable bs of type ByteString
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:268: error: cannot find symbol
        if (bs.isValidUtf8()) {
              ^
  symbol:   method isValidUtf8()
  location: variable bs of type ByteString
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:481: error: cannot find symbol
            .ensureFieldAccessorsInitialized(
            ^
  symbol:   method ensureFieldAccessorsInitialized(Class<Person>,Class<Builder>)
  location: variable internal_static_Person_fieldAccessorTable of type FieldAccessorTable
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:622: error: cannot find symbol
          parsedMessage = (Example.Person) e.getUnfinishedMessage();
                                            ^
  symbol:   method getUnfinishedMessage()
  location: variable e of type InvalidProtocolBufferException
/Users/gabrielhorner/code/protobuf-example/target/protosrc/Example.java:943: error: constructor FieldAccessorTable in class FieldAccessorTable cannot be applied to given types;
          internal_static_Person_fieldAccessorTable = new
                                                      ^
  required: Descriptor,String[],Class<? extends GeneratedMessage>,Class<? extends Builder>
  found: Descriptor,String[]
  reason: actual and formal argument lists differ in length
12 errors
Compilation of Java sources(lein javac) failed.

I'm not familiar enough with java compilation or protobuf to understand what's wrong here. I'll leave this open to see if others encounter this and have insight.

@cldwalker
Copy link
Member

Moved to LightTable/Clojure#66

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants