views:

56

answers:

2

I have an external Jar ,

  • which is in the Project BuildPath
  • which is in the WEB-INF/lib folder

and Eclipse has no problem identifying the file.

But GWT complains by saing that the source code is not available.

[ERROR] Line 8: No source code is available for type javax.ws.rs.core.Application; 
did you forget to inherit a required module?

Do I have to explicitly tell it inherit it? But This is not a module.

Thanks.

A: 

Classpath:

Try placing the Jar into your \war\WEB_INF\lib\ folder so that it is packaged into the WAR and is available at runtime.

It should also be on your project buildpath as a library.

Other:

It seems your external jar is the JAX-RS jar? You may find the following <link> helpful: (under the "Deploying a RESTful Web service" heading)

This seems to indicate that you will have to modify the web.xml despite JAX-RS not being a GWT module.

Syntax
I have the jar in the lib folder too but I get the same error.
kunjaan
I realized that I had it in the client side. I moved it to the server side.
kunjaan
A: 

GWT is compiler, it ignores binary code in jar. Only source code matters. Some jars are packaged with source code, others are not. It seems you have a latter case here. Find a source code and create/repackage a jar.

Alexander Vasiljev