When I tried to start up my web application, it would fail with the error:
A class file of the class name com.sun.jersey.oauth.server.api.Providers.DefaultOAuthProvider is identified by the class could not be found.
In my "lib" folder, I also had jars for Tomcat (i.e. catalina-ant.jar and servlet-api.jar). When I got the error above, I was using jars from Tomcat 5.x. I swapped out those jars for those from Tomcat 7.x. Doing this caused the error to change to the following:
Missing OAuthProvider class name in the configuration. Make sure 'com.sun.jersey.config.property.oauth.provider' property is set.
After fiddling with more things, such as changing the order of the Jars in Eclipse (i.e. right click on the project name --> Properties --> Java Build Path --> Order and Export), finally resolved the error. How? I noticed that the Jersey jars I were using were from Jersey 1.5. I upgraded them to Jersey 1.8 and that made the error go away for me.
Maybe I should start using Maven! But I already use ANT....
No comments:
Post a Comment