Hi everybody!

I've got 2 problems I'd like to helped with.

I'm just startet working with JBoss and I'm using the 4.0.4RC1 version of it. 
During the start up i get the following warning output:

WARN  [TreeCache] No transaction manager lookup class has been defined. 
Transactions cannot be used

1.) Now where can I define this transaction manager look up class?

And I'm trying to inject an EntityManager into a stateless Session Bean. 
However, I don't get an instance of it. I've written a persistence.xml file 
:<persistence xmlns="http://java.sun.com/xml/ns/persistence";
  |     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
  |     version="1.0">
  |     <persistence-unit name="persistenceSample">
  |             <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |             <jta-data-source>java:/DefaultDS</jta-data-source>
  |             <properties>
  |                     <property name="hibernate.dialect"
  |                             value="org.hibernate.dialect.HSQLDialect" />
  |                     <property name="hibernate.hbm2ddl.auto" 
value="create-drop" />
  |             </properties>
  |     </persistence-unit>
  | </persistence>

And in the bean class I'm trying to inject an EntityManager [EMAIL 
PROTECTED](unitName="persistenceSample")
  | private EntityManager manager;

But, I already get a Waring from JBoss when deploying the beans, which I've put 
into a jar file.

WARN  [ServiceController] Problem starting service 
persistence.units:jar=DistSampleBeans.jar.jar,unitName=persistenceSample
java.lang.reflect.InvocationTargetException
... lots of method names where the exception goes up the call stack ...

Does this have something to do with the fact that no Transaction Manager 
look-up class has been defined?

I tried to get an instance of the EntityManager by using an 
EntityManagerFactory as well: Map<String, String>  properties = new 
HashMap<String, String>();
  | EntityManagerFactory emf = Persistence
  |      .createEntityManagerFactory("persistenceSample", properties);
  |    
  | EntityManager manager = emf.getEntityManager();
Either with or without the properties Map --> no success. The outcome is a 
NullPointerException.

2.) What am I doing wrong?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935445#3935445

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3935445


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to