Newbie Error? Unresolvable JacksonAnnotation(s)

101 views
Skip to first unread message

clou...@gmail.com

unread,
Jul 21, 2017, 4:30:34 PM7/21/17
to RestyGWT
Hi there!

I have a project that uses GWT-RPC and I thought I'd look into swapping over to our REST services that are available, but currently not being used.  Unfortunately, I seem to be having trouble getting my project to compile with resty-gwt.  I recently upgraded to GWT 2.8.1 and am developing in Eclipse.

First I updated the dependencies to pull down the requisite jars (Ivy.xml):
        <!-- Resty GWT -->
       
<dependency org="org.fusesource.restygwt" name="restygwt" rev="2.2.0" transitive="true" conf="*->*" />

Next, the appropriate entries in the gwt.xml file:
    <!-- Resty GWT -->
   
<inherits name="org.fusesource.restygwt.RestyGWT"/>
   
<inherits name="com.github.nmorel.gwtjackson.GwtJackson" />
   
<set-property name="restygwt.encodeDecode.useGwtJackson" value="true" />

Next, a simple service:
import javax.ws.rs.GET;

import org.fusesource.restygwt.client.MethodCallback;
import org.fusesource.restygwt.client.RestService;

public interface MyService extends RestService {
   
@GET
   
public void getHelloWorld(MethodCallback<String> callback);
}

Then on to creating the service object:
Resource resource = new Resource(GWT.getModuleBaseURL());
MyService cmfS = GWT.create(ConfigurationManagementService.class);
((RestServiceProxy)cmfS).setResource(resource);
The Resource URL won't be correct, but just trying to compile at this point.

When I start up Super Dev Mode I get numerous warnings in the form of:
   Resolving com.fasterxml.jackson.annotation.JacksonAnnotationsInside
     
Found type 'com.fasterxml.jackson.annotation.JacksonAnnotationsInside'
         
[WARN] Ignoring unresolvable annotation type com.fasterxml.jackson.annotation.JacksonAnnotation

And compilation fails similarly:
snip
Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JacksonAnnotationsInside
snip
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.annotation.JacksonAnnotationsInside

I'm guessing this would be a relatively simple problem to address, however the solution escapes me and I seem to be stuck unable to even get a fairly simple use of resty-gwt to compile.  Is there something simple I am missing here?

Thanks for any insights!

Ali Jalal

unread,
Jul 22, 2017, 6:32:56 AM7/22/17
to rest...@googlegroups.com
Hi,

It seems that you do not have jackson-annotations-*.jar in project classpath (or SuperDevMode classpath). Please make sure that necessary jars added to the classpath.


Regards,
Ali

--
You received this message because you are subscribed to the Google Groups "RestyGWT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to restygwt+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

clou...@gmail.com

unread,
Jul 24, 2017, 2:49:23 PM7/24/17
to RestyGWT
Oddly enough, the various jackson-*.jars were present, with a single exception.  While jackson-annotations-2.7.2-sources.jar was present, jackson-annotations-2.7.2.jar was not, thus the compilation error.  I had to specifically pull that jar down as such.

Ivy.xml
        <!-- Resty GWT -->
       
<dependency org="org.fusesource.restygwt" name="restygwt" rev="2.2.0" transitive="true" conf="*->
*" />
       
<dependency org="com.fasterxml.jackson.core" name="jackson-annotations" rev="2.7.2" conf="*->*">
           
<artifact name="jackson-annotations" />
       
</dependency>
Odd situation, but there it is if anyone else encounters the same problem.
To unsubscribe from this group and stop receiving emails from it, send an email to restygwt+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages