Ignoring unresolvable annotation type

803 views
Skip to first unread message

randasin

unread,
Jun 1, 2011, 3:32:56 PM6/1/11
to Google Web Toolkit
I have one annotation and one object.

com.example.model.shared.MyAnnotation
com.example.model.shared.MyObject

MyObject is declared with MyAnnotation:

@MyAnnotation
public class MyObject {
...
}

When I compile, I am getting this warning

[java] Resolving com.example.model.shared.MyObject
[java] Found type 'com.example.model.shared.MyObject'
[java] [WARN] Ignoring unresolvable annotation type
com.example.model.shared.MyAnnotation

The compilation still succeeded, but I wonder what side effects are
there? How do I resolve this warning?

Adolfo Panizo Touzon

unread,
Jun 1, 2011, 4:24:53 PM6/1/11
to google-we...@googlegroups.com
As you know, GWT is not pure Java, so you can´t use some things.

One way to solve these problem is including a library for reflection (see gwt-ent in google).

2011/6/1 randasin <r4nd...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

randasin

unread,
Jun 1, 2011, 4:38:48 PM6/1/11
to Google Web Toolkit
I don't plan to use or check the annotation in GWT context so I am ok
if GWT ignores it. MyObject is still compiled and I can use it in
Async requests, right?

The reason I have the annotation is the classes are also used in
another web service project, which utilizes the annotation.

Just wondered if there is way to get rid of the warning.


On Jun 1, 4:24 pm, Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
wrote:
> As you know, GWT is not pure Java, so you can´t use some things.
>
> One way to solve these problem is including a library for reflection (see
> gwt-ent in google).
>
> 2011/6/1 randasin <r4nd7...@gmail.com>

Adolfo Panizo Touzon

unread,
Jun 2, 2011, 2:44:00 AM6/2/11
to google-we...@googlegroups.com
with this libray you solve this problem, in my POJO´s i put some annotations (for other reasons) and I haven´t problems.

Try it, and tell us.

Greetings.

2011/6/1 randasin <r4nd...@gmail.com>

Till Brychcy

unread,
Feb 13, 2013, 6:20:04 AM2/13/13
to google-we...@googlegroups.com
A late answer (I just had the problem myself):
To get rid of the warning, you have to make sure that the classpath for running com.google.gwt.dev.Compiler also contains
the compiled annotations (corresponding .class file)
Reply all
Reply to author
Forward
0 new messages