Hi Stephen, OK, so now Tomcat can't find ParserFactory in your web app's classpath. The simple answer is that this class must either be included under WEB-INF/classes or it must be accessed from a separate JAR located under WEB-INF/lib.
A couple of points: 1) normally you put your RemoteServiceServlet's, e.g. SignoffServiceImpl, in the /server directory of your GWT project (a peer to /client & /public). These are not subject to java/javascript translation so you can use any library you wish with them together with you own classes that use classes/libraries that are not supported by GWT JRE Emulation. I would put your remote servlets there as you are likely to get less issues because that's where they are expected to be. 2) from your post (and correct me I'm wrong here) it seems that you have some server side code based on various Java EE services and/or third party libraries, and some domain classes that are used by both the GWT client and the server architecture. Your concern is that you want your domain classes to be available to both GWT client and to the server side stuff, i.e. they are both dependent on them, so how best to do that. If you are using Tomcat stand alone, you are not using Java EE services that require a full blown application server like JBoss. Therefore the whole application can be deployed as a single WAR file. In that case all your server side classes that use GWT non-compliant stuff (e.g. ParserFactory) can be located under the /server directory in your GWT project source tree. You domain classes can be located under /client and then they will be visible to your client code during javascript translation, and the RPC servlets, and your server side classes. When deployed in a WAR all the class files for both /client and /server code should live under WEB-INF/classes, and the third party jar's should be located under WEB-INF/lib from where they will be visible to your server side stuff. All should work fine. If you cannot do this, say because you are using Java EE services not supported by Tomcat, or for some reason you don't want to do this, the solution is somewhat more complicated both dev wise in your IDE and deployment-wise. If this is the case please explain a little more about why you want to/have to split the application up and we can go into it from there. NB: "The ClassNotFound exception is at runtime." is ambiguous in the context of GWT. It's better to use the terms "hosted mode" to refer to compiling and running in the GWT dev shell, and "web mode" (or "deployed") to refer to deploying and running the application on your own Tomcat/app server instance. regards gregor regards gregor On Oct 1, 11:27 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Ok well i have resolved that issue by compiling all the classes to the > same directory (still giving the compile time checks for > dependencies). > > I have a new issue however. my server side is failing to load the > libraries it uses. It is throwing the following error at runtime. > ParseFactory is in my classpath and it is imported. commenting this > dependancy out simply moves the error onto the next dependency on my > classpath. > > [WARN] StandardWrapperValve[shell]: Servlet.service() for servlet > shell threw exception > java.lang.NoClassDefFoundError: com/paretopartners/parse/ParserFactory > at > com.paretopartners.signoff.server.SignoffServiceImpl.<init>(SignoffServiceImpl.java: > 55) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: > 39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java: > 27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at java.lang.Class.newInstance0(Class.java:355) > at java.lang.Class.newInstance(Class.java:308) > at > com.google.gwt.dev.shell.GWTShellServlet.tryGetOrLoadServlet(GWTShellServlet.java: > 937) > at > com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java: > 277) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: > 237) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: > 157) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: > 214) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 104) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: > 520) > at > org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java: > 198) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: > 152) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 104) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: > 520) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: > 137) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 104) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: > 118) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 102) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: > 520) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: > 109) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 104) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: > 520) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java: > 929) > at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java: > 160) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: > 799) > at org.apache.coyote.http11.Http11Protocol > $Http11ConnectionHandler.processConnection(Http11Protocol.java:705) > at > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: > 577) > at org.apache.tomcat.util.threads.ThreadPool > $ControlRunnable.run(ThreadPool.java:683) > at java.lang.Thread.run(Thread.java:619) > Caused by: java.lang.ClassNotFoundException: > com.paretopartners.parse.ParserFactory > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > at > com.paretopartners.signoff.server.SignoffServiceImpl.<init>(SignoffServiceImpl.java: > 55) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: > 39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java: > 27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at java.lang.Class.newInstance0(Class.java:355) > at java.lang.Class.newInstance(Class.java:308) > at > com.google.gwt.dev.shell.GWTShellServlet.tryGetOrLoadServlet(GWTShellServlet.java: > 937) > at > com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java: > 277) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: > 237) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: > 157) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: > 214) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 104) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: > 520) > at > org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java: > 198) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: > 152) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 104) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: > 520) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: > 137) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 104) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: > 118) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 102) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: > 520) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: > 109) > at > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: > 104) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: > 520) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java: > 929) > at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java: > 160) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: > 799) > at org.apache.coyote.http11.Http11Protocol > $Http11ConnectionHandler.processConnection(Http11Protocol.java:705) > at > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: > 577) > at org.apache.tomcat.util.threads.ThreadPool > $ControlRunnable.run(ThreadPool.java:683) > at java.lang.Thread.run(Thread.java:619) > > Thanks again --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
