I get transaction timeout error as follow, when I run my JBOSS.
SystemException The following problem occured: null; nested exception is:
java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.a
rjunacore.inactive] The transaction is not active!; - nested throwable: (java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transactio
n.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not active!): null; nested exception is:
java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.a
rjunacore.inactive] The transaction is not active!; - nested throwable: (java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transactio
n.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not active!): [com.arjuna.ats.internal.jt
a.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not active! called at com.jco
ffee.base.global.ExceptionMapper.handleException(ExceptionMapper.java:240)
I googled the error and came across a solution which involves changing the transaction timeout from 300 to a higher value and I did so,
<mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
name="jboss:service=TransactionManager">
<attribute name="TransactionTimeout">3000</attribute>
<attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
</mbean>
but still the error persist.
My heapsizes are as follow:
-Xms2000m
-Xmx2000m
-XX:PermSize=256M
-XX:MaxPermSize=256m
Before the error occurs, Garbage collector unloads a large number of classes and the RAM is left only with few MB of free space. I have aroung 6GB of RAM + 3GB of pagefiles
Any help will be really appreciated.
Thanks a lot in advance.
I have seen that exception when the transaction timeout is reached, I think that increasing the timeout should solve the problem.
Try to set the transaction timeout to UserTransaction object like is showed here. (Using BMT section)
Related
I am working on a Kafka stream application based on spring-boot and java 8. We use Kafka clients version 2.5.0
I noticed that sometimes (not always) when forwarding a record from a punctuator, the operation fails with a null pointer exception. Here is the stack trace:
Caused by: org.apache.kafka.streams.errors.StreamsException: task [2_2] Abort sending since an error caught with a previous record (timestamp 1603721062667) to topic reply-reminder-push-sender due to java.lang.NullPointerException\tat
org.apache.kafka.streams.processor.internals.RecordCollectorImpl.send(RecordCollectorImpl.java:240)\tat
org.apache.kafka.streams.processor.internals.RecordCollectorImpl.send(RecordCollectorImpl.java:111)\tat org.apache.kafka.streams.processor.internals.SinkNode.process(SinkNode.java:89)\tat
org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:201)\tat
org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:180)\tat
org.apache.kafka.streams.processor.internals.ProcessorContextImpl.forward(ProcessorContextImpl.java:133)\t... 24 common frames omitted
Caused by: java.lang.NullPointerException: null\tat
org.apache.kafka.common.record.DefaultRecord.sizeOf(DefaultRecord.java:613)\tat
org.apache.kafka.common.record.DefaultRecord.recordSizeUpperBound(DefaultRecord.java:633)\tat org.apache.kafka.common.record.DefaultRecordBatch.estimateBatchSizeUpperBound(DefaultRecordBatch.java:534)\tat
org.apache.kafka.common.record.AbstractRecords.estimateSizeInBytesUpperBound(AbstractRecords.java:135)\tat
org.apache.kafka.common.record.AbstractRecords.estimateSizeInBytesUpperBound(AbstractRecords.java:125)\tat org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:914)\tat
org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:862)\tat org.apache.kafka.streams.processor.internals.RecordCollectorImpl.send(RecordCollectorImpl.java:181)\t... 29 common frames omitted
It looks like there is a null pointer exception in the library when calculating the size of record headers but I donĀ“t think I am creating or updating them. Is there any way to fix it?
Thanks
Why JBOSS ORACLE datasource doesn't fail fast when query times out?
Environment: jboss-eap-7.0
I was waiting a fast fail with the exception:
java.sql.SQLTimeoutException: ORA-01013 user requested cancel of current operation
But I get the following after the end of transaction.
Caused by: java.lang.Throwable: setRollbackOnly called from:
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.setRollbackOnly(TransactionImple.java:339)
How do I force it to fail fast?
This is related to the JDBC driver version and firewall stuff.
This is not related to JBOSS, XA, JTA, DATASOURCE or something else.
See: https://www.ibm.com/mysupport/s/question/0D50z000062kF2p/why-is-the-webspheredefaultquerytimeout-property-for-timing-out-sql-queries-not-working
I have just started working on Spring Batch (version 3.0.6). I have a job and inside step I'm having Reader->Processor->Writer.
How we can catch or identify the exception is thrown if file is not found while reading. In this case I want to trigger email.
You can use the StepExecutionListener to process the exception that is thrown by the ItemStream#open (as the opening of a file in the FlatFileItemReader is), sending your email from there. To get the exception that caused the failure, you can look at StepExecution#getFailureExceptions which will contain the exception that caused the step to fail.
You can read more about the StepExecutionListener in the javadoc here: https://docs.spring.io/spring-batch/apidocs/org/springframework/batch/core/StepExecutionListener.html
What events cause "org.springframework.transaction.TransactionSystemException - Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking" exceptions?
I got the same error with spring and Jpa.
The problem was with disconnection to Mysql database in case of timeout. I didn't use application during the night and in the morning I got the same error. When you inactive, spring do nothing and it get timeout.
To prevent it you can add into application.properties next lines:
spring.datasource.connection-test-query="SELECT 1"
spring.datasource.test-while-idle=true
spring.datasource.test-on-borrow=true
Now it works fine.
Also additional info from Virtustilus blog can be useful.
If the transaction is a XA-Transaction (distributed) then one of the participants might have rejected the rollback.
I've installed the Eclipse (eclipse-SDK-3.6.2-aix-gtk-ppc64.zip) on an AIX instance. Initially it appeared to be starting but buttons would just stop working. I eventually tracked this down to Eclipse throwing the following exception:
JVMDUMP006I Processing dump event "systhrow", detail "java/lang/OutOfMemoryError" - please wait.
JVMDUMP032I JVM requested Snap dump using '/home/atginst/eclipse/Snap.20120309.111040.8650798.0001.trc' in response to an event
JVMDUMP010I Snap dump written to /home/atginst/eclipse/Snap.20120309.111040.8650798.0001.trc
JVMDUMP032I JVM requested Heap dump using '/home/atginst/eclipse/heapdump.20120309.111040.8650798.0002.phd' in response to an event
JVMDUMP010I Heap dump written to /home/atginst/eclipse/heapdump.20120309.111040.8650798.0002.phd
JVMDUMP032I JVM requested Java dump using '/home/atginst/eclipse/javacore.20120309.111040.8650798.0003.txt' in response to an event
JVMDUMP010I Java dump written to /home/atginst/eclipse/javacore.20120309.111040.8650798.0003.txt
JVMDUMP013I Processed dump event "systhrow", detail "java/lang/OutOfMemoryError".
Exception in thread "[Timer] - Main Queue Handler" java.lang.OutOfMemoryError: native memory exhausted
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:274)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
at org.eclipse.equinox.internal.util.ref.Log.getService(Log.java:424)
at org.eclipse.equinox.internal.util.ref.Log.logMessage(Log.java:438)
at org.eclipse.equinox.internal.util.ref.Log.error(Log.java:155)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.ThreadPoolManagerImpl.getObject(ThreadPoolManagerImpl.java:98)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.ThreadPoolManagerImpl.execute(ThreadPoolManagerImpl.java:201)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.ThreadPoolFactoryImpl.execute0(ThreadPoolFactoryImpl.java:112)
at org.eclipse.equinox.internal.util.impl.tpt.timer.TimerImpl.run(TimerImpl.java:110)
at java.lang.Thread.run(Thread.java:736)
I have changed the -Xms and -Xmx values to different settings to no avail. Analyzing the corresponding thread dump shows that 99% of the memory in the VM is available.
Am I missing something obvious in setting this up?
I would try setting the -Xss and -Xmso option to set the internal/OS thread stack size. Its a nonstandard option on IBM's JVM.
After various attempts at editing the eclipse.ini file, the only reliable way I can currently start it with is by passing the -vm parameter in the startup as follow:
./eclipse -vm /Websphere/java/bin/java -vmargs -Xmx1024M &