I am running jboss-4.0.1sp1 with the ejb3 preview under 1.5.0_02. I have a
simple webapp running and am trying to use the EJB3 CMP from within a DAO
pattern. Everything is running in the same vm and Im using the built in
hypersonic db.
Once I startup jboss, my EJB deploys ok (at least, there are no exceptions
thrown and nothing logged at the INFO level to indicate a problem). Have also
deployed the Entity tutorial and from ANT, can make it run so I think the
running jboss is configured correctly.
Here is the code I have problems with:
| import javax.ejb.Inject;
| import javax.persistence.EntityManager;
| import com.dmd.ratecalc.LoanCalculation;
|
| public class LoanCalculatorDao {
| @Inject
| private EntityManager manager;
|
| public void store(LoanCalculation lc) throws Exception {
| manager.persist(lc);
| }
| }
|
Stepping through the store(..) method, the manager field is null (I am running
under eclipse but I have tried to run outside eclipse and get the same null prt
exception).
Any ideas? Below is some of the console output:
15:21:48,821 INFO [Ejb3Module] found EJB3 Entity bean:
com.dmd.ratecalc.LoanCalculation
15:21:49,571 INFO [Ejb3Module] EJB3 deployment time took: 1578
15:21:49,603 INFO [Ejb3Module] EJB3 jar using default hibernate.properties:
{hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup,
hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider,
hibernate.dialect=org.hibernate.dialect.HSQLDialect,
hibernate.hbm2ddl.auto=create-drop,
hibernate.connection.datasource=java:/DefaultDS,
hibernate.query.factory_class=org.hibernate.hql.ast.ASTQueryTranslatorFactory}
15:21:52,134 INFO [EJB3Deployer] Deployed:
file:/C:/jboss-4.0.1sp1/server/all/deploy/dmd.ejb3
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3883416#3883416
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3883416
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user