Tuesday, November 23, 2010

java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.replacePath(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder;

When you see this error, it means UriBuilder is being loaded from other libraries like cxf-2.1.3.jar. Just rename it to z-cxf-2.1.3.jar. It should work fine.

9 comments:

  1. You can add javax.ws.rs-api-2.0-m01.jar in your build path

    May be this will resolve your problem

    ReplyDelete
  2. If you are using jersey bundle.jar it will already cointain a version of UriBuilder class. But in my project I also had javax.ws.rs-api-2.0.jar which by its time also contained UriBuilder class. So I removed jaxax.ws.rs-api-2.0.jar and everything worked without AbstractMethodError. Notice I was doing jax-rs and not jax-ws. André Cesta

    ReplyDelete
  3. Thanks Andre, It solved my same problem

    ReplyDelete
  4. thanks , i removed javax.ws.rs-api-2.0.jar from build path and it solved my problem also.

    ReplyDelete
  5. Thanks, I remove the jax2.0.jar and it worked for me.

    ReplyDelete