-
1. Re: POJO, problem with @Log
jkronegg Apr 8, 2009 2:37 PM (in response to konstt2000)You should use @Logger instead of @In.
-
2. Re: POJO, problem with @Log
konstt2000 Apr 8, 2009 3:44 PM (in response to konstt2000)I've used @Logger and I've same problem..
-
3. Re: POJO, problem with @Log
gonorrhea Apr 8, 2009 5:29 PM (in response to konstt2000)The log instance is null (note: create=true is not required for @Logger).
try restarting JBOss with your app deployed (as EAR/WAR, packaged or exploded, doesn't matter) and watch the server.log for any stack trace during startup and deployment of your app.
There is something very basic you're doing wrong in terms of config or elsewhere.
And always use @Logger, not @In, for injecting the Log instance...
also, double-check to make sure there is a log4j.jar in JBoss classpath (i.e. \server\xxx\lib)
-
4. Re: POJO, problem with @Log
konstt2000 Apr 13, 2009 4:26 PM (in response to konstt2000)How can I inject EntityManager?
I've same problem... I've tring with @In and @PersistenContext. -
5. Re: POJO, problem with @Log
gonorrhea Apr 13, 2009 10:33 PM (in response to konstt2000)when you inject EntityManager instance using @In, the instance name of EntityManager must match the name attribute's value for the SMPC tag in components.xml.
ex:
<persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/boBETSEntityManagerFactory"/>
then inject like this:
@In EntityManager entityManager;
not like this:
@In EntityManager em;
NOTE: you generally don't use @PersistenceContext in Seam apps.