On Friday, November 18, 2011 2:21:33 PM UTC+1, Alexander Lochschmied wrote:
>
> It only becomes:
>
>
> Caused by: java.lang.ClassCastException: org.hibernate.dialect.MySQL5Dialect 
> cannot be cast to org.hibernate.dialect.Dialect
>
>
> We haven playing with those JARs as there may be incompatibilities (JPA 1 
> vs 2) I think. Currently we do *not *reference them 
> (hibernate-jpa-2.0-api, hibernate-validator and validation-api).
>
> Could it be a class loading issue?
>

It's very likely the case yes; generally because the MySQL5Dialect comes 
from the parent classloader of the one containing the Dialect class. Could 
it be that some of your dependencies are not in the WEB-INF/lib?

IMO, when using Maven, you should really make at least 2 projects: one for 
the server and one for the client (you can possibly make server depend on 
client, but I'd rather make a third project "shared" that both client and 
server depend on); and you launch the server using the jetty-maven-plugin 
or whatever, and then run the DevMode in -noserver mode for the client-side 
code.
The problem is that there's no "scope=client" and "scope=server" in Maven, 
so everything in scope=compile or scope=runtime will be copied to your 
webapp's WEB-INF/lib, as expected, but will *also* be in the classpath of 
the DevMode, because there's no way to know whether your client-side code 
needs them or not; that leads to having all server classes twice on the 
classpath of the webapp (because it's a child classloader of the DevMode's 
one).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/v5RT3A-4J8wJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to