[jBPM Development] - jBPM5.4 JTA Tx issue with Bitronix and Atomikos
by Babu V
Babu V [https://community.jboss.org/people/ncboy] created the discussion
"jBPM5.4 JTA Tx issue with Bitronix and Atomikos"
To view the discussion, visit: https://community.jboss.org/message/821024#821024
--------------------------------------------------------------
Hi All,
I have been trying to configure Two Phase Commit TX manager(Bitronix / Atomikos) with jBPM5.4, Spring Hibernate JPA in Tomcat 6.x server and running into issues. I am getting the following error while bringing up tomcat server.
I checked all the forums and documentation form Bitronix and Atomikos and followed the instructions given, but issue is still occurring. It is able to look up the datasources defined in Tomcat configuration files, but while creating Knowledge Session with Entity manager Factory as paramters it is failign with the following error.
| | <drools:ksession id="ksession" type="stateful" kbase="kbase" node="node1" > |
| | | <drools:configuration> |
| | | | <drools:jpa-persistence> |
| | | | | <drools:transaction-manager ref="transactionManager" /> |
| | | | | <drools:entity-manager-factory ref="entityManagerFactory" /> |
| | | | </drools:jpa-persistence> |
| | | </drools:configuration> |
| | </drools:ksession> |
I have attached Spring context files with both Bitronix and Atomikos and also Persistnce.xml file for you reference.
Can you please help me resolve this issue?
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ksession': Cannot create inner bean '(inner bean)' of type [org.drools.conta
spring.beans.StatefulKnowledgeSessionBeanFactory$JpaConfiguration] while setting bean property 'jpaConfiguration'; nested exception is org.springframework.beans.factory.BeanCr
nException: Error creating bean with name '(inner bean)#2': Cannot resolve reference to bean 'transactionManager' while setting bean property 'platformTransactionManager'; nes
xception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in URL [file:/C:/apache-tomcat/webapps/ICBPM/WE
/classes/conf/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property
e of type 'bitronix.tm.BitronixTransactionManager' to required type 'javax.transaction.TransactionManager' for property 'transactionManager'; nested exception is java.lang.Ill
tateException: Cannot convert value of type [bitronix.tm.BitronixTransactionManager] to required type [javax.transaction.TransactionManager] for property 'transactionManager':
atching editors or conversion strategy found
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
... 29 more
Thanks
-Naidu
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/821024#821024]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 7 months
[IronJacamar Development] - How use AsynchronousServerSocketChannel with JCA 1.6 ?
by GOSSET Cédric
GOSSET Cédric [https://community.jboss.org/people/rockerced] created the discussion
"How use AsynchronousServerSocketChannel with JCA 1.6 ?"
To view the discussion, visit: https://community.jboss.org/message/821009#821009
--------------------------------------------------------------
Hello at all,
I want to develop a AsynchronousServerSocketChannel with NIO.2 by using ThreadGroup with JCA 1.6. But I doesn't know how use AsynchronousChannelGroup with the javax.resource.spi.work.Work interface.
In the example of google jca-sockets implementation. When a new client is accepted (ServerSocket) a work is created to manage socket client.
INBOUND mode in JCA 1.6
Exemple of code for asynchronous server :
ExecutorService es = Executors.newCachedThreadPool();
if (es instanceof ThreadPoolExecutor){
((ThreadPoolExecutor)es).setMaximumPoolSize(serverInfo.getMaxThread());
}
AsynchronousChannelGroup threadGroup = AsynchronousChannelGroup.withCachedThreadPool(es,serverInfo.getMinThread());
/*server configuration*/
SocketAddress sa = new InetSocketAddress(Inet4Address.getByName(socketInfo.getHost()), socketInfo.getPort());
/*server instantiation*/
server = AsynchronousServerSocketChannel.open(threadGroup).bind(sa);
Thread management is performed by AsynchronousChannelGroup.
Is it necessary to use only ServerSocket for JCA 1.6 implementation ?
Can you give an example of implementation ?
Best regards
GOSSET Cédric
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/821009#821009]
Start a new discussion in IronJacamar Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 7 months
[JBoss AS 7 Development] - MySQL := hibernate problem
by Kiril Fabisevich
Kiril Fabisevich [https://community.jboss.org/people/kirilik] created the document:
"MySQL := hibernate problem"
To view the document, visit: https://community.jboss.org/docs/DOC-48840
--------------------------------------------------------------
Hello,
As I saw here, I added \\ to the query
set @row = 0;
select u.id, u.facebook, u.firstName, u.lastName, u.credit,
(SELECT row FROM (SELECT id, @row \\:= @row+1 AS row from Users ORDER BY credit desc) drv WHERE id = u.id) AS place
from Users u
I'm getting the below exception:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select u.id, u.facebook, u.firstName, u.lastName, u.credit,
This query works fine without hibernate
I'm using hibernate 4.2.2
Thanks,
Kiril
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-48840]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years, 7 months