Well the GWT module isn't loaded at all... I use seam remoting instead of GWT Servlets. RPC works fine, the issue is that GWTSehll doesn't see the GWT modules in the page...
On 15 déc, 18:02, jos <[email protected]> wrote: > Bandesz, > Gregor is pointing you in the right direction w/ option #1, and the > link he gives is enough to eventually get you there, but there is one > thing you have to do in your GWT code or it will never work. Your RPC > servlets all have a setServiceEntryPoint() call that is made to tell > them where they hookup. By default in hosted mode the GWT runtime will > tell your GWT application that the app server is on localhost so you > need to override that by changing the following code which should be > in your onModuleLoad() method. The code example below is in my > deployment setup, when I'm debugging the application I comment in the > first two lines and comment out the 3rd line. Note in the second > statement I'm telling GWT where the the service entry point really > lives. The third statement would point it back to the localhost > because that's where hosted mode lives. > > There is a second important step that I'll mention here. After > compiling your GWT code, it does need to be deployed to your testing > server so that the hosted mode browser takes the code from that > server. Once you switch to -noserver the local tomcat goes away and > there's nothing serving up your application. When you run the hosted > mode debugger, you just need to type in the address of your > application on the address bar like you would if you were really > deployed, your application will be served by your test server and load > up into the hosted mode debug browser. > > Try the GWT documentation link and these two points, and it should > work. Admittedly it is a painful process the first time you try to get > it to work, but it does work. > > /** ECLIPSE CODE - comment in the next 2 lines and comment out > the line directly > * after these three to run with backend server in eclipse > System.out.println("GWT module base URL - " + > GWT.getModuleBaseURL()); > geoServiceTarget.setServiceEntryPoint("http:// > staging.abaqus.net/geo/gcb/geoservice"); > */ > geoServiceTarget.setServiceEntryPoint(GWT.getModuleBaseURL() + > "geoservice"); > > On Dec 7, 7:34 pm, gregor <[email protected]> wrote: > > > couple of approaches > > > 1) Simply use -noserver option. You need a build script to deploy your > > RPC servlets and your EJB layer to Glassfish on demand and activate > > remote debugging to make this work effectively, but lots of people do > > it this way. See > > >http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=goog... > > > 2) You can run your RPC servlets in hosted mode Tomcat instance > > leaving your session beans on Glassfish with a bit more work. You need > > to use trad JNDI to try for a local reference to your session beans, > > and if that fails go for the remote reference instead. I don't think > > the new annotation stuff works for this.That way you get a local ref > > in production and a remote one in dev from the same code. If you use > > the ServiceLocator pattern it makes this easier. > > > On Dec 7, 2:26 pm, Bandesz <[email protected]> wrote: > > > > I'm developing a J2EE application with GWT using NetBeans 6.5, > > > Glassfish v2. > > > > If I debugging only the web project, I can't use any Session Beans > > > from EJB project, becase I get "Cannot resolve reference Unresolved > > > Ejb-Ref..." error. I tried in every way to make <ejb-local-ref> tags > > > in web.xml (or in ejb-jar.xml), but the error stays. (I see now that > > > it's a dead end) > > > > If I debugging the enterpise project, everythings works except the > > > hosted mode. > > > > I searched a lot, but I can't make this work, please help. > > > > Thanks, > > > Bandesz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
