TheOpenCloudEngine/uengine-bpm

looping Transaction

dunglt91 opened this issue · 2 comments

Hi Jinyoung, I have a error with log

TransactionAspectSupport : prepareTransactionInfo Getting transaction for [org.uengine.processmanager.ProcessManagerBean.executeProcessByWorkitem]
10:39:12,427 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,428 INFO [stdout] (http--0.0.0.0-8080-4) ----------- SpringConnectionFactory: getConnection()
10:39:12,430 INFO [stdout] (http--0.0.0.0-8080-4) DEBUG - TransactionSynchronizationManager : getResource Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@624e746e] for key [org.springframework.jdbc.datasource.DriverManagerDataSource@f9c5bcb] bound to thread [http--0.0.0.0-8080-4]
10:39:12,453 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,513 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,526 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,531 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,541 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,547 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,552 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,560 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,561 INFO [stdout] (http--0.0.0.0-8080-4) 11
10:39:12,561 INFO [stdout] (http--0.0.0.0-8080-4) 31
10:39:12,561 INFO [stdout] (http--0.0.0.0-8080-4) - [uEngine] Start Executing Activity: Tiếp nhận hồ sơ (1)
10:39:12,562 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,562 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,564 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,565 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,566 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,568 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,590 INFO [stdout] (http--0.0.0.0-8080-4) ReceiveActivity::waiting for message : onHumanActivityResult1
10:39:12,591 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,592 INFO [stdout] (http--0.0.0.0-8080-4) [SimpleTransactionContext]: getConnection ()
10:39:12,592 INFO [stdout] (http--0.0.0.0-8080-4) [DefaultConnectionFactory]: getConnection
10:39:12,607 INFO [stdout] (http--0.0.0.0-8080-4) - [uEngine] End Executing Activity: Tiếp nhận hồ sơ (1) - Elapsed Time : 46
10:39:12,609 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,611 INFO [stdout] (http--0.0.0.0-8080-4) ProcessDefinition::fireMessage.message = onHumanActivityResult1
10:39:12,611 INFO [stdout] (http--0.0.0.0-8080-4) distribute message to 1
10:39:12,612 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,613 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,616 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,619 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,621 INFO [stdout] (http--0.0.0.0-8080-4) 11
10:39:12,621 INFO [stdout] (http--0.0.0.0-8080-4) 31
10:39:12,621 INFO [stdout] (http--0.0.0.0-8080-4) - [uEngine] Start Executing Activity: mapping (18)
10:39:12,622 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,624 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,625 INFO [stdout] (http--0.0.0.0-8080-4) 11
10:39:12,625 INFO [stdout] (http--0.0.0.0-8080-4) 31
10:39:12,625 INFO [stdout] (http--0.0.0.0-8080-4) - [uEngine] Start Executing Activity: script (24)
10:39:12,626 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,842 INFO [stdout] (http--0.0.0.0-8080-4) [DefaultConnectionFactory]: getConnection
10:39:12,852 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,861 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,869 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,877 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,885 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,893 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,902 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,911 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,919 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,927 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,936 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,945 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,954 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,963 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,972 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,982 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:12,991 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,000 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,009 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,019 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,029 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,038 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,048 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,057 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,066 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,076 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,085 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,094 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,104 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,113 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,122 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,132 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,141 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,151 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,162 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,171 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,181 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,190 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,199 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,209 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,218 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,228 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,237 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,246 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,256 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,266 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,275 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,284 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,293 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,302 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,312 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,322 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,332 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,341 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,351 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,360 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,370 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,379 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,389 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,399 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,408 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,417 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,427 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,436 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,445 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,455 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,464 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,473 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,483 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,493 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,502 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,512 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,521 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,530 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,540 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,549 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,558 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,568 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,578 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,587 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,596 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,606 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,615 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,624 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,633 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,642 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,652 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,661 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,670 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,679 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,688 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,698 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,707 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,717 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,726 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,736 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,745 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,754 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,763 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,772 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,781 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,790 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,799 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection ()
10:39:13,808 INFO [stdout] (http--0.0.0.0-8080-4) [TransactionContext]: getConnection
17900 Segmentation fault (core dumped) "/usr/java/jdk1.6.0_25/bin/java" -server -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/home/egov/quangngai/tmp/liferay -Duser.timezone=GMT+7 -XX:MaxPermSize=1024m -Xmx12288m -Xms6144m -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:/home/egov/quangngai/logs/gc.log "-Dorg.jboss.boot.log.file=/home/egov/quangngai/liferay/jboss-7.0.2/standalone/log/boot.log" "-Dlogging.configuration=file:/home/egov/quangngai/liferay/jboss-7.0.2/standalone/configuration/logging.properties" -jar "/home/egov/quangngai/liferay/jboss-7.0.2/jboss-modules.jar" -mp "/home/egov/quangngai/liferay/jboss-7.0.2/modules" -logmodule org.jboss.logmanager -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir="/home/egov/quangngai/liferay/jboss-7.0.2"

my srcipt:

java.lang.StringBuffer userSql  = new StringBuffer();
java.sql.ResultSet userRs = null;
java.sql.Statement stmt2  = null;
java.sql.Connection   conn = null;
try{
java.lang.Object ma_hs_obj= instance.get("noiNopHoSo");
 java.lang.String ms= ma_hs_obj.toString();
 conn = org.uengine.util.dao.DefaultConnectionFactory.create().getConnection();
stmt2 = conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_SENSITIVE,java.sql.ResultSet.CONCUR_UPDATABLE);
 userSql.setLength(0);
 userSql.append(" select a.EMPCODE,a.ISADMIN,a.EMPNAME,a.JIKNAME,a.EMAIL");
userSql.append("  FROM emptable a where a.partcode = concat('" + ms + "','26')");       
userRs = stmt2.executeQuery(userSql.toString());
java.lang.String EMPCODE = null;
 java.lang.String EMPNAME = null;
 java.lang.String roleName="VPD";
org.uengine.kernel.RoleMapping roleMapping=activity.getProcessDefinition().getRole(roleName).getMapping(instance);
 while(userRs.next()){
  EMPCODE = userRs.getString("EMPCODE") == null ? "" : userRs.getString("EMPCODE");
  EMPNAME = userRs.getString("EMPNAME") == null ? "" : userRs.getString("EMPNAME");
  roleMapping.setResourceName(EMPNAME);
  roleMapping.setEndpoint(EMPCODE);
  if(!userRs.isLast()){
   roleMapping.moveToAdd();
  }
 }
 instance.putRoleMapping(roleName,roleMapping);
 userRs.close();
 return roleMapping;
 } catch(Exception e) { 
  throw new RuntimeException(e); 
  } finally {
   if (stmt2 != null)
   try {
    stmt2.close();
   } catch (Exception e) {
   }
   if (conn != null)
   try {
    conn.close();
   } catch (Exception e) {
   }
  }

It's loop until my jboss is Segmentation.!
But I don't know why, pls give me some ideas?

Hi, dunglt91

Can you attach the full source of the class file?
since uEngine need a Spring container to invoke the APIs, you need to declare some spring @component and give @transactional annotation for the method too.

pls see this: https://github.com/TheOpenCloudEngine/uengine-bpm/wiki/ProcessManagerRemote-API