-->
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: Oracle OCI Driver
PostPosted: Fri Mar 19, 2004 7:05 pm 
Newbie

Joined: Fri Mar 19, 2004 6:53 pm
Posts: 2
I'm using JBoss 3.2.3, Hibernate 2.1 and Oracle 9.2. My datasource is configure to use the OCI client and JBoss keeps throwing these exceptions.

17:46:28,539 INFO [STDOUT] Hibernate: insert into spool (repository_name, message_state, erro
r_message, sender, recipients, remote_host, remote_addr, message_body, last_updated, message_n
ame) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
17:46:28,613 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, Gl
obalId=localhost//21, BranchQual=] errorCode=XAER_NOTA
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
at oracle.jdbc.xa.client.OracleXAResource.end(OracleXAResource.java:450)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java
:156)
at org.jboss.tm.TransactionImpl.endResource(TransactionImpl.java:1205)
at org.jboss.tm.TransactionImpl.endResources(TransactionImpl.java:1278)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:355)
at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:398)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:27
7)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterc
eptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.ja
va:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2
5)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.ja
va:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2
5)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)


The service file looks like this:
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=XATxCM,name=XAOracleDS</depends>
<attribute name="MapResources">Spool.hbm.xml</attribute>
<attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
<attribute name="Datasource">java:/XAOracleDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.OracleDialect</attribute>
<attribute name="UseOuterJoin">true</attribute>
<attribute name="ShowSql">true</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
</mbean>

</server>


What is strange that the application works just fine when I use the thin client. Has anybody else had this problem with the OCI client or know what's going on?

thanks
Paolo


Top
 Profile  
 
 Post subject: Oracle OCI Driver
PostPosted: Thu Mar 25, 2004 1:12 pm 
Newbie

Joined: Fri Mar 19, 2004 6:53 pm
Posts: 2
For anyone who is interested I figured out the problem. In the jboss-service.xml file in the server conf directory you need to set the the Pad attribute of the XidFactory mbean to true.

<mbean code="org.jboss.tm.XidFactory"
name="jboss:service=XidFactory">
<attribute name="Pad">true</attribute>
</mbean>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 8:35 am 
Beginner
Beginner

Joined: Sat Sep 04, 2004 7:07 am
Posts: 20
Location: Helsinki, Finland
This advice was valuable. In JBoss4.0.3sp1 the same adjustment is made in the jmx-console:
...
jboss
...
* service=XidFactory
...
List of MBean attributes:
...
Pad boolean RW True False MBean Attribute.

by setting 'pad=true'

_________________
Risto


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 10:22 am 
Beginner
Beginner

Joined: Sat Sep 04, 2004 7:07 am
Posts: 20
Location: Helsinki, Finland
Completion to the previous mail:

To make the setting 'pad=true' permanent you have to edit the */deploy/jta-service.xml.

Of course this a bit out of place here in Hibernate forum.

_________________
Risto


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.