-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: UserTransaction not bound accessing SAR
PostPosted: Fri Nov 14, 2003 1:24 pm 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
I've deployed Hibernate using SAR file with the following jboss-service.xml:

<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=ArsolHibernateFactory,
name=ArsolHibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=arsolDS</depends>
<!-- Make it deploy ONLY after DataSource had been started -->
<attribute name="MapResources">
mapping/Mp.hbm.xml, ...
</attribute>
<attribute name="JndiName">java:/hibernate/ArsolHibernateFactory</attribute>
<attribute name="Datasource">java:/arsolDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.PostgreSQLDialect</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="UseOuterJoin">false</attribute>
<attribute name="ShowSql">false</attribute>
<attribute name="UserTransactionName">java:/UserTransaction</attribute>
</mbean>
</server>

I'm trying to create a SessionFactory like this:

Context ctx = new InitialContext();
SessionFactory sf = (SessionFactory)ctx.lookup("java:/hibernate/ArsolHibernateFactory");


It keeps giving me the following error (JBoss console window):


17:20:31,484 ERROR [JTATransaction] Could not find UserTransaction in JNDI
javax.naming.NameNotFoundException: UserTransaction not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
at javax.naming.InitialContext.lookup(InitialContext.java:347)


I can't find the problem.
Can someone please help me.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2003 5:18 am 
Newbie

Joined: Thu Sep 04, 2003 3:36 am
Posts: 11
Location: Karlsruhe/Germany
Try

Code:
<attribute name="UserTransactionName">UserTransaction</attribute>


(without "java:/") for JBoss.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2003 7:47 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
srhib wrote:
Try

Code:
<attribute name="UserTransactionName">UserTransaction</attribute>


(without "java:/") for JBoss.


Thanks for the tip. I simply took out that line and it's running fine.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 17, 2003 9:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
If its not on the Wiki can you please add a comment to the JBoss page with this Tip please.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.