[JBossCache] - Re: java.lang.IllegalStateException: there is already a writ
by mindflyer
"manik.surtani(a)jboss.com" wrote : Have you tried the teast case attached in JBCACHE-740? (You may need tomodify this a bit since 740 was contributed by someone using JOTM)
Firstly, I added logging to MultithreadedTxTest.Worker.run into catch section:
catch (Exception e)
| {
| exception = e;
| log.error("exception", e);
| try
| {
| tx.rollback();
| }
| catch (Exception e1)
| {
| rollbackException = e1;
| log.error("rollbackException", e1);
| }
| }
started test and test passed, but log contains many errors:
11:28:34,484 ERROR [DummyTransaction] beforeCompletion() failed for tx=org.jboss.cache.transaction.DummyTransaction@10f11b8, handlers=[TxInterceptor.LocalSynchronizationHandler(gtx=GlobalTransaction:<null>:168, tx=org.jboss.cache.transaction.DummyTransaction@10f11b8)]
| java.lang.RuntimeException:
| at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1163)
| at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:75)
| at org.jboss.cache.transaction.DummyTransaction.notifyBeforeCompletion(DummyTransaction.java:247)
| at org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:54)
| at net.uk.topdog.td2.common.server.statistics.MultithreadedTxTest$Worker.run(MultithreadedTxTest.java:144)
| Caused by: org.jboss.cache.optimistic.DataVersioningException: Tx attempted to create /path/node anew. It has already been created since this tx started by another (possibly remote) tx.
| at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.simpleValidate(OptimisticValidatorInterceptor.java:139)
| at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.validateNodes(OptimisticValidatorInterceptor.java:113)
| at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:78)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:99)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.TxInterceptor.runPreparePhase(TxInterceptor.java:873)
| at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1138)
| ... 4 more
| 11:28:34,484 ERROR [MultithreadedTxTest] exception
| javax.transaction.RollbackException: outcome is false status: 1
| at org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:67)
| at net.uk.topdog.td2.common.server.statistics.MultithreadedTxTest$Worker.run(MultithreadedTxTest.java:144)
Is it all right?
Secondly, I set TransactionManagerLookupClass = "org.jboss.cache.JBossTransactionManagerLookup" and ran test under the running JBoss. I see:
| 11:48:12,187 INFO [InterceptorChainFactory] interceptor chain is:
| class org.jboss.cache.interceptors.CallInterceptor
| class org.jboss.cache.interceptors.OptimisticNodeInterceptor
| class org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor
| class org.jboss.cache.interceptors.OptimisticValidatorInterceptor
| class org.jboss.cache.interceptors.OptimisticLockingInterceptor
| class org.jboss.cache.interceptors.TxInterceptor
| class org.jboss.cache.interceptors.CacheMgmtInterceptor
| 11:48:12,218 INFO [STDOUT] >> testing simultaneous writes with 2 threads...
| 11:48:12,250 ERROR [MultithreadedTxTest] exception
| org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImp
| l[FormatId=257, GlobalId=SI/28, BranchQual=, localId=28] status=STATUS_NO_TRANSA
| CTION; - nested throwable: (java.lang.RuntimeException: )
| at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
| at net.uk.topdog.td2.common.server.statistics.MultithreadedTxTest$Worker
| .run(MultithreadedTxTest.java:144)
| Caused by: java.lang.RuntimeException:
| at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandle
| r.beforeCompletion(TxInterceptor.java:1163)
| at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeComp
| letion(OrderedSynchronizationHandler.java:75)
| at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:
| 1491)
| at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1110)
|
| at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
| ... 1 more
| Caused by: org.jboss.cache.optimistic.DataVersioningException: Tx attempted to c
| reate /path anew. It has already been created since this tx started by another
| (possibly remote) tx.
| at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.simpleVal
| idate(OptimisticValidatorInterceptor.java:139)
| at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.validateN
| odes(OptimisticValidatorInterceptor.java:113)
| at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(Op
| timisticValidatorInterceptor.java:78)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(Opti
| misticLockingInterceptor.java:99)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.TxInterceptor.runPreparePhase(TxIntercep
| tor.java:873)
| at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandle
| r.beforeCompletion(TxInterceptor.java:1138)
| ... 5 more
| 11:48:12,250 ERROR [MultithreadedTxTest] rollbackException
| java.lang.IllegalStateException: Transaction has terminated TransactionImpl:XidI
| mpl[FormatId=257, GlobalId=SI/28, BranchQual=, localId=28]
| at org.jboss.tm.TransactionImpl.lock(TransactionImpl.java:834)
| at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:395)
| at net.uk.topdog.td2.common.server.statistics.MultithreadedTxTest$Worker
| .run(MultithreadedTxTest.java:153)
| 11:48:12,250 ERROR [MultithreadedTxTest] Failed test
| junit.framework.AssertionFailedError: rollback failed
| at junit.framework.Assert.fail(Assert.java:47)
| at junit.framework.Assert.assertTrue(Assert.java:20)
| at junit.framework.Assert.assertNull(Assert.java:233)
| at net.uk.topdog.td2.common.server.statistics.MultithreadedTxTest.testSi
| multanWrite(MultithreadedTxTest.java:74)
| at net.uk.topdog.td2.common.server.statistics.MultithreadedTxTest.testSi
| multanWrite(MultithreadedTxTest.java:44)
| at net.uk.topdog.td2.common.server.statistics.MultithreadedTxTest.myStar
| tTest(MultithreadedTxTest.java:177)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030970#4030970
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030970
19Â years, 1Â month
[JBossWS] - Re: dynamic clients for JBossWS/JAX-WS endpoints
by mreis
After some more research I'm pretty sure that in the case of a truly dynamic client (i.e. no client-side stub generation from a remote WSDL before running the client that then invokes the WebService call) that should interact with a WebService operation, that has one or more custom complex input/output parameters, I can only create ("manually and dynamically") and then send SOAP messages via Dispatch (even JAXB-Dispatch won't help in my case).
In the case of simple data types I could still use the "old" JAX-RPC DII client approach.
Can you (or someone else) think of other possibilities or tell me if I'm completely wrong?
Does anyone know of a Java library that can create "sample" SOAP messages (see Altova XML Spy or Eclipse WebServices Explorer or Web Service Console Eclipse Plugin or ...) given a specific WebService operation in a WSDL (I know this question may be a bit off topic, but it seems as it would be a key building block in order to go with the JAX-WS Dispatch client)?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030966#4030966
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030966
19Â years, 1Â month