This content has been marked as final.
Show 2 replies
-
1. Re: stateless EJB not being injected
sebastiendeg.sebastien.degardin.gmail.com Jan 24, 2008 2:10 PM (in response to mocha)I tried the same chunk of code.
If you set
@In(create = true)
it should work. -
2. Re: stateless EJB not being injected
mocha Jan 25, 2008 1:05 PM (in response to mocha)the original problem was a simple typo in the component name on the DAO. problem solved!
Sebestien - it works for me with either
@In(create = true)
or@In(create=true)
, but thanks for the suggestion.For anyone else trying to trace / debug component injection problems, you can turn on tracing by adding the following lines to your /jboss/server/default/conf/jboss-log4j.xml:
<category name="org.jboss.seam.Component"> <priority value="TRACE" /> </category>
this is what you should get in the jboss log when specifying create=true on injection:
2008-01-25 10:31:31,561 TRACE [org.jboss.seam.Component] injecting dependencies of: partySearch 2008-01-25 10:31:31,561 DEBUG [org.jboss.seam.Component] trying to inject with hierarchical context search: partyDAO 2008-01-25 10:31:31,561 DEBUG [org.jboss.seam.Component] instantiating Seam component: partyDAO
and this is what you get when Seam can't find the component by name
2008-01-25 11:09:48,484 TRACE [org.jboss.seam.Component] injecting dependencies of: partySearch 2008-01-25 11:09:48,484 DEBUG [org.jboss.seam.Component] trying to inject with hierarchical context search: partyDAO 2008-01-25 11:09:48,484 DEBUG [org.jboss.seam.Component] seam component not found: partyDAO 2008-01-25 11:09:48,485 DEBUG [org.jboss.seam.Component] seam component not found: org.jboss.seam.core.partyDAO 2008-01-25 11:09:48,485 DEBUG [org.jboss.seam.Component] seam component not found: org.jboss.seam.transaction.partyDAO 2008-01-25 11:09:48,485 DEBUG [org.jboss.seam.Component] seam component not found: org.jboss.seam.framework.partyDAO 2008-01-25 11:09:48,485 DEBUG [org.jboss.seam.Component] seam component not found: org.jboss.seam.web.partyDAO 2008-01-25 11:09:48,485 DEBUG [org.jboss.seam.Component] seam component not found: org.jboss.seam.faces.partyDAO 2008-01-25 11:09:48,485 DEBUG [org.jboss.seam.Component] seam component not found: org.jboss.seam.international.partyDAO