Unable to properly link external Java library in Eclipse?

Check if build automatically is on :P. If not try turning it on for once.

Up vote 1 down vote favorite share g+ share fb share tw.

I've been struggling to properly integrate this Netflix Java Client to access Netflix's API into a very basic Eclipse Java Web Project. Whenever I try to publish any content referring to this library, I get errors like the following, indicating an inability to resolve the type of the classes in the external library I'm trying to use. Aug 20, 2011 11:48:42 AM org.apache.catalina.core.

StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp in context with path /OSNet03 threw exception Unable to compile class for JSP: An error occurred at line: 19 in the jsp file: /index. Jsp NetflixAPIClient cannot be resolved to a type 16: String myConsumerKey = new String("cefjbgekg7566cqrp2atua2n"); 17: String myConsumerSecret = new String("redacted"); 18: 19: NetflixAPIClient apiClient = new NetflixAPIClient(myConsumerKey, myConsumerSecret); 20: String uri = APIEndpoints. MOVIE_URI + "/2361637"; 21: String details = null; At the top of the file I include the proper class directories like this: And I don't receive any errors from Eclipse telling me it can't resolve the classes.

Only once I publish it to the server does this error occur. I've tried building with jre7 and jdk1.7.0. The library I'm trying to work with includes elements that are from Java v6 and v5.

I included the library by building it with Maven and placing the directory in my WEB-INF/lib folder and then including the jar netflix-client-2.3-SNAPSHOT. Jar in my Build Path. I've looked all over the web for possible causes and tried every prescribed solution I've found but none have worked.

You may be able to tell I'm very new to using Eclipse and Java Web Programming but I'm trying to figure things out as best I can as I go. Java eclipse maven netflix java-libraries link|improve this question asked Aug 20 '11 at 19:22Trespassers W375 83% accept rate.

Check if build automatically is on :P. If not try turning it on for once. If yes then check the project build path and look for libraries.

Check if the correct jars are there. Also check if your jars are not corrupted. These are the usual problems for more wait for sm1 else to answer.

You could also try searching for the resource class that can't be resolved using Ctrl+Shift+R and see if the class turns up. If you don't get it, then just extract the jar and see if the class is there for real.

Build automatically was on, the jars seem not to be corrupted insofar as I can see, and tried with both a downloaded binary and with a version I built myself (no build errors on that) from the source with Maven, still the same problem. The classes are all there as well when I Ctrl+Shift+R them, and Eclipse recognizes everything, it's just my Tomahawk Server that seems not to. – Trespassers W Aug 20 '11 at 21:23 Then is not an eclipse problem at all.

The problem is in the classpath defined for your tomahawk server. Does it accept any other libraries that you have put in web-inf/lib? You might wanna check the location of the deployment in tomahawk if its is not the same then check if the jar is present there.

– MozenRath Aug 21 '11 at 6:44 Interesting, is there something I need to do to especially configure the Tomahawk server to accept this outside library? I was under the impression that when I "built as server" in Eclipse, there were no real differences between what Eclipse said the server could run and what the server could actually run. I suppose that was pretty naive.

The other external libraries I'm using are in metadata/plug-ins, and they are working properly. I'll try to place the netflix library there as well and see what happens. – Trespassers W Aug 21 '11 at 6:52 did it work?

Please accept if it does :) – MozenRath Aug 21 '11 at 12:38 I'm telling eclipse to publish the library to the server, but I don't know how to check to see if it's actually on there. I don't think this resolves the issue, but maybe I'm missing something about how to publish the dependency properly? – Trespassers W Aug 21 '11 at 16:52.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions