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.
views:
66answers:
2Practically 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."
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.