MySQL Forums
Forum List  »  Italian

Lo XADatasource non permette di eseguire delle "insert into.." con Jboss 4.2.2!!!
Posted by: Massimiliano Magistri
Date: February 11, 2008 01:54PM

Ciao a tutti,

Sto avendo problemi utilizzando uno XA Datasource Mysql.

In pratica, in ambiente Jboss 4.2.2, ogni volta che faccio delle select
(tramite mapping hibernate)
tutto va liscio, mentre quando eseguo delle insert (a seguito di una chimata
ad un metodo save() di hibernate)
ottengo eccezioni come quella riportata alla fine.

L'eccezione viene scaturita dopo che richiamo una "saveRequest()" che non
deve far altro che persistere un oggetto Request (su una tabella mysql
opportunamente mappata e definita).

Se persisito "a mano" viene persistito tranquillamente. CiĆ² esclude problemi
di mapping hibernate o problemi di tipo dei dati da persistere.

19:14:08,373 INFO [STDOUT] Hibernate:
insert
into
request
(request_date, contract_id)
values
(?, ?)
19:14:08,373 WARN [TxConnectionManager] Connection error occured:
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1ae90c9[state=NORMAL
mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@144719c handles=1
lastUse=1202753648227 permit=true trackByTx=true
mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1991ccf
context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1329346
xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@1a39fdc
txSync=null]
java.lang.NullPointerException
at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setDate(WrappedPreparedStatement.java:342)
...
at org.hibernate.type.DateType.set(DateType.java:44)
)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Unknown Source)
19:14:08,376 INFO [DateType] could not bind value '11 febbraio 2008' to
parameter: 1; Error; - nested throwable: (java.lang.NullPointerException)
...
19:14:08,380 ERROR [STDERR] at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
19:14:08,380 ERROR [STDERR] at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
19:14:08,380 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
19:14:08,380 ERROR [STDERR] Caused by: java.lang.NullPointerException
19:14:08,380 ERROR [STDERR] at
org.jboss.resource.adapter.jdbc.WrappedStatement.internalClose(WrappedStatement.java:590)
19:14:08,380 ERROR [STDERR] at
org.jboss.resource.adapter.jdbc.WrappedStatement.close(WrappedStatement.java:75)
19:14:08,380 ERROR [STDERR] at
org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:534)
...
19:14:08,381 ERROR [STDERR] at
com.prj.DataManager.saveRequest(DataManager.java:46)

19:14:08,412 ERROR [AssertionFailure] an assertion failure occured (this
may indicate a bug in Hibernate, but is more likely due to unsafe use of the
session)
...
at java.lang.Thread.run(Unknown Source)
19:14:08,413 WARN [arjLoggerI18N]
[com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2]
TwoPhaseCoordinator.beforeCompletion - failed for
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@142b123
...
19:14:08,414 WARN [loggerI18N]
[com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror]
[com.arjuna.ats.internal.jta.resources.arjunacore.rollbackxaerror]
XAResourceRecord.rollback - xa error
[com.arjuna.ats.jta.utils.unknownerrorcode] Unknown error code:0
19:14:08,414 WARN [arjLoggerI18N]
[com.arjuna.ats.arjuna.coordinator.BasicAction_54] - Top-level abort of
action a156303:e9ef:47b08fd5:65 received TwoPhaseOutcome.FINISH_ERROR from
<ClassName:RecordType.JTA_RECORD>
19:14:08,415 ERROR [STDERR] javax.transaction.RollbackException:
[com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted]
[com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't
commit because the transaction is in aborted state
...
19:14:08,417 ERROR [STDERR] at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
19:14:08,417 ERROR [STDERR] ... 22 more
19:14:08,417 ERROR [[ReEvaluation]] Servlet.service() for servlet
ReEvaluation threw exception
...
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Unknown Source)

Qualcuno ha idea di cosa succede?


Potete rispondermi ad m.magistri@reply.it ?

grazie comunque!

Massi

Options: ReplyQuote


Subject
Views
Written By
Posted
Lo XADatasource non permette di eseguire delle "insert into.." con Jboss 4.2.2!!!
5123
February 11, 2008 01:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.