Reputation: 3750
I'm trying to clean install a GWT project with the gwt-maven-plugin
. I'm running into the following issues several times:
Finding entry point classes
[ERROR] Errors in '.../core/impl/MyClass.java'
[ERROR] Line 23: The import org.codehaus.jackson.annotate.JsonIgnore cannot be resolved
[ERROR] Line 24: The import org.hibernate.envers cannot be resolved
[ERROR] Line 27: Audited cannot be resolved to a type
[ERROR] Line 102: JsonIgnore cannot be resolved to a type
[ERROR] Line 129: JsonIgnore cannot be resolved to a type
The problems are only with annotations.
The core project is a project that defines my data model. It is used on both the server and the client (gwt) side. Any way to make it work?
Upvotes: 4
Views: 5633
Reputation: 26342
Just like Jamshid said not every class in JRE is emulated to the client side.
For example persistent objects have no meaning on the client side so hibernate is not needed. You must serialise the persistent objects using the equivalent class objects.
For example if you have an object User retrieved by hibernate on the server side you must create another serialisable object say UserDTO and send it to GWT.
There is no way you can make your code work exactly as it is on both the client and server side of a GWT application.
Upvotes: 1
Reputation: 16079
Because the classes which are compiler is complaining are unsupported by GWT's JRE emulation. You should use them on the server-side only. See GWT JRE Emulation Reference for more information.
Upvotes: 4