Friday, July 1, 2011

Re: Should gwt-dev.jar be on classpath on webmode?

Using GWT 2.3
This is the Guice stuff that I added to my web.xml

  <filter>
    <filter-name>guiceFilter</filter-name>
    <filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>guiceFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  
  <listener>
    <listener-class>miles.server.infra.MilesGuiceServletConfig</listener-class>
  </listener>

And the guice code concerning RequestFactoryServlet, on a Guice ServletModule:
public void configureServlets() {
filter("/*").through(PersistFilter.class);
serve("/gwtRequest").with(RequestFactoryServlet.class);
bind(RequestFactoryServlet.class).in(Singleton.class);
}


On Thu, Jun 30, 2011 at 9:53 PM, David Chandler <drfibonacci@google.com> wrote:
Which version of GWT? You shouldn't need gwt-dev.jar to run RequestFactoryServlet. Can you share your Guice config? Are you passing any params to RFS?

On Thu, Jun 30, 2011 at 7:28 PM, Magno Machado <magnomp@gmail.com> wrote:
This is what I get if I don't put it on classpath:
java.lang.NoClassDefFoundError: com/google/gwt/dev/asm/commons/Method
        at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.<clinit>(ResolverServiceLayer.java:46)
        at com.google.web.bindery.requestfactory.server.ServiceLayer.create(ServiceLayer.java:76)
        at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.<init>(RequestFactoryServlet.java:88)
        at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.<init>(RequestFactoryServlet.java:74)
        at com.google.web.bindery.requestfactory.server.RequestFactoryServlet$$FastClassByGuice$$54253391.newInstance(<generated>)
        at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
        at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
        at com.google.inject.Scopes$1$1.get(Scopes.java:65)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
        at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
        at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)

This happens while instantiating RequestFactoryServlet

--
Magno Machado Paulo
http://blog.magnomachado.com.br
http://code.google.com/p/emballo/

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
Magno Machado Paulo
http://blog.magnomachado.com.br
http://code.google.com/p/emballo/

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment