Errai-cdi integration in glassfish
pablo.mmarcondes May 14, 2010 4:42 PMHi everyone,
First I want to congratulate all of you that works on Errai project, I have tested a lot of "comet like" implementations as atmosphere, gwt-comet, grizzly-comet and now Im very happy with errai-bus with gwt.
I have it working fine using guice, but I need to use the errai-cdi package, because I need to integrate it better the whole project, that is a complete javaee project using JCA, MDB, EJB, JPA, Weld, Servlets and GWT.
Im having problems using errai-cdi on my project, what Im using:
Glassfish v3.0.1 - http://download.java.net/glassfish/v3.0.1/promoted/glassfish-3.0.1-b18-unix.sh
errai-bus 1.1-SNAPSHOT
errai-cdi 1.1-SNAPSHOT constructed from svn source
What I've tried:
--------------------------------------
Scenario 1:
in my web.xml:
<servlet>
sun-web.xml:
<resource-env-ref>
<resource-env-ref-name>Errai</resource-env-ref-name>
<jndi-name>java:comp/env/Errai</jndi-name>
</resource-env-ref>
ErraiService.properties:
errai.dispatcher_implementation=org.jboss.errai.bus.server.AsyncDispatcher
read_pool_size=5
errai.async.worker.timeout=5
errai.auto_discover_services=false
with this configuration I got:
Exception while loading the app : java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.jboss.weld.exceptions.DefinitionException: Exception #0 :null
---------------------------------------------
Scenario 2: (showing only diferences)
n my web.xml:
<servlet>
DelegatinServelet.java:
with this config I got:
Exception while loading the app : java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.StackOverflowError
a lot of these:
java.lang.StackOverflowError
at java.util.logging.Logger.fine(Logger.java:1051)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:639)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:148)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:428)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.enterprise.naming.util.JndiNamingObjectFactory.create(JndiNamingObjectFactory.java:87)
at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$1.create(ComponentEnvManagerImpl.java:596)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:688)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:657)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:148)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:428)
------------------------------------------------
Ive made this config scenarios based on the example/gui found here http://anonsvn.jboss.org/repos/errai/projects/weld-integration/trunk/examples/gui/ , jetty uses the web.xml listener configuration, jboss dont, and so on...
I will be very pleased if someone could help me on this.
Thanks in advance, if you need more info, please ask.