0

Possible Duplicate:
What causes java.lang.IncompatibleClassChangeError?

I am doing vehicle tracking system project using eclipse 1.6. I was execute the client code, its working properly. But if I import the same code in eclipse, the jar file is created successfully. When I was run that code, I am getting an IncompatibleClassChangeError.

I am getting this error when I am using an if condition to check validity of a location.

Error:

java.lang.IncompatibleClassChangeError: com/nxp/telematics/location/Location.isValid()Z 
at com.nxp.atop.LocationListenerExample.locationUpdated(LocationListenerExample.java:28) 
at com.nxp.telematics.location.LocationProvider$1.locationUpdated(LocationProvider.java:101) 
at com.nxp.telematics.location.AbstractLocationFilter.locationUpdated(AbstractLocationFilter.java:86) 
at com.nxp.telematics.location.TimingFilter.deliver(TimingFilter.java:271) 
at com.nxp.telematics.location.TimingFilter.access$800(TimingFilter.java:66) 
at com.nxp.telematics.location.TimingFilter$DeliveryAttemptTask.run(TimingFilter.java:136) 
at java.util.Timer$TimerImpl.run(Timer.java:207) 

I think its not a program error. Please help me.

Community
  • 1
  • 1

1 Answers1

-2

This means that you have made some incompatible binary changes to the library without recompiling the client code. Java Language Specification S13 details all of such changes, most prominantly, changing non-static non-private fields/methods as static or visa-versa.

Recompile the client code against the new library, and you should be good to go.

UPDATE: If you publish a public library, you should avoid making incompatible binary changes as much as possible to preserve what's known as "binary backward compatibility". Updating dependency jars alone ideally shouldn't break the application or the build.

shreyansh jogi
  • 2,082
  • 12
  • 20
  • actually what i did is 1.import the client code in my eclipse,2.building the path,3.build.xml -> run as -> 2 ant build -> click the "clean" check box -> run -> again click the check box "jar(default)" and "compile" ->run.. is this right or can u help me how to recompile in eclipse? – user1934458 Jan 08 '13 at 05:53