Just to let everyone know - with the latest 1.8RC1 - GWT with RPC
serialization/Servlets is working.
The jars needed are
<classpathentry exported="true" kind="lib"
path="lib/grizzly/grizzly-framework-1.8.0-rc1.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/grizzly/grizzly-http-1.8.0-rc1.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/grizzly/grizzly-http-servlet-1.8.0-rc1.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/grizzly/grizzly-servlet-webserver-1.8.0-rc1.jar"/>
Programmatically is pretty much identical to cmdline - as follows,
ServletLauncher servletLauncher = new ServletLauncher();
File file = new File("build/dashboard.war");
servletLauncher.start(new String[] { "--application=" +
file.getAbsolutePath(), "--port=8080",
"com.ll.dashboard.server.DashboardServiceImpl" });
Nice one!
Cheers Neil.
---------- Forwarded message ----------
From: <users-owner_at_grizzly.dev.java.net>
Date: 2008/6/10
Subject: Returned post for users_at_grizzly.dev.java.net
To: neil.avery_at_gmail.com
2008/6/10 Neil Avery <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>:
>
> 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
>>
>>
>>
>>>
>>>
>>>
>