[jBPM] - StaleObjectStateException on jBPM 5.1 running on JBoss 6.1
by Linh Pham
Linh Pham [https://community.jboss.org/people/lpham1] created the discussion
"StaleObjectStateException on jBPM 5.1 running on JBoss 6.1"
To view the discussion, visit: https://community.jboss.org/message/724897#724897
--------------------------------------------------------------
Hi All,
I got an intermittent StaleObjectStateException while completing a Human Task in jBPM. My current set up is as follows:
- Message Driven Bean processes a message, and invokes jBPM to complete a human task:
@TransactionAttribute(value = TransactionAttributeType.REQUIRES_NEW)
public void onMessage(Message message)
{
try
{
// pulling out the sessionId, workItemId, and resultsMap from the message
final StatefulKnowledgeSession ksession = ((JbpmLauncher) new InitialContext().lookup("java:module/JbpmLauncher")).getSession(sessionId);
ksession.getWorkItemManager().completeWorkItem(inbound.getWorkItemId(), inbound.getResultsMap());
}
catch(NamingException e)
{
LOGGER.error("Encounterred exception", e);
throw new WorkflowException("Unable to find the JBPM Launcher. ", e); //WorkflowException is RuntimeException with @ApplicationException annotation.
}
catch(Exception e)
{
LOGGER.error("Encounterred exception", e);
throw new WorkflowException(e); //WorkflowException is RuntimeException with @ApplicationException annotation.
}
}
Intermittently, I got StaleObjectStateException and the stack trace is here: http://pastebin.com/HxUfSPh5 http://pastebin.com/HxUfSPh5
I am using jBPM 5.1, JBoss 6.1, the jbpm-ds.xml is XA datasource with transaction isolation of TRANSACTION_READ_COMMITTED. JMS implementation is ActiveMQ with XA Datasource.
My environment is very low traffic, with just one user doing testing at the moment.
Is there a way to reliably reproduce the problem? And more importantly how can I get around this StaleObjectStateException?
Thanks for your help.
Linh
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/724897#724897]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
[jBPM] - Install JBPM Console into an existing JBoss 7 installation?
by Brad Babb
Brad Babb [https://community.jboss.org/people/bbabb] created the discussion
"Install JBPM Console into an existing JBoss 7 installation?"
To view the discussion, visit: https://community.jboss.org/message/729046#729046
--------------------------------------------------------------
I've been looking for information around how to take the download artifacts from the jBPM download site (located at http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.2.0.Final/ http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.2.0.Final/) and install the jbpm-console into an existing JBoss 7.1.1 installation.
Is there no documenation out there about how to install and configure the console on an existing JBoss installation?
There is documenation on how to use the installer, and there are individual artifacts for download but no "offical" documentation about how configure them. I've seen quite a bit of blogs and entries in the forums about picking out bits and pieces from the installer and tracking down errors in the logs to eventually get things up and running, but it seems like it would be useful to have a "from scratch" install and configuration guide for the console.
What secruity domains to I need to add to an existing JBoss installation, how to I add users, etc...
I don't know if I've missed something, and I've playing around for a few weeks trying to get the console (in-conjuction with Guvnor and the designer) integrated into an existing JBoss application with minimal success.
I have a development environment and an existing JBoss server for my other development projects, do I really need to download another complete development environment to use the jBPM console effectively. I see the usefullness of having a complete environment for demo and test driving the environment, but once you want to start using the project in a real environment, it get frustrating.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/729046#729046]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
[JBoss AOP] - Re: Field visibility and aspect
by Larry West
Larry West [https://community.jboss.org/people/larry_west] created the discussion
"Re: Field visibility and aspect"
To view the discussion, visit: https://community.jboss.org/message/729004#729004
--------------------------------------------------------------
Also see the same issue with AOP 2.1.6GA, also when adding static nested classes. I see nothing relevant in the JIRA area for AOP, is this still undocumented?
java.lang.NullPointerException
at org.jboss.aop.pointcut.MethodMatcher.<init>(MethodMatcher.java:72)
at org.jboss.aop.pointcut.ExecutionMethodMatcher.<init>(ExecutionMethodMatcher.java:53)
at org.jboss.aop.pointcut.PointcutExpression.matchesExecution(PointcutExpression.java:118)
at org.jboss.aop.Advisor.resolveMethodPointcut(Advisor.java:1343)
at org.jboss.aop.GeneratedClassAdvisor.resolveMethodPointcut(GeneratedClassAdvisor.java:312)
at org.jboss.aop.ClassAdvisor.resolveBindings(ClassAdvisor.java:668)
at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:607)
at org.jboss.aop.GeneratedClassAdvisor.access$201(GeneratedClassAdvisor.java:65)
at org.jboss.aop.GeneratedClassAdvisor$ClassAdvisorStrategy.createInterceptorChains(GeneratedClassAdvisor.java:1306)
at org.jboss.aop.GeneratedClassAdvisor.createInterceptorChains(GeneratedClassAdvisor.java:410)
at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:306)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:276)
at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:754)
at org.jboss.aop.GeneratedClassAdvisor$ClassAdvisorStrategy.initialise(GeneratedClassAdvisor.java:1294)
at org.jboss.aop.GeneratedClassAdvisor.initialise(GeneratedClassAdvisor.java:146)
at com.intuit.cg.services.ds.ofx.service.resource.ProxyResourceImpl$ProxyResourceImplAdvisor.initialise(ProxyResourceImpl$ProxyResourceImplAdvisor.java)
at com.intuit.cg.services.ds.ofx.service.resource.ProxyResourceImpl$ProxyResourceImplAdvisor.<init>(ProxyResourceImpl$ProxyResourceImplAdvisor.java)
at com.intuit.cg.services.ds.ofx.service.resource.ProxyResourceImpl.<clinit>(ProxyResourceImpl.java)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
...
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/729004#729004]
Start a new discussion in JBoss AOP at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
[JNDI and Naming] - Context Lookup error
by Mohamed Mostafa
Mohamed Mostafa [https://community.jboss.org/people/mohamedmostafa] created the discussion
"Context Lookup error"
To view the discussion, visit: https://community.jboss.org/message/728891#728891
--------------------------------------------------------------
i will explain my project breifly
I need to create a webservice which calls an EJB that execute a query on a sybase database
this database is a datasource on glassfish server ( i am using Netbeans 7.1.1 )
i have created Stateless session EJB which i needs it to connect to the database using JNDI
here is a part of the class
@Stateless
public class NewSessionBean implements NewSessionBeanLocal {
@Resource(name = "ejb")
private DataSource ejb;
@Override
public String execute(String query) {
String dbName = "java:comp/env/jdbc/ejb";
try {
Context loContext = (Context) new InitialContext().lookup("java:comp/env");
ejb = (DataSource)loContext.lookup("jdbc/ejb");
Connection loConnection = ejb.getConnection();
and the glassfish.xml found in the configuration files of the EJB project is
<glassfish-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>NewSessionBean</ejb-name>
<resource-ref>
<res-ref-name>ejb</res-ref-name>
<jndi-name>jdbc/ejb</jndi-name>
</resource-ref>
</ejb>
</enterprise-beans>
</glassfish-ejb-jar>
when i run the code it always gives an error at that line
Context loContext = (Context) new InitialContext().lookup("java:comp/env");
i have tried many lookups like
Context loContext = (Context) new InitialContext().lookup("java:comp/env/jdbc/ejb");
HINT: my JNDI name i want to use is: jdbc/ejb
always giving me that error
> run:
> Apr 9, 2012 3:26:35 PM bean.NewSessionBean execute
> SEVERE: null
> javax.naming.NamingException: Lookup failed for 'java:comp/env' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} [Root exception is javax.naming.NamingException: Invocation exception: Got null ComponentInvocation ]
> at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
> at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at bean.NewSessionBean.execute(NewSessionBean.java:35)
> at bean.Main.main(Main.java:14
> )
> Caused by: javax.naming.NamingException: Invocation exception: Got null ComponentInvocation
> at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.getComponentId(GlassfishNamingManagerImpl.java:873)
> at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:742)
> at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:177)
> at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:498)
Please anyone help me if anything still unclear i will provide you with all you need i need this solution urgently.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/728891#728891]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months