Java / eclipse does not recognize Path GET annotation

1

I'm developing a Restful application, using eclipse and jersey (Without using framework).

But I'm having a problem with annotations like @Path, @GET. When I use these annotations it gives an error in the package line within the class. The following error:

  

The type java.lang.CharSequence can not be resolved. It is indirectly referenced from required .class file

And I believe that so every time I start the server / squeeze the application failed to access the data. For every time q access to uri that should return the data I get a

  

"HTTP Status 404- / FirstRestfl".

     

description The requested resource is not available

All the jersey lib's are added in the path and I'm using Tomcat 7 Códifo

line with error that I do not understand:

Archiveresoruce

Lib's

Web.xml:

Exceptionafterrunningtheapplication

Inthebrowser:

    
asked by anonymous 10.11.2015 / 18:43

1 answer

1

There is a very similar situation to your stackoverflow.com . For this answer the solution is in the Java version. JDK 1.8 supports default methods on the interfaces, which implied new methods in the interfaces legacy (JDK 1.7 or lower). CharSequence is a case ...

If your project was compatible with less than 1.8, you can not reference these default methods. According to the solution I mentioned (and I believe that is the case), there are two options:

  • Define JDK 1.7 as part of your solution and only use JDK1.7 compatible libs
  • Migrate definitively to JDK 1.8 (best option in my opinion).
  • 11.11.2015 / 00:35