views:

66

answers:

2

I'm extending the JFreeChart ChartComposite class. When I try to create the instance of extended class I'm getting java.lang.VerifyError : .... incompatible object argument for function call error.

+3  A: 

Practically speacking:

It mostly happens when you are compliing with one version of the library, but running with another version of the library.

More precisely, VerifyError is a type of LinkageError. From the javadoc of LinkageError: "Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class."

Suraj Chandran
I'm using two plugin in my project. The error occured after adding JFreeChart libraries to each plugin build path. I removed the libraries from one plugin and I implemented the extended class in other plugin. So when I use JFreeChart libraries in only one plugin I have no error.
penguru
@penguru...hmm can feel it:)
Suraj Chandran
@penguru so could u solve it
Suraj Chandran
Yes, I solve the problem. Thanks for the answers..
penguru
+1  A: 

It sounds like you are possibly running against a different version of the JFreeChart JAR than you compiled your code against - does the stack trace contain any information about what the problematic method is?

Another possibility would be that JFreeChart expects a particular version of some 3rd-party library on the classpath whereas you are running with a different version.

oxbow_lakes