[JBoss JIRA] Created: (JBPM-1465) NullPointerException on transaction.rollback() in DbPersistenceService
by Martin Putz (JIRA)
NullPointerException on transaction.rollback() in DbPersistenceService
----------------------------------------------------------------------
Key: JBPM-1465
URL: https://jira.jboss.org/jira/browse/JBPM-1465
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jPDL 3.2.3, SOA 4.2 CP02
Reporter: Martin Putz
Assignee: Alejandro Guizar
We are having NullPointerException from DbPersistenceService when Hibernate throws Exception on close() method. The line is transaction.rollback(); in rollback() method. My two cents is this code should be embraced with "if ( isTransactionEnabled && (transaction != null) )" statement, because we are using external JDBC Connection provider, and the transaction reference never be set.
All calls to the rollback() method in DbPersistenceService are already preceded by a check for
if ( (isTransactionEnabled)
&& (transaction!=null)
) {
except this one after an exception has happened during the Hibernate session.flush call:
Exception flushException = flushSession();
if (flushException!=null) {
rollback(); // missing check if there is a transaction
closeSession();
closeConnection();
throw new JbpmPersistenceException("hibernate flush failed", flushException);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[JBoss JIRA] Closed: (JBPM-1452) JbpmConfiguration assumes the object factory has a jbpm.job.executor entry
by Alejandro Guizar (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-1452?page=com.atlassian.jira.plug... ]
Alejandro Guizar closed JBPM-1452.
----------------------------------
Closing issues that I resolved in already released versions.
> JbpmConfiguration assumes the object factory has a jbpm.job.executor entry
> --------------------------------------------------------------------------
>
> Key: JBPM-1452
> URL: https://jira.jboss.org/jira/browse/JBPM-1452
> Project: JBoss jBPM
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: 3.3 snapshot
> Spring
> Reporter: Alejandro Guizar
> Assignee: Alejandro Guizar
> Fix For: jBPM 3.3.0 GA
>
>
> The following exception is thrown while completing a task that ends a process. The application runs with the 3.3 snapshot JAR.
> org.jbpm.configuration.ConfigurationException: name 'jbpm.job.executor' is not defined in the configuration. configured names: [resource.hibernate.queries.hbm.xml, jbpm.msg.wait.timout, jbpm.task.instance.factory, resource.default.modules, resource.varmapping, resource.business.calendar, resource.action.types, resource.parsers, default.jbpm.context, resource.node.types, resource.converter, jbpm.variable.resolver, jbpm.byte.block.size]
> at org.jbpm.configuration.ObjectFactoryImpl.createObject(ObjectFactoryImpl.java:76)
> at org.jbpm.JbpmConfiguration.getJobExecutor(JbpmConfiguration.java:603)
> at org.jbpm.scheduler.db.DbSchedulerService.<init>(DbSchedulerService.java:51)
> at org.jbpm.scheduler.db.DbSchedulerServiceFactory.openService(DbSchedulerServiceFactory.java:32)
> at org.jbpm.svc.Services.getService(Services.java:156)
> at org.jbpm.svc.Services.getCurrentService(Services.java:94)
> at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:328)
> at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:329)
> at org.jbpm.graph.exe.Token.end(Token.java:301)
> at org.jbpm.graph.exe.Token.end(Token.java:251)
> at org.jbpm.graph.node.EndState.execute(EndState.java:59)
> The 3.3 snapshot is looking for 'jbpm.job.executor' which is defined in the default.jbpm.cfg.xml, but which the application does not have in its jbpm.cfg.xml. It works with 3.2.2. The JobExecutor is set up manually in a Spring configuration.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[JBoss JIRA] Closed: (JBPM-1620) EntitySchedulerService fails with ObjectNotFoundException
by Alejandro Guizar (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-1620?page=com.atlassian.jira.plug... ]
Alejandro Guizar closed JBPM-1620.
----------------------------------
Closing issues that I resolved in already released versions.
> EntitySchedulerService fails with ObjectNotFoundException
> ---------------------------------------------------------
>
> Key: JBPM-1620
> URL: https://jira.jboss.org/jira/browse/JBPM-1620
> Project: JBoss jBPM
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: jBPM 3.2.3
> Environment: jbpm-enterprise.ear with jbpm.cfg.xml:
> <service name="scheduler" factory="org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory" />
> Reporter: Martin Putz
> Assignee: Alejandro Guizar
> Fix For: jBPM 3.3.0 GA
>
>
> When a process contains a timer definition, the EntitySchedulerService#createTimer function fails with the following stacktrace:
> 2008-08-14 14:42:22,563 DEBUG [org.jbpm.scheduler.ejbtimer.EntitySchedulerService] creating timer timer(initialReminder,08-08-14 14:42:32,553,Token: 6999)
> 2008-08-14 14:42:22,563 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
> 2008-08-14 14:42:22,563 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
> 2008-08-14 14:42:22,563 DEBUG [org.hibernate.SQL] select nextval ('hibernate_sequence')
> 2008-08-14 14:42:22,564 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier generated: 7000
> 2008-08-14 14:42:22,564 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
> 2008-08-14 14:42:22,564 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
> 2008-08-14 14:42:22,564 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
> 2008-08-14 14:42:22,564 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 7000, using strategy: org.hibernate.id.SequenceGenerator
> 2008-08-14 14:42:22,565 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.TimerEntityBean#findByPrimaryKey] Executing SQL: SELECT t0_TimerEntityBean.ID_ FROM jbpm_job t0_TimerEntityBean WHERE t0_TimerEntityBean.ID_=?
> 2008-08-14 14:42:22,566 ERROR [org.jbpm.scheduler.ejbtimer.EntitySchedulerService] failed to retrieve entity for timer timer(initialReminder,08-08-14 14:42:32,553,Token: 6999)
> javax.ejb.ObjectNotFoundException: No such entity!
> at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:64)
> at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:604)
> at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:315)
> at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:236)
> at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1099)
> at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:676)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> ...
> at $Proxy62.findByPrimaryKey(Unknown Source)
> The new record has not been written to the JBPM_JOB table at the time the timerEntityHome.findByPrimaryKey(new Long(timer.getId())); call is made. I tried adding a Hibernate session.flush() before, which solved this problem. But as a consequence this workaround showed the symptoms of multiple 1-phase aware participants enlisting in the same transaction (http://wiki.jboss.org/wiki/Multiple1PC), so there must be a cleaner solution to it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[JBoss JIRA] Created: (JBPM-1709) JtaDbPersistenceService cannot begin Tx
by Thomas Diesler (JIRA)
JtaDbPersistenceService cannot begin Tx
---------------------------------------
Key: JBPM-1709
URL: https://jira.jboss.org/jira/browse/JBPM-1709
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Thomas Diesler
Fix For: jBPM 3.3.0
org.jbpm.JbpmException: couldn't start JTA transaction
at org.jbpm.persistence.jta.JtaDbPersistenceService.beginJtaTransaction(JtaDbPersistenceService.java:74)
at org.jbpm.persistence.jta.JtaDbPersistenceService.<init>(JtaDbPersistenceService.java:47)
at org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory.openService(JtaDbPersistenceServiceFactory.java:63)
at org.jbpm.svc.Services.getService(Services.java:156)
at org.jbpm.svc.Services.getPersistenceService(Services.java:195)
at org.jbpm.persistence.jta.JtaDbPersistenceTest.isTxCreatedByService(JtaDbPersistenceTest.java:194)
at org.jbpm.persistence.jta.JtaDbPersistenceTest.deployProcess(JtaDbPersistenceTest.java:79)
at org.jbpm.persistence.jta.JtaDbPersistenceTest.testServiceTx(JtaDbPersistenceTest.java:59)
at org.jbpm.persistence.jta.JtaDbPersistenceTest.testUserTx(JtaDbPersistenceTest.java:50)
Caused by: javax.transaction.NotSupportedException
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:79)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:77)
at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:124)
at org.jbpm.persistence.jta.JtaDbPersistenceService.beginJtaTransaction(JtaDbPersistenceService.java:72)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[JBoss JIRA] Created: (JBPM-1717) web console: disable job executor launcher and resolve ejb and destination references
by Alejandro Guizar (JIRA)
web console: disable job executor launcher and resolve ejb and destination references
-------------------------------------------------------------------------------------
Key: JBPM-1717
URL: https://jira.jboss.org/jira/browse/JBPM-1717
Project: JBoss jBPM
Issue Type: Task
Security Level: Public (Everyone can see)
Components: jPDL 3
Reporter: Alejandro Guizar
Priority: Blocker
Fix For: jBPM 3.3.0 CR1
After much scratching my head over why the enterprise tests simply do not work despite they already worked in 3.2.3, I realized the job executor was running, which interferes with the enterprise scheduler and message services. The job executor launcher has to be disabled and the commented out ejb and destination references must be uncommented and resolved against the EJBs.
The forum link discusses ear vs sar packaging, which influences how the ejb and destination references will be resolved.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[JBoss JIRA] Created: (JBPM-1754) StaleObjectLog verbosity control code should be added to flushSession()
by Alejandro Guizar (JIRA)
StaleObjectLog verbosity control code should be added to flushSession()
-----------------------------------------------------------------------
Key: JBPM-1754
URL: https://jira.jboss.org/jira/browse/JBPM-1754
Project: JBoss jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Alejandro Guizar
Fix For: jBPM 3.3.0 GA
DbPersistenceService.flushSession line #272
Since a StaleObjectStateExcetion occures in flushSession() rather than commit(), StaleObjectLog verbosity control code should be added to flushSession() method as the same manner as commit(). See the following code snippet. An external transaction manager is being used and indeed DbPersistenceService.commit() does nothing.
Exception flushSession() {
if (mustSessionBeFlushed) {
try {
log.debug("flushing hibernate session " + session.toString());
session.flush();
// >>>>>>> begin
} catch (StaleObjectStateException e) {
log.info("optimistic locking failed");
StaleObjectLogConfigurer.staleObjectExceptionsLog.error("optimistic locking failed", e);
return e;
// <<<<<<< end
} catch (Exception e) {
log.error("hibernate flush failed", e);
return e;
}
}
return null;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months