[JBoss jBPM] - async fork
by popel
Hi,
I've got a problem to get async nodes right. I read on JIRA ther once was an issue with this but got resolved. So I wonder where my mistake is.
JBPM Version is 3.2.3
The process definition:
| <?xml version="1.0" encoding="UTF-8"?>
| <process-definition xmlns="" name="TestThreadSkript">
| <start-state name="start-state1">
| <transition to="fork1"></transition>
| </start-state>
| <fork name="fork1">
| <transition to="node1" name="to node1"></transition>
| <transition to="node2" name="to node2"></transition>
| <transition to="node3" name="to node3"></transition>
| </fork>
| <node name="node1" async="true">
| <script name="do it1">
| <expression>
| String nodename=executionContext.getNode().getName();
| for(int i=0;i<=7;i++){
| Thread.currentThread().sleep(1000);
| System.out.println(nodename + " is waiting (" +i+")");
| }
| System.out.println("loop done");
|
| executionContext.leaveNode();
| </expression>
| </script>
| <transition to="join1"></transition>
| </node>
|
| <node name="node2" async="true">
| <script name="do it2">
| <expression>
| String nodename=executionContext.getNode().getName();
|
| for(int i=0;i<=7;i++){
| Thread.currentThread().sleep(1000);
| System.out.println(nodename + " is waiting (" +i+")");
| }
| System.out.println("loop done");
|
| executionContext.leaveNode();
| </expression>
| </script>
| <transition to="join1"></transition>
| </node>
|
| <node name="node3" async="true">
| <script name="do it3">
| <expression>
| String nodename=executionContext.getNode().getName();
|
| for(int i=0;i<=7;i++){
| Thread.currentThread().sleep(1000);
| System.out.println(nodename + " is waiting (" +i+")");
| }
| System.out.println("loop done");
|
| executionContext.leaveNode();
| </expression>
| </script>
| <transition to="join1"></transition>
| </node>
|
|
| <join name="join1" >
| <transition to="end-state1"></transition>
| </join>
|
| <end-state name="end-state1"></end-state>
|
| </process-definition>
|
|
This throws an exception
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)
This happens when the second thread enters the join node and hibernate tries to update a token.
I tested this with MYSQL and transaction-isolation = REPEATABLE-READ and READ-COMMITTED but nothing helped.
Where am I wrong?
Thanks for your help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172823#4172823
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172823
17 years, 7 months
[JNDI/Naming/Network] - JNDI remote lookup of classes in isolated EAR
by dovetail
I have the following issue:
I have an EJB3 session bean (SB1) with a remote interface (I2) which is in an isolated ear EAR1. I2 extends I1 which is in a POJO jar in EAR1.
In a second ear - EAR2, I have the same POJO jar defining I1.
>From EAR2 I wish to locate SB1 (via JNDI) without including the session bean's EJB jar within the package.
(this is then cast to I1, which should allow the EAR to access the exposed methods on I1)
The lookup of the JNDI name works fine and the bean can be located, despite the isolation of the EARs,
but it throws a ClassNotFoundException for I2.
If I remove the isolation tags from the jboss-app.xml, then everything works fine.
I expected the JNDI lookup to find I2 via JNDI/RMI - hence loading I2 from EAR1.
Is there a way of getting this behaviour?
Thanks - I have searched the forums/wiki for an answer to this problem, so please accept my apologies if this has already been answered
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172822#4172822
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172822
17 years, 7 months
[EJB 3.0] - Problems setting timer to entity bean
by jaki
Hi,
Im getting the below error while setting timer over an entity bean using 'timerService.createTimer(date, entitybean);'. I have heard this problem could arise out of using two local datasources but Im using only one.
19:12:32,534 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| javax.ejb.EJBTransactionRolledbackException: Failed to create timer
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:81)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
| at $Proxy101.addTimerToSale(Unknown Source)
| at com.um2.mauction.session.wrapper.AuctionBean.addAuction(AuctionBean.java:120)
| 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 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.ejb.EJBException: Failed to create timer
| at org.jboss.ejb.txtimer.TimerServiceImpl.createTimer(TimerServiceImpl.java:262)
| at org.jboss.ejb.txtimer.TimerServiceImpl.createTimer(TimerServiceImpl.java:222)
| at org.jboss.ejb3.timerservice.jboss.TimerServiceFacade.createTimer(TimerServiceFacade.java:61)
| at com.um2.mauction.session.impl.VenteManagerBean.addTimerToSale(VenteManagerBean.java:51)
| 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 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| ... 72 more
| Caused by: java.lang.IllegalStateException: Unable to persist timer
| at org.jboss.ejb.txtimer.DatabasePersistencePolicy.insertTimer(DatabasePersistencePolicy.java:124)
| 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy30.insertTimer(Unknown Source)
| at org.jboss.ejb.txtimer.TimerServiceImpl.createTimer(TimerServiceImpl.java:256)
| ... 88 more
| Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a7a736e:a13:48b5598c:31 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a7a736e:a13:48b5598c:31 status: ActionStatus.ABORT_ONLY >))
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
| at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.insertTimer(GeneralPurposeDatabasePersistencePlugin.java:199)
| at org.jboss.ejb.txtimer.DatabasePersistencePolicy.insertTimer(DatabasePersistencePolicy.java:120)
| ... 100 more
| Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a7a736e:a13:48b5598c:31 status: ActionStatus.ABORT_ONLY >)
| at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:358)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:524)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:405)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
| ... 102 more
| Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a7a736e:a13:48b5598c:31 status: ActionStatus.ABORT_ONLY >
| at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:759)
| at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:592)
| at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:352)
| ... 106 more
|
Also, for what it's worth, I get the below 2 warnings too just above the error:
19:12:32,425 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@c4fedd
| 19:12:32,534 WARN [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@9bee93<rs=com.mysql.jdbc.ResultSet@7895d8>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172821#4172821
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172821
17 years, 7 months
[EJB 3.0] - Issues in Ejb 3.0 Deployment
by vasudm82
Hi All,
I am newbie to Ejb 3.0. I am facing a problem while deploying an Ejb jar .
Environment being used.
eclispe ( using jboss tools plugins ) and jboss 4.2.2. GA
The problem i am facing is that while deploying the ejb jar, I am getting this exception .
java.lang.ClassNotFoundException: Unexpected error during load of: com.demo.hello.HelloBeanBean, msg=Bad version number in .class file
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:560)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.jboss.ejb3.Ejb3AnnotationHandler.populateBaseInfo(Ejb3AnnotationHandler.java:293)
at org.jboss.ejb3.Ejb3DescriptorHandler.populateBaseInfo(Ejb3DescriptorHandler.java:215)
at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:138)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:486)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:442)
...
There is only one problem in it. I have only jvm installed in my system.
Java 1.5.0_07.
How should i have to go about this problem. I am using eclipse to run the server.
Looking forward for your help.
Thanks in advance
Vasu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172816#4172816
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172816
17 years, 7 months
[JBoss Tools (users)] - Re: JBoss Tools 3.0.0.Alpha1 is released
by berenErchamion
The other issue is:
08:54:23,709 WARN [SeamPhaseListener] There should only be one Seam phase listener per application
When you use the wizard to create an EAR project I get this issue every time. The application will deploy properly, but then it will not load up and you'll get an exception about duplicate PhaseListener's.
I think the problem is a collision between the base project and the ejb project and their manifest files. If you go into the manifest file in the META-INF directory of the ejb project and delete the reference to jboss-seam.jar and then redeploy your app it will now work.
Of course this causes problems in the eclipse project. You can right-click on the project and now go in and manually add jboss-seam.jar back to the build path to fix that. I figured this out this morning as a workable solution. Kind of messy and just a hack, but so far it works.
beren
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172813#4172813
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172813
17 years, 7 months