users@grizzly.java.net

Re: GWT running in grizzly-http-servlet

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 10 Jun 2008 14:25:50 -0400

Hum, very strange. Have you used the bundle as it is? The build would
have been broken if the exception below exist. Let me take a closer look :-)

A+

-- Jeanfrancois

Neil Avery wrote:
> Still the same issue exists, as well as the following link failure -
> ill raise an issue
> java.lang.NoSuchMethodError:
> com.sun.grizzly.http.LinkedListPipeline.setQueueSizeInBytes(I)V
> at
> com.sun.grizzly.http.SelectorThread.newPipeline(SelectorThread.java:835)
> at
> com.sun.grizzly.http.SelectorThread.initPipeline(SelectorThread.java:946)
> at
> com.sun.grizzly.http.SelectorThread.initEndpoint(SelectorThread.java:1082)
> at com.sun.grizzly.http.SelectorThread.listen(SelectorThread.java:1137)
> at
> com.sun.grizzly.standalone.StandaloneMainUtil$1.listen(StandaloneMainUtil.java:114)
> at
> com.sun.grizzly.standalone.StandaloneMainUtil.startSelectorThread(StandaloneMainUtil.java:184)
> at
> com.sun.grizzly.standalone.StandaloneMainUtil.start(StandaloneMainUtil.java:79)
> at com.ll.dashboard.TomcatTest.testDoGrizzlyServlet(TomcatTest.java:16)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
>
>
> 2008/6/10 Neil Avery <neil.avery_at_gmail.com <mailto:neil.avery_at_gmail.com>>:
>
> Yep, Im using an older version - ill grab that version
>
> 2008/6/10 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com
> <mailto:Jeanfrancois.Arcand_at_sun.com>>:
>
> Hi Neil,
>
>
> Neil Avery wrote:
>
> Thought I would let you know of an issue i have had to work
> around with getting GWT running in Grizzly-http-servlet.
> Upon starting the GWTServlet i will get the following error msg
>
> un 10, 2008 7:00:58 PM
> com.sun.grizzly.http.servlet.ServletContextImpl log
> INFO: ERROR: The serialization policy file
> '/com.ll.dashboard.Dashboard/08252058FB1CB6571B5F628B6918964B.gwt.rpc'
> was not found; did you forget to include it in this deployment?
> Jun 10, 2008 7:00:58 PM
> com.sun.grizzly.http.servlet.ServletContextImpl log
> INFO: WARNING: Failed to get the SerializationPolicy
> '08252058FB1CB6571B5F628B6918964B' for module
> 'http://localhost:8080/com.ll.dashboard.Dashboard/'; a
> legacy, 1.3.3 compatible, serialization policy will be used.
> You may experience SerializationExceptions as a result.
>
>
> the error occurs because the WAR contains the file as static
> data and that is not included on the classpath so the
> servlet context fails to get it using loadResourceAsStream.
> Ive simply added the following which gets the OS native path
> to the static dir location and it solves the problem.:
>
> public InputStream getResourceAsStream(String path) {
> path = normalize(path);
> if (path == null)
> return (null);
>
> InputStream resourceAsStream =
> Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
>
> String webAppRootPath =
> SelectorThread.getWebAppRootPath();
> File file = new File(webAppRootPath + path);
> if (file.exists()) {
> try {
> return new FileInputStream(file);
> } catch (FileNotFoundException e) {
>
> e.printStackTrace();
> }
> }
> return resourceAsStream;
> }
>
>
> Which version are you using? Can you try with the following bundle:
>
> http://download.java.net/maven/2/com/sun/grizzly/grizzly-servlet-webserver/1.8.0-rc1/
>
> I've fixed the issue last week:
>
> https://grizzly.dev.java.net/issues/show_bug.cgi?id=152
>
> Thanks
>
> -- Jeanfrancois
>
>
>
>
>
>
>