Re: Hibernate ClassCastException in GWT hosted mode only

2011-11-19 Thread jett
I'm facing the same issue and was suspecting a class loading issue.  I
thought I was inviting trouble when I would place the same Hibernate
annotated class in both the server side code and the GWT client side,
but until upgrading GWT 2.0 to GWT 2.4, I did not experience this
ClassCastException problem.

As Alexander has experienced, things work fine when I deploy the .war
to an external server, and only see problems running in the DevMode.
I see different classes not being cast-able depending on my
hibernate.cfg.xml.

I'm still trying to sort out how the switch from GWT 2.0 to 2.4 is a
factor because I made several changes, but I am glad to hear that I'm
not the only one thinking this is a classloader issue.


On Nov 18, 9:54 am, Thomas Broyer t.bro...@gmail.com wrote:
 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 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.



Re: GWT Developer Plugin is not found in Firefox

2010-12-30 Thread jett
Using the LD_DEBUG=libs, I learned firefox was attempting to load 
libnspr4.so.0d, but I wasn't running a 64-bit OS (I've got a Gentoo 
install).  I was able to successfully link the file libnspr4.so.8 to the 
sought after name libnspr4.so.0d.  Deleting the compreg.dat and a restart of 
firefox after making the symlink got it working.

-- 
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-web-tool...@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.



Re: How to read POST parameters in GWT

2009-10-25 Thread jett

I'm fairly new to GWT as well and was trying to solve the same
problem.  I know you can pull out 'GET' parameters using a call like
this:

Window.Location.getParameter(token);

Don't know if that is an option you can use.

Jett

On Oct 9, 2:55 pm, Sudeep S sudee...@gmail.com wrote:
 Hi,
 I am new to gwt.

 I am invoking a gwt module from an external html and passing parameters in
 the POST.

 How can they be retrieved in the gwt app.

 Thanks
 Sudeep

--~--~-~--~~~---~--~~
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-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
-~--~~~~--~~--~--~---