wang-xinhong / protobuf

Automatically exported from code.google.com/p/protobuf
Other
0 stars 0 forks source link

java.lang.VerifyError: class RealtimeBidding$BidRequest overrides final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet #685

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Guys,

What steps will reproduce the problem?
1. Download and install 2.5.0 from here 
https://github.com/google/protobuf/releases
(./configure && make && make install)
$ protoc --version
libprotoc 2.5.0
2.Generate .java file: protoc --java_out=src/java/ 
resources/proto/realtime-bidding.proto --proto_path=resources/proto
3. lein run (it's actually clojure project and i  see 
com.google.protobuf/protobuf-java 2.5.0 on classpath)

I'm getting following error:

Exception in thread "main" java.lang.VerifyError: class 
RealtimeBidding$BidRequest overrides final method 
getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet
Caused by: java.lang.VerifyError: class RealtimeBidding$BidRequest overrides 
final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet;
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

I also saw that ticket https://code.google.com/p/protobuf/issues/detail?id=484 
but it didn't help.
RealtimeBidding.java is here 
https://gist.github.com/trybeee/6699dfd4dcc47b954432

Original issue reported on code.google.com by tryb...@gmail.com on 9 Jan 2015 at 10:43

GoogleCodeExporter commented 9 years ago
We don't have 2.5.0 on the github release page (the oldest there is 2.6.0). 
Could you check the version number again?

Original comment by xiaof...@google.com on 9 Jan 2015 at 10:48

GoogleCodeExporter commented 9 years ago
I'm getting the same error with 2.6.0

Original comment by tryb...@gmail.com on 9 Jan 2015 at 10:50

GoogleCodeExporter commented 9 years ago
Created example project to show the errors i get
https://github.com/trybeee/clojure-protobuf-example

Original comment by tryb...@gmail.com on 10 Jan 2015 at 7:46

GoogleCodeExporter commented 9 years ago
Ticket can be closed. 

Look for solution here 
https://github.com/trybeee/clojure-protobuf-example/pull/1

Original comment by tryb...@gmail.com on 11 Jan 2015 at 8:43