[Datasource Configuration] New message: "Creating 2Phase comit resources"
by Joël Hagaï
User development,
A new message was posted in the thread "Creating 2Phase comit resources":
http://community.jboss.org/message/530305#530305
Author : Joël Hagaï
Profile : http://community.jboss.org/people/heyjojo
Message:
--------------------------------------------------------------
Hello,
We are currently migrating our application technical base from
- JBOSS AS 4.0.3 SP1 to JBOSS AS 4.2.3 GA.
- JRules 6.5 to JRules 7.0.2
- Oracle 9i to Oracle 10g
After installing everything we experienced a problem we never faced before.
In fact every time our web application called the Jrules rule engine we recieved an Exception saying the transaction couln't enlist multiple resources.
After browsing the web we found out there was a change in JBoss's transaction manager default behaviour:
https://jira.jboss.org/jira/browse/JBAS-4467
http://community.jboss.org/docs/DOC-11443
However we cannot figure out why we get this error.
Indeed what we understood from the jboss Datasource documentation is that datasources defined by the tag <xa-datasource> support 2 phase comit and that <local-xa-datasource> ones only support one phase comit.
Yet our application only requires 2 different datasources:
- It's own datasource to access the database, which is defined as a *<local-xa-datasource>*
- and the JRules datasource only used by JRules modules which is defined as a *<xa-datasource>*
Therefore, we shouldn't enlist more than a two phase comit and a one phase comit resource in the same transaction.
We first tried to convert our *<local-xa-datasource>* into a* *<xa-datasource>* thinking it would convert it into a 2 phase comit compatible resource but it didn't change anything.*
So we decided to settup the *com.arjuna.ats.jta.allowMultipleLastResources* property to *true* in the jbossjta-service.xml file. This seems to fix our problem and probably got our application to work just like before.
However as the documentation says this property is only a workaround and we still believe we should find an other solution.
Now, every time our transaction rollbacks on our resource after invoking JRules we get a *javax.transaction.HeuristicMixedException (WARNING)* which we assume means the transaction comited our JRules resource but rollbacked our own.
Is our datasource comprehension incorrect?
Is there an obvious settup configuration we missed?
I noticed the following configuration which as we understand is only used to activate the LRCO optimization, but maybe we misunderstood:
com.arjuna.ats.arjuna.coordinator.commitOnePhase
Do you have any idea?
PS: We decided to post this thread in the datasource section as we believe the problem might be our datasource configuration.
Please excuse our english.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530305#530305
16 years, 1 month
[jBPM Development] New message: "jBPM 4.4 trunk build failure Reasonof"
by Maciej Swiderski
User development,
A new message was posted in the thread "jBPM 4.4 trunk build failure Reasonof":
http://community.jboss.org/message/530298#530298
Author : Maciej Swiderski
Profile : http://community.jboss.org/people/swiderski.maciej
Message:
--------------------------------------------------------------
Hello,
I have ran into troubles building complete jBPM 4.4 (from trunk - synchronized today). Problem is in Test DB module and the test that fails is:
org.jbpm.test.activity.forkjoin.JBPM2581ForkAndJoinTest
Reason of failure is:
-------------------------------------------------------------------------------
Test set: org.jbpm.test.activity.forkjoin.JBPM2581ForkAndJoinTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.012 sec <<< FAILURE!
testFullyNested(org.jbpm.test.activity.forkjoin.JBPM2581ForkAndJoinTest) Time elapsed: 0.004 sec <<< ERROR!
org.jbpm.api.JbpmException: resource org/jbpm/test/activity/forkjoin/fullynested.jpdl.xml does not exist
and
testWeirdNested(org.jbpm.test.activity.forkjoin.JBPM2581ForkAndJoinTest) Time elapsed: 0.002 sec <<< ERROR!
org.jbpm.api.JbpmException: resource org/jbpm/test/activity/forkjoin/weirdForkAndJoin.jpdl.xml does not exist
at org.jbpm.pvm.internal.stream.ResourceStreamInput.openStream(ResourceStreamInput.java:55)
Is this a known issue?
Regards
Maciej
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530298#530298
16 years, 1 month
[jBPM] New message: "null pointer exception when integrating jbpm4.3, spring2.5.6, hibernate3"
by praneet nandan
User development,
A new message was posted in the thread "null pointer exception when integrating jbpm4.3,spring2.5.6,hibernate3":
http://community.jboss.org/message/530294#530294
Author : praneet nandan
Profile : http://community.jboss.org/people/praneet
Message:
--------------------------------------------------------------
hi
am getting this when integrating all
>
> SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in ServletContext resource [/WEB-INF/classes/jbpm4-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [protected org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine()] threw exception; nested exception is java.lang.NullPointerException
> at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:423)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:901)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:815)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at org.apache.catalina.core.StandardService.start(StandardService.java:516)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [protected org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine()] threw exception; nested exception is java.lang.NullPointerException
> at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:127)
> at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:414)
> ... 32 more
> Caused by: java.lang.NullPointerException
> at org.jbpm.pvm.internal.processengine.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:152)
> at org.jbpm.pvm.internal.processengine.SpringProcessEngine.create(SpringProcessEngine.java:70)
> at org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:92)
> at org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine(SpringHelper.java:47)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)
> ... 33 more
my applicationcontext.xml is
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:aop="http://www.springframework.org/schema/aop"
> xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
> http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
> http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
> http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd"
> xmlns:context="http://www.springframework.org/schema/context"
> xmlns:p="http://www.springframework.org/schema/p"
> xmlns:tx="http://www.springframework.org/schema/tx"
> xmlns:util="http://www.springframework.org/schema/util">
>
> <tx:annotation-driven transaction-manager="transactionManager"/>
>
>
>
> <bean id="ds"
> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
> <property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
> <property name="url" value="jdbc:mysql://localhost/praneetjbpm43" />
> <property name="username" value="root"></property>
> <property name="password" value="root"></property>
>
> </bean>
>
>
> <bean
> id="transactionManager"
> class="org.springframework.orm.hibernate3.HibernateTransactionManager"
> p:sessionFactory-ref="sf" />
>
> <bean id="sf" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>
> <property name="dataSource" ref="ds"></property>
> <property name="schemaUpdate" value="true"></property>
>
> <property name="hibernateProperties">
> <props>
> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop>
> <prop key="hibernate.show_sql">true</prop>
> <prop key="hibernate.hbm2ddl.auto">update</prop>
> <prop key="hibernate.query.substitutions">true 1, false 0</prop>
>
> </props>
> </property>
>
> <property name="mappingLocations">
> <list>
> <value>classpath:jbpm.execution.hbm.xml</value>
> <value>classpath:jbpm.history.hbm.xml</value>
> <value>classpath:jbpm.task.hbm.xml</value>
> <value>classpath:jbpm.repository.hbm.xml</value>
> <value>classpath:jbpm.identity.hbm.xml</value>
> </list>
> </property>
>
> <!-- <property name="configLocation" value="classpath:jbpm.hibernate.cfg.xml" />
>
> -->
>
>
> </bean>
>
>
> <util:list id="annotatedHibernateClasses"></util:list>
>
> <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
> <property name="sessionFactory" ref="sf"></property>
> </bean>
>
>
> <!-- ========================= Configuring JBPM4.3 ============================= -->
>
> <bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper">
>
> <property name="jbpmCfg" value="jbpm.cfg.xml"></property>
>
> </bean>
>
> <bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" >
> </bean>
>
>
>
>
>
> </beans>
>
>
my jbpm.cfg.xml is
> <?xml version="1.0" encoding="UTF-8"?>
> <jbpm-configuration>
> <import resource="jbpm.jpdl.cfg.xml" />
> <import resource="jbpm.identity.cfg.xml" />
> <!-- <import resource="jbpm.jobexecutor.cfg.xml" /> -->
>
> <process-engine-context>
>
> <string name="spring.cfg" value="applicationContext.xml" />
> <repository-service />
> <repository-cache />
> <execution-service />
> <history-service />
> <management-service />
> <identity-service />
> <task-service />
> <command-service>
> <retry-interceptor />
> <environment-interceptor />
> <spring-transaction-interceptor />
> </command-service>
> <script-manager default-expression-language="juel"
> default-script-language="juel"
> read-contexts="execution, environment, process-engine, spring"
> write-context="">
> <script-language name="juel"
> factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
> </script-manager>
> <authentication />
> <id-generator />
> <types resource="jbpm.variable.types.xml" />
> <address-resolver />
> <business-calendar>
> <monday hours="9:00-12:00 and 12:30-17:00" />
> <tuesday hours="9:00-12:00 and 12:30-17:00" />
> <wednesday hours="9:00-12:00 and 12:30-17:00" />
> <thursday hours="9:00-12:00 and 12:30-17:00" />
> <friday hours="9:00-12:00 and 12:30-17:00" />
> <holiday period="01/07/2008 - 31/08/2008" />
> </business-calendar>
> </process-engine-context>
> <transaction-context>
> <transaction type="spring" />
> <repository-session />
> <db-session />
> <message-session />
> <timer-session />
> <history-session />
> <hibernate-session current="true" />
> <mail-session>
> <mail-server>
> <session-properties>
> <property name="mail.smtp.host" value="localhost" />
> <property name="mail.smtp.port" value="25" />
> <property name="mail.from" value="mailto:system@localhost.com" />
> </session-properties>
> </mail-server>
> </mail-session>
> </transaction-context>
> </jbpm-configuration>
>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530294#530294
16 years, 1 month
[jBPM] New message: "Re: integrating spring 2.5.6 with jbpm 4.3"
by praneet nandan
User development,
A new message was posted in the thread "integrating spring 2.5.6 with jbpm 4.3":
http://community.jboss.org/message/530293#530293
Author : praneet nandan
Profile : http://community.jboss.org/people/praneet
Message:
--------------------------------------------------------------
am using hibernate 3 as my peristance
am getting eroor like this
> SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in ServletContext resource [/WEB-INF/classes/jbpm4-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [protected org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine()] threw exception; nested exception is java.lang.NullPointerException
> at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:423)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:901)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:815)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
> at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
> at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
> at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at org.apache.catalina.core.StandardService.start(StandardService.java:516)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [protected org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine()] threw exception; nested exception is java.lang.NullPointerException
> at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:127)
> at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:414)
> ... 32 more
> Caused by: java.lang.NullPointerException
> at org.jbpm.pvm.internal.processengine.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:152)
> at org.jbpm.pvm.internal.processengine.SpringProcessEngine.create(SpringProcessEngine.java:70)
> at org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:92)
> at org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine(SpringHelper.java:47)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)
> ... 33 more
my applicationcontext file is this
my jbpmcfg.xml
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530293#530293
16 years, 1 month
[jBPM] New message: "Re: Trouble with jBPM 4 job executor and context reloading."
by Caine Lai
User development,
A new message was posted in the thread "Trouble with jBPM 4 job executor and context reloading.":
http://community.jboss.org/message/530282#530282
Author : Caine Lai
Profile : http://community.jboss.org/people/unsavory
Message:
--------------------------------------------------------------
In case this helps someone else, I found a solution to this problem. By creating a Spring ApplicationListener that listens to the shutdown event, you can signal the jBPM job executor to shut down when the context is stopped.
/**
* A Spring ApplicationListener that will properly shut down
* the jBPM process engine when the Spring context is destroyed.
*
* @author Caine
* Created: Mar 5, 2010 - 4:30:58 PM
*/
@Component
@SuppressWarnings("unchecked")
public class SpringJbpmJobExecutorShutdownHook implements ApplicationListener {
//~~ Static Fields/Initializers ==========================
static final Logger log = Logger.getLogger(SpringJbpmJobExecutorShutdownHook.class);
//~~ Dependencies ========================================
@Resource
ProcessEngine processEngine;
//~~ Methods =============================================
public void onApplicationEvent(ApplicationEvent event) {
if (event instanceof ContextClosedEvent ) {
log.info("Spring ApplicationContext shutting down. Closing jBPM process engine.");
processEngine.close();
log.info("jBPM process engine closed.");
}
}
}
More details about the problem, and why it matters can be found on my blog post here: http://captaincaveman.posterous.com/how-to-shut-down-the-jbpm-43-job-exec...
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530282#530282
16 years, 1 month