[ 
https://issues.apache.org/jira/browse/OFBIZ-3707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496875#comment-13496875
 ] 

Rashmi R Hati edited comment on OFBIZ-3707 at 11/14/12 5:50 AM:
----------------------------------------------------------------

The issue has been resolved. The issue was mainly deu to more number of threads 
created by the ofbiz.ear deployed in JBoss. In JBoss the GenericXaResource 
class was responsible for creating lot of logging threads and keeping it in 
sleep state further making the thread count more than limit of threads 
specified in the Linux OS. ulimit command in linux provides you the details of 
thread limit. On commenting out the following line in // thread run method
public void run() {
// sleep(timeout.intValue() * 1000);
.
.
.
}

The thread count came down to 200. Earlier it was in 1000's.

Somewhat it was been resolved. 
So, committers please check it.
                
      was (Author: rrhati2010):
    The issue has been resolved.
                  
> Error in polling JobSandbox, Exception: java.lang.OutOfMemoryError
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-3707
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3707
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/ecommerce
>    Affects Versions: Release Branch 09.04
>         Environment: Fedora 9 Linux,2GB RAM,Core2Duo Processor, deployed on 
> JBOSS 5.0 Appserver
>            Reporter: Rashmi R Hati
>            Assignee: Jacques Le Roux
>             Fix For: Release Branch 09.04
>
>
> Hi,
> I am using the Ofbiz Release 9.04 stable version.
> I am getting this error on simultaneously creating New Customers for the 
> ecommerce site - for 20 users
> ==============================================================================================================
> Error in polling JobSandbox: 
> [org.ofbiz.entity.transaction.GenericTransactionException: Not Supported 
> error, could not begin transaction (probably a nesting problem) 
> (BaseTransaction.checkTransactionState - 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread 
> is already associated with a transaction!)]. Rolling back transaction.
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: Not Supported error, could not begin transaction (probably a nesting 
> problem) (BaseTransaction.checkTransactionState - 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread 
> is already associated with a transaction!)
> ---- cause 
> ---------------------------------------------------------------------
> Exception: javax.transaction.NotSupportedException
> Message: BaseTransaction.checkTransactionState - 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread 
> is already associated with a transaction!
> ---- stack trace 
> ---------------------------------------------------------------
> javax.transaction.NotSupportedException: 
> BaseTransaction.checkTransactionState - 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread 
> is already associated with a transaction!
> com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:80)
> com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:65)
> org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:137)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:125)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:148)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:90)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> 16:27:18,249 ERROR [TransactionUtil] 
> ---- exception report 
> ----------------------------------------------------------
> WARNING: In setSetRollbackOnlyCause a stack placeholder was already in place, 
> here is the original rollbackOnly cause: Error in polling JobSandbox: 
> [org.ofbiz.entity.transaction.GenericTransactionException: Not Supported 
> error, could not begin transaction (probably a nesting problem) 
> (BaseTransaction.checkTransactionState - 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread 
> is already associated with a transaction!)]. Rolling back 
> transaction.org.ofbiz.entity.transaction.GenericTransactionException: Not 
> Supported error, could not begin transaction (probably a nesting problem) 
> (BaseTransaction.checkTransactionState - 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread 
> is already associated with a transaction!)
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: Not Supported error, could not begin transaction (probably a nesting 
> problem) (BaseTransaction.checkTransactionState - 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread 
> is already associated with a transaction!)
> ---- cause 
> ---------------------------------------------------------------------
> Exception: javax.transaction.NotSupportedException
> Message: BaseTransaction.checkTransactionState - 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread 
> is already associated with a transaction!
> ---- stack trace 
> ---------------------------------------------------------------
> javax.transaction.NotSupportedException: 
> BaseTransaction.checkTransactionState - 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] 
> [com.arjuna.ats.internal.jta.transaction.arjunacore.alreadyassociated] thread 
> is already associated with a transaction!
> com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:80)
> com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:65)
> org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:137)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:125)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:148)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:90)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------
> Also I am getting this OutOfMemory error when deployed in JBOSS 5.0.1
> =============================================================
> 15:47:08,530 ERROR [JobManager] 
> ---- exception report 
> ----------------------------------------------------------
> Error in polling JobSandbox: 
> [org.ofbiz.entity.transaction.GenericTransactionException: The current 
> transaction is marked for rollback, not beginning a new transaction and 
> aborting current operation; the rollbackOnly was caused by: Error in polling 
> JobSandbox: [java.lang.OutOfMemoryError: unable to create new native thread]. 
> Rolling back transaction.java.lang.OutOfMemoryError: unable to create new 
> native thread (unable to create new native thread)]. Rolling back transaction.
> Exception: org.ofbiz.entity.transaction.GenericTransactionException
> Message: The current transaction is marked for rollback, not beginning a new 
> transaction and aborting current operation; the rollbackOnly was caused by: 
> Error in polling JobSandbox: [java.lang.OutOfMemoryError: unable to create 
> new native thread]. Rolling back transaction.java.lang.OutOfMemoryError: 
> unable to create new native thread (unable to create new native thread)
> ---- cause 
> ---------------------------------------------------------------------
> Exception: java.lang.OutOfMemoryError
> Message: unable to create new native thread
> ---- stack trace 
> ---------------------------------------------------------------
> java.lang.OutOfMemoryError: unable to create new native thread
> java.lang.Thread.start0(Native Method)
> java.lang.Thread.start(Thread.java:597)
> org.ofbiz.entity.transaction.GenericXaResource.start(GenericXaResource.java:97)
> com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:789)
> com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:500)
> org.ofbiz.entity.transaction.GenericXaResource.enlist(GenericXaResource.java:67)
> org.ofbiz.entity.transaction.GenericXaResource.enlist(GenericXaResource.java:50)
> org.ofbiz.entity.transaction.DebugXaResource.enlist(DebugXaResource.java:50)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:141)
> org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:81)
> org.ofbiz.service.job.JobManager.poll(JobManager.java:148)
> org.ofbiz.service.job.JobPoller.run(JobPoller.java:90)
> java.lang.Thread.run(Thread.java:619)
> --------------------------------------------------------------------------------

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to