On Sun, Mar 18, 2012 at 19:44, perissf <per...@gmail.com> wrote:
> Hi,
> I am trying to move a CometD web application from inherited services
> to annotated services.
> On GlassFish 3.1 I have this exception:
> org.apache.catalina.LifecycleException:
> java.lang.IllegalArgumentException: javax.servlet.ServletException:
> com.sun.enterprise.container.common.spi.util.InjectionException: Error
> creating managed object for class: class
> org.jboss.weld.servlet.WeldListener
The error says it cannot create an instance of WeldListener. Does not
seem related to CometD.
Simon
--
http://cometd.org
http://intalio.com
http://bordet.blogspot.com
----
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz
On Mon, Mar 19, 2012 at 20:01, perissf <per...@gmail.com> wrote:
> After deeper investigation, I have found out that ... the problem is
> somewhere else!
> The code reported above, if deployed after restarting the application
> server, works fine.
>
> But when I try to inject the BayeuxServer instance into an EJB
> Singleton called MySingleton, I get this exception when deploying:
>
> javax.ejb.CreateException: Initialization failed for Singleton
> MySingleton
> Caused by: org.jboss.weld.exceptions.IllegalArgumentException:
> WELD-001324 Argument bean must not be null
>
> The other exception reported above is thrown after removing the
> injection of BayeuxServer, and will always be thrown until I restart
> the application server.
>
> I then tried to inject the BayeuxServer in an ApplicationScoped bean,
> but I got the following exception when deploying:
>
> org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied
> dependencies for type [BayeuxServer] with qualifiers [@Default] at
> injection point [[field] @Inject private beans.MySingleton.bayeux]
>
> So my question is: isn't it allowed to inject the BayeuxServer in one
> of these Java EE 6 beans?
CDI is quite (over)complicated, and I spent only little time on
integrating CometD into CDI, so it's a new terrain that needs to be
explored.
Can you please file a bug at http://bugs.cometd.org so that we won't forget ?
If you find a solution, please keep us posted.
Hi,