[jBPM] - JTA with britonix and spring
by Sasi R
Sasi R [http://community.jboss.org/people/sasir] created the discussion
"JTA with britonix and spring"
To view the discussion, visit: http://community.jboss.org/message/619249#619249
--------------------------------------------------------------
WHile testing jbpm5, I have below configuration in spring which i am running in tomcat. Am getting below error in btm. Can you advise if it is issue with configuration or btm transaction log?
<bean id="droolsFlowDataSource"
class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init" destroy-method="close">
<property name="className"
value="oracle.jdbc.xa.client.OracleXADataSource" />
<property name="uniqueName" value="jdbc/jbpmDS" />
<property name="minPoolSize" value="5" />
<property name="maxPoolSize" value="225" />
<property name="allowLocalTransactions" value="true"></property>
<property name="testQuery" value="SELECT 1 FROM DUAL" />
<property name="driverProperties">
<props>
<prop key="URL">jdbc:oracle:thin:@servername:dbname</prop>
<prop key="user">JBPM5</prop>
<prop key="password">JBPM5</prop>
</props>
</property>
</bean>
<bean id="droolsFlowEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="org.drools.persistence.jpa"></property>
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"></property>
<property name="dataSource" ref="droolsFlowDataSource"></property>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="ORACLE" />
<property name="showSql" value="true" />
</bean>
</property>
</bean>
<bean id="bitronixTransactionManagerConfig" factory-method="getConfiguration" class="bitronix.tm.TransactionManagerServices" depends-on="droolsFlowEntityManagerFactory" >
<property name="serverId" value="spring-btm" />
<property name="warnAboutZeroResourceTransaction" value="true"></property>
</bean>
<bean id="bitronixTransactionManager" factory-method="getTransactionManager"
class="bitronix.tm.TransactionManagerServices" depends-on="droolsFlowDataSource,bitronixTransactionManagerConfig,droolsFlowEntityManagerFactory" destroy-method="shutdown" />
<bean id="springJtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager" ref="bitronixTransactionManager" />
<property name="userTransaction" ref="bitronixTransactionManager" />
</bean>
*org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bitronixTransactionManager' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static synchronized bitronix.tm.BitronixTransactionManager bitronix.tm.TransactionManagerServices.getTransactionManager()] threw exception; nested exception is bitronix.tm.utils.InitializationException: cannot open disk journal*
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
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:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
*Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static synchronized bitronix.tm.BitronixTransactionManager bitronix.tm.TransactionManagerServices.getTransactionManager()] threw exception; nested exception is bitronix.tm.utils.InitializationException: cannot open disk journal*
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:157)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
... 29 more
*Caused by: bitronix.tm.utils.InitializationException: cannot open disk journal*
at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:75)
at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:62)
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:145)
... 30 more
*Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file*
at java.io.RandomAccessFile.read(Native Method)
at java.io.RandomAccessFile.readInt(Unknown Source)
at bitronix.tm.journal.TransactionLogHeader.<init>(TransactionLogHeader.java:96)
at bitronix.tm.journal.TransactionLogAppender.<init>(TransactionLogAppender.java:69)
at bitronix.tm.journal.DiskJournal.open(DiskJournal.java:151)
at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:62)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619249#619249]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months
[JBoss Messaging] - JBoss Messages stuck in Delivering State?
by K G
K G [http://community.jboss.org/people/kogber] created the discussion
"JBoss Messages stuck in Delivering State?"
To view the discussion, visit: http://community.jboss.org/message/621788#621788
--------------------------------------------------------------
I am trying to diagnose and fix what is likely an environmental problem. We have dev, SI, and production servers, and they have been setup the same for several years. One of the environments has stopped working for a particular JBM Queue, and I have so far been unable to figure out why.
What I am seeing via the JMX Console is that the messages are "stuck" in the delivering state. The MessageCount and DeliveringCount increment each time a message is sent through the Queue. They never decrement back to 0, as with the properly functioning environments. The Consumer's onMessage() is invoked, and it outputs debug messages into the log4j log, however I don't think it ever completes the request.
This is a persisted JBM setup. Restarting the JBoss Server doesn't help. Clearing out or even dropping the JBM_* tables does not help.
The jbm_msg_ref entries have null transaction_id's and the state is 'C', which seems like it was put into this state by the prepared statement "ROLLBACK_MESSAGE_REF2" from the oracle-persistence-service.xml we use.
The MaxPoolSize for the MDB consumer is 15, and this is also the max amount of messages that are received by the consumer instances. After 15, it seems that the Queue "fills up" and there are no longer any available consumer MBeans to receive messages.
I am looking for ideas or suggestions about how to diagnose and fix the problem. I've been reaserching for a few days with little results. There are plenty of JIRA tickets for this fairly old version of JBM, but other instances of the same setup work fine, so I suspect that there is some sort of network, race condition, or env issue on this one server/DB combo.
JBoss Remoting 4.3.0.GA
JBoss Messaging 1.4.0.SP3
JBoss 4.3.0.GA
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/621788#621788]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months
[Snowdrop] - JBoss status in SMF
by tellivais
tellivais [http://community.jboss.org/people/tellivais] created the discussion
"JBoss status in SMF"
To view the discussion, visit: http://community.jboss.org/message/622338#622338
--------------------------------------------------------------
Hello Experts,
I have the following problem with JBoss.. It is needed to implement Solaris script that would allow operator to get JBoss status. Initially it was decided simply to use svcs command to check JBoss status, but the problem is that SMF shows the system is online much sooner than Jboss is completely up. So, in result, operator see that svcs returns status as "running", however JBoss server is not accessible yet. There was an idea to use twiddle.sh tool for checking the status, but are there any other possible ways of solving this problem? Also, there are several JBoss instances running on the host, so as far as I understand in case of using twiddle.sh I have "to twiddle" all of them separately. Is this correct? All you advices will be greatly appreciated!
Thanks in advance,
Mikhail
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/622338#622338]
Start a new discussion in Snowdrop at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months