Hi Baptiste!

Thank you for your reply.

Following your advice I looked into Knopflerfish OSGi framework and
verified that it does provide Servlet 2.5.0 in the JSDK-API bundle,
and its implementation of HTTP Service uses Servlet 2.5.0.

Subsequently, I tried to install Jetty OSGi bundles one at a time but
ran into troubles with dependencies. Thus, I installed Pax Web OPS4J
(http://wiki.ops4j.org/display/paxweb/Pax+Web) which includes Jetty 6.

With my bundle including gwt-user.jar for, which exports GWT RPC
packages (but not javax.servlet and javax.servlet.http), I then
started Pax Web and checked that HTTP Service was available. Then I
started my GWT RPC Web App OSGi bundle but ran in the same trouble. If
I try to use Pax Web or Knopflerfish HTTP Server, I get very similar
errors always re/ IncompatobleClassChangeError as you can see in the
pasted output:

--- Output w/ Knopflerfish OSGi HTTP Server ---

[stdout] HTTP Service is available

[stderr] java.lang.IncompatibleClassChangeError
[stderr]        at org.knopflerfish.bundle.http.ServletRegistration.<init>
(ServletRegistration.java:77)
[stderr]        at
org.knopflerfish.bundle.http.HttpServiceImpl.registerServlet
(HttpServiceImpl.java:173)
[stderr]        at edu.uta.crewman.giacomo.gwt.servlet.Activator.start
(Activator.java:46)
[stderr]        at org.knopflerfish.framework.BundleImpl.start0
(BundleImpl.java:374)
[stderr]        at org.knopflerfish.framework.PermissionOps.callStart0
(PermissionOps.java:215)
[stderr]        at org.knopflerfish.framework.BundleImpl.start
(BundleImpl.java:321)
[stderr]        at org.knopflerfish.bundle.desktop.swing.Desktop.startBundle
(Desktop.java:2198)
[stderr]        at org.knopflerfish.bundle.desktop.swing.Desktop
$16.actionPerformed(Desktop.java:735)
[stderr]        at javax.swing.AbstractButton.fireActionPerformed
(AbstractButton.java:1995)
[stderr]        at javax.swing.AbstractButton$Handler.actionPerformed
(AbstractButton.java:2318)
[stderr]        at javax.swing.DefaultButtonModel.fireActionPerformed
(DefaultButtonModel.java:387)
[stderr]        at javax.swing.DefaultButtonModel.setPressed
(DefaultButtonModel.java:242)
[stderr]        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased
(BasicButtonListener.java:236)
[stderr]        at java.awt.AWTEventMulticaster.mouseReleased
(AWTEventMulticaster.java:272)
[stderr]        at java.awt.Component.processMouseEvent(Component.java:6216)
[stderr]        at javax.swing.JComponent.processMouseEvent(JComponent.java:
3265)
[stderr]        at java.awt.Component.processEvent(Component.java:5981)
[stderr]        at java.awt.Container.processEvent(Container.java:2041)
[stderr]        at java.awt.Component.dispatchEventImpl(Component.java:4583)
[stderr]        at java.awt.Container.dispatchEventImpl(Container.java:2099)
[stderr]        at java.awt.Component.dispatchEvent(Component.java:4413)
[stderr]        at java.awt.LightweightDispatcher.retargetMouseEvent
(Container.java:4556)
[stderr]        at java.awt.LightweightDispatcher.processMouseEvent
(Container.java:4220)
[stderr]        at java.awt.LightweightDispatcher.dispatchEvent
(Container.java:4150)
[stderr]        at java.awt.Container.dispatchEventImpl(Container.java:2085)
[stderr]        at java.awt.Window.dispatchEventImpl(Window.java:2475)
[stderr]        at java.awt.Component.dispatchEvent(Component.java:4413)
[stderr]        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
[stderr]        at java.awt.EventDispatchThread.pumpOneEventForFilters
(EventDispatchThread.java:269)
[stderr]        at java.awt.EventDispatchThread.pumpEventsForFilter
(EventDispatchThread.java:184)
[stderr]        at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:174)
[stderr]        at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:169)
[stderr]        at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:161)
[stderr]        at java.awt.EventDispatchThread.run(EventDispatchThread.java:
122)

--- Output w/ Pax Web Jetty 6 ---

[stdout] HTTP Service is available

[stderr] java.lang.IncompatibleClassChangeError
[stderr]        at org.mortbay.jetty.servlet.ServletHolder.initServlet
(ServletHolder.java:431)
[stderr]        at org.mortbay.jetty.servlet.ServletHolder.doStart
(ServletHolder.java:263)
[stderr]        at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:50)
[stderr]        at org.mortbay.jetty.servlet.ServletHandler.initialize
(ServletHandler.java:676)
[stderr]        at org.mortbay.jetty.servlet.ServletHandler.updateMappings
(ServletHandler.java:1044)
[stderr]        at
org.mortbay.jetty.servlet.ServletHandler.setServletMappings
(ServletHandler.java:1101)
[stderr]        at org.mortbay.jetty.servlet.ServletHandler.addServletMapping
(ServletHandler.java:800)
[stderr]        at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call
(JettyServerImpl.java:139)
[stderr]        at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call
(JettyServerImpl.java:136)
[stderr]        at
org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader
(ContextClassLoaderUtils.java:60)
[stderr]        at
org.ops4j.pax.web.service.internal.JettyServerImpl.addServlet
(JettyServerImpl.java:131)
[stderr]        at org.ops4j.pax.web.service.internal.ServerControllerImpl
$Started.addServlet(ServerControllerImpl.java:236)
[stderr]        at
org.ops4j.pax.web.service.internal.ServerControllerImpl.addServlet
(ServerControllerImpl.java:93)
[stderr]        at
org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet
(HttpServiceStarted.java:144)
[stderr]        at
org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet
(HttpServiceProxy.java:53)
[stderr]        at edu.uta.crewman.giacomo.gwt.servlet.Activator.start
(Activator.java:46)
[stderr]        at org.knopflerfish.framework.BundleImpl.start0
(BundleImpl.java:374)
[stderr]        at org.knopflerfish.framework.PermissionOps.callStart0
(PermissionOps.java:215)
[stderr]        at org.knopflerfish.framework.BundleImpl.start
(BundleImpl.java:321)
[stderr]        at org.knopflerfish.bundle.desktop.swing.Desktop.startBundle
(Desktop.java:2198)
[stderr]        at org.knopflerfish.bundle.desktop.swing.Desktop
$16.actionPerformed(Desktop.java:735)
[stderr]        at javax.swing.AbstractButton.fireActionPerformed
(AbstractButton.java:1995)
[stderr]        at javax.swing.AbstractButton$Handler.actionPerformed
(AbstractButton.java:2318)
[stderr]        at javax.swing.DefaultButtonModel.fireActionPerformed
(DefaultButtonModel.java:387)
[stderr]        at javax.swing.DefaultButtonModel.setPressed
(DefaultButtonModel.java:242)
[stderr]        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased
(BasicButtonListener.java:236)
[stderr]        at java.awt.AWTEventMulticaster.mouseReleased
(AWTEventMulticaster.java:272)
[stderr]        at java.awt.Component.processMouseEvent(Component.java:6216)
[stderr]        at javax.swing.JComponent.processMouseEvent(JComponent.java:
3265)
[stderr]        at java.awt.Component.processEvent(Component.java:5981)
[stderr]        at java.awt.Container.processEvent(Container.java:2041)
[stderr]        at java.awt.Component.dispatchEventImpl(Component.java:4583)
[stderr]        at java.awt.Container.dispatchEventImpl(Container.java:2099)
[stderr]        at java.awt.Component.dispatchEvent(Component.java:4413)
[stderr]        at java.awt.LightweightDispatcher.retargetMouseEvent
(Container.java:4556)
[stderr]        at java.awt.LightweightDispatcher.processMouseEvent
(Container.java:4220)
[stderr]        at java.awt.LightweightDispatcher.dispatchEvent
(Container.java:4150)
[stderr]        at java.awt.Container.dispatchEventImpl(Container.java:2085)
[stderr]        at java.awt.Window.dispatchEventImpl(Window.java:2475)
[stderr]        at java.awt.Component.dispatchEvent(Component.java:4413)
[stderr]        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
[stderr]        at java.awt.EventDispatchThread.pumpOneEventForFilters
(EventDispatchThread.java:269)
[stderr]        at java.awt.EventDispatchThread.pumpEventsForFilter
(EventDispatchThread.java:184)
[stderr]        at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:174)
[stderr]        at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:169)
[stderr]        at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:161)
[stderr]        at java.awt.EventDispatchThread.run(EventDispatchThread.java:
122)

Since the error is the same, the problem is somewhere else in my GWT
RPC Web App and the OSGi bundle I created from gwt-user.jar, so that I
came up with following ideas:

(i) Should I export javax.servlet from the OSGi bundle created from
gwt-user.jar?

(ii) Is my GWT RPC Web App dependent on Servlet 2.4.0 so that I run
into trouble having Servlet 2.5.0 in my OSGi framework? This shouldn't
be the case as demonstrated from following observation. When I
developed a Servlet in Eclipse (relying on Servlet 2.4.0) and deployed
to Knopflerfish (which provides 2.5.0), everything ran fine.

You might be wondering why I keep using Knopflerfish. Well, that's
because I don't want to risk end up using Equinox's specific features
and stay OSGi-compliant as much as possible.

Thank you,

Gia


On Jun 4, 7:57 am, Baptiste Boussemart <baptisteboussem...@gmail.com>
wrote:
> Hi,
>
> I think it is because you don't use the Servlet 2.4.
> As far I know, the default HTTP server doesn't provide this
> requirement.
>
> I use GWT on Equinox and Jetty, which provides Servlet 2.4.
> So you need to use Jetty.
>
> Hope that this answers to your question.
>
> Regards,
> Baptiste Boussemart
>
> On 3 juin, 23:54, giacomo <gia.ghid...@gmail.com> wrote:
>
> > Hi everyone!
>
> > I'm trying to get the simple Web application in GWT 1.6.4 featuring
> > GWT RPC to work in Knopflerfish OSGi framework 2.3.1 (an
> > implementation of the OSGi framework like Equinox).
>
> > For that matter I created an OSGi bundle from the GWT project and
> > added an implementation of BundleActivator in which I register the
> > client-side Web page and the server-side GWT RemoteServiceServlet with
> > the OSGi-defined HTTP Service.
>
> > Separately, I created an OSGi bundle from gwt-user.jar and exported
> > the required packages for RPC but not javax.servlet as this is already
> > exported by the JSDK in Knopflerfish.
>
> > When I start the bundle created from the GWT project, the
> > BundleActivator.start() method is executed and the client-side Web
> > page is successfully registered in the HTTP Service. When I open my
> > Web browser (Mozilla Firefox) and point it to the given address, I can
> > view the Web page. Unfortunately, I get a
> > java.lang.IncompatibleClassChangeError during execution of the start
> > method from within the Knopflerfish OSGi framework apparently due to
> > javax.servlet.Servlet.
>
> > If I try to define a traditional Servlet in the same project and
> > register it from the BundleActivator, everything works fine. Thus, my
> > conclusion is that the problem is related to RemoteServiceServlet
> > inheritance of javax.servlet.Servlet which doesn't comply with
> > Knopflerfish OSGi framework definition of javax.servlet.Servlet.
>
> > It looks like as if a definition of Servlet is used when I compile the
> > GWT project with GWT-generated Ant file and another one is made
> > available by the Knopflerfish OSGi framework, if I'm not mistaken
> > about the meaning of java.lang.IncompatibleClassChangeError.
>
> > I tried both to export and not to export javax.servlet from the OSGi
> > bundle encapsulating gwt-user.jar but this didn't change anything.
>
> > Some related info. I read the post by Ian Bull on his blog 
> > athttp://blog.ianbull.com/2008/09/gwt-and-osgi.htmlbutthat refers to a
> > previous version of GWT and uses Eclipse Equinox, not Knopflerfish.
> > Thus, I couldn't figure it out from there.
>
> > Thanks in advance,
>
> > Gia
--~--~---------~--~----~------------~-------~--~----~
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