Some more precisions, since this is a recurrent issue related in
Gilead forum :
    - The offending annotation is *always* CascadeType. The code
source is the same as regular JPA annotation.
    - Not a classpath issue : I repoduced the issue with the JAR on
classpath, and no way to tell Hosted Mode to take it into account
    - Only the "embedded" hosted mode fails, web mode is ok.

Regards
Bruno


On 3 mar, 15:38, Arthur Kalmenson <arthur.k...@gmail.com> wrote:
> Hmm, have you checked the classpath you use for your GWTCompile and
> hosted mode launching in Ant? Make sure they're the same. Hosted mode
> works fine with JPA annotations here (although we do use Maven). It
> looks like it might be a classpath issue.
>
> --
> Arthur Kalmenson
>
> On Mon, Mar 2, 2009 at 9:48 PM, grishag <grigori.gold...@gmail.com> wrote:
>
> > Hi,
>
> > I have a problem running GWT in hosted mode using JPA annotated domain
> > classes. I can compile my project to JavaScript, package it up in a
> > war and run it on a server no problem but I can't do the same in
> > hosted mode. Really annoying, without hosted mode development is
> > really slow.
>
> > Here is what I have done:
>
> > 1. I have one module that defines my domain classes (sitting under the
> > GWT client package) and DAO classes (under GWT server pacakge). The
> > following is the gwt.xml file for this module:
>
> > <module>
> >        <inherits name='net.sf.gilead.Adapter4Gwt15'/>
> >        <inherits name='net.sf.gilead.emul.java5.ejb3.Ejb3'/>
> > </module>
>
> > 2. The second module implements the client UI and the RPC service that
> > uses the domain objects from the first module:
>
> > <module>
> >        <inherits name="com.google.gwt.user.User"/>
> >        <inherits name="com.extjs.gxt.ui.GXT"/>
> >        <inherits name="com.extjs.gxt.themes.Themes" />
>
> >        <inherits
> > name='au.gov.vic.dpi.mpd.geodatavic2.module.domain.DomainModel' />
>
> >        <stylesheet src="css/ext-all.css" />
>
> >        <entry-point
> > class='au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.StratigraphicLegends'/
>
> > </module>
>
> > Like I said I can compile this using GWTCompiler and run it all on a
> > standalone server but not in hosted mode (I'm using the noserver
> > option).
>
> > I've been through my classpath multiple times and everything looks
> > fine but I'm still getting this error no matter what I do. If anyone
> > has any idea why this is happening and most importantly how to fix
> > this it would be greatly appreciated. I've been battling with this
> > thing for a day and a half and I'm out of ideas.
>
> > Thank you.
>
> > Buildfile: U:\projects\GeoDataVic2alt\build.xml
> > gwt.run:
> >     [java] java.lang.NoClassDefFoundError: javax/persistence/
> > CascadeType
> >     [java]     at java.lang.Class.getDeclaredMethods0(Native Method)
> >     [java]     at java.lang.Class.privateGetDeclaredMethods(Unknown
> > Source)
> >     [java]     at java.lang.Class.getDeclaredMethods(Unknown Source)
> >     [java]     at
> > com.google.gwt.dev.shell.DispatchClassInfo.lazyInitTargetMembersUsingReflectionHelper
> > (DispatchClassInfo.java:184)
> >     [java]     at
> > com.google.gwt.dev.shell.DispatchClassInfo.lazyInitTargetMembers
> > (DispatchClassInfo.java:146)
> >     [java]     at com.google.gwt.dev.shell.DispatchClassInfo.getMemberId
> > (DispatchClassInfo.java:55)
> >     [java]     at com.google.gwt.dev.shell.CompilingClassLoader
> > $DispatchClassInfoOracle.getDispId(CompilingClassLoader.java:130)
> >     [java]     at com.google.gwt.dev.shell.CompilingClassLoader.getDispId
> > (CompilingClassLoader.java:531)
> >     [java]     at
> > com.google.gwt.dev.shell.ie.IDispatchProxy.getIDsOfNames
> > (IDispatchProxy.java:124)
> >     [java]     at com.google.gwt.dev.shell.ie.IDispatchImpl.GetIDsOfNames
> > (IDispatchImpl.java:273)
> >     [java]     at com.google.gwt.dev.shell.ie.IDispatchImpl.method5
> > (IDispatchImpl.java:189)
> >     [java]     at org.eclipse.swt.internal.ole.win32.COMObject.callback5
> > (COMObject.java:108)
> >     [java]     at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native
> > Method)
> >     [java]     at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke
> > (IDispatch.java:64)
> >     [java]     at org.eclipse.swt.ole.win32.OleAutomation.invoke
> > (OleAutomation.java:493)
> >     [java]     at org.eclipse.swt.ole.win32.OleAutomation.invoke
> > (OleAutomation.java:417)
> >     [java]     at
> > com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow
> > (ModuleSpaceIE6.java:67)
> >     [java]     at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke
> > (ModuleSpaceIE6.java:152)
> >     [java]     at com.google.gwt.dev.shell.ModuleSpace.invokeNative
> > (ModuleSpace.java:447)
> >     [java]     at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject
> > (ModuleSpace.java:228)
> >     [java]     at
> > com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject
> > (JavaScriptHost.java:91)
> >     [java]     at
> > au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_TypeSerializer.createMethodMap
> > (transient source for
> > au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_TypeSerializer)
> >     [java]     at
> > au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_TypeSerializer.<clinit>
> > (transient source for
> > au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_TypeSerializer:
> > 10)
> >     [java]     at
> > au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_Proxy.<clinit>
> > (transient source for
> > au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_Proxy:
> > 12)
> >     [java]     at java.lang.Class.forName0(Native Method)
> >     [java]     at java.lang.Class.forName(Unknown Source)
> >     [java]     at
> > com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName
> > (ModuleSpace.java:516)
> >     [java]     at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate
> > (ModuleSpace.java:360)
> >     [java]     at com.google.gwt.dev.shell.GWTBridgeImpl.create
> > (GWTBridgeImpl.java:39)
> >     [java]     at com.google.gwt.core.client.GWT.create(GWT.java:97)
> >     [java]     at
> > au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.StratigraphicLegends.<clinit>
> > (StratigraphicLegends.java:40)
> >     [java]     at java.lang.Class.forName0(Native Method)
> >     [java]     at java.lang.Class.forName(Unknown Source)
> >     [java]     at
> > com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName
> > (ModuleSpace.java:516)
> >     [java]     at com.google.gwt.dev.shell.ModuleSpace.onLoad
> > (ModuleSpace.java:299)
> >     [java]     at
> > com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace
> > (BrowserWidget.java:329)
> >     [java]     at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300
> > (BrowserWidgetIE6.java:37)
> >     [java]     at
> > com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad
> > (BrowserWidgetIE6.java:76)
> >     [java]     at
> > com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke
> > (BrowserWidgetIE6.java:139)
> >     [java]     at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke
> > (IDispatchImpl.java:294)
> >     [java]     at com.google.gwt.dev.shell.ie.IDispatchImpl.method6
> > (IDispatchImpl.java:194)
> >     [java]     at org.eclipse.swt.internal.ole.win32.COMObject.callback6
> > (COMObject.java:117)
> >     [java]     at org.eclipse.swt.internal.win32.OS.DispatchMessageW
> > (Native Method)
> >     [java]     at org.eclipse.swt.internal.win32.OS.DispatchMessage
> > (OS.java:1925)
> >     [java]     at org.eclipse.swt.widgets.Display.readAndDispatch
> > (Display.java:2966)
> >     [java]     at com.google.gwt.dev.GWTShell.pumpEventLoop
> > (GWTShell.java:720)
> >     [java]     at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
> >     [java]     at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
> >     [java] Caused by: java.lang.ClassNotFoundException:
> > javax.persistence.CascadeType
> >     [java]     at com.google.gwt.dev.shell.CompilingClassLoader.findClass
> > (CompilingClassLoader.java:579)
> >     [java]     at java.lang.ClassLoader.loadClass(Unknown Source)
> >     [java]     at java.lang.ClassLoader.loadClass(Unknown Source)
> >     [java]     at java.lang.ClassLoader.loadClassInternal(Unknown
> > Source)
> >     [java]     ... 48 more
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to