[JBoss Messaging] - Unable to reconnect to jms queue
by Amit Saluja
Amit Saluja [http://community.jboss.org/people/a_sal] created the discussion
"Unable to reconnect to jms queue"
To view the discussion, visit: http://community.jboss.org/message/580882#580882
--------------------------------------------------------------
hi,
I am getting following error running MDB on jboss 5.0.1, my test program runs fine to connect and push messages to this queue. I believe mdb is able to connect to this queue for first time but not for the second time onwards, any idea what could be wrong.
2011-01-14 15:35:24,944 ERROR [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-6) Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1845871(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)8bb0b0 destination=jms/queue/InternalEvent destinationType=javax.jms.Queue selector=MessageType Is Not Null And MessageSuperType Is Null tx=true durable=true reconnect=10 provider=DefaultJMSProvider user=omsInternalListener pass=<not shown> maxMessages=1 minSession=1 maxSession=15 keepAlive=30000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=10)
java.lang.NullPointerException
at org.jboss.jms.client.container.ConnectionAspect.getConnectionState(ConnectionAspect.java:252)
at org.jboss.jms.client.container.ConnectionAspect.handleSetExceptionListener(ConnectionAspect.java:117)
at sun.reflect.GeneratedMethodAccessor371.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.setExceptionListener(ClientConnectionDelegate.java)
at org.jboss.jms.client.JBossConnection.setExceptionListener(JBossConnection.java:116)
at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQConnection(AbstractDLQHandler.java:142)
at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:83)
at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:413)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:351)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:292)
at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:733)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
many thanks for help.
asal
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580882#580882]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[jBPM] - How to define multiple users for a process
by leod leod
leod leod [http://community.jboss.org/people/leod38] created the discussion
"How to define multiple users for a process"
To view the discussion, visit: http://community.jboss.org/message/580780#580780
--------------------------------------------------------------
Hello all,
I try to develop an exemple of multiple users for ending a process
I want to start a process
doing step1 by toto
doing step2 by titi
ending process with tata
Here its my current code :
processDefinition.xml
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="simple">
<start-state name="start">
<transition name="toStep1" to="step1" />
</start-state>
<task-node name="step1">
<task name="step1">
<assignment actor-id="toto" />
</task>
<transition name="toStep2" to="step2" />
<transition name="cancel" to="error" />
</task-node>
<task-node name="step2">
<task name="step2">
<assignment actor-id="titi" />
</task>
<transition name="toStep3" to="step3" />
<transition name="cancel" to="error" />
</task-node>
<task-node name="step3">
<task name="step3">
<assignment actor-id="tata" />
</task>
<transition name="toEnd" to="end" />
<transition name="cancel" to="error" />
</task-node>
<end-state name="error"/>
<end-state name="end" />
</process-definition>
My page is the fallowing WorkFlow.xhtml
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
template="include/template.xhtml">
<ui:define name="body">
<ui:include src="/include/menu.xhtml" />
<h1><h:outputText value="#{MenuBean.currentFormularDescr}"/></h1>
<h:form>
<div>
<h:outputText value="There are no process started for the moment" rendered="#{empty taskInstancePriorityList}"/>
<a4j:repeat value="#{taskInstancePriorityList}" var="task" rendered="#{not empty taskInstancePriorityList}">
<h:outputText value="Process created by #{actor.id} at #{task.taskMgmtInstance.processInstance.start}"/>
<br/><h:outputText styleClass="ml30" value="STATUS : #{task.name} Progress : #{orderStock.getPercent(task.name)}"/>
<br/><s:button styleClass="ml30" action="#{orderStock.doStep1}" taskInstance="#{task}" value="DoStep1"/>
<s:button styleClass="ml30" action="#{orderStock.doStep2}" taskInstance="#{task}" value="DoStep2"/>
<s:button styleClass="ml30" action="#{orderStock.doEnd}" taskInstance="#{task}" value="DoEnd"/>
<s:button styleClass="ml30" action="#{orderStock.cancel}" taskInstance="#{task}" value="Cancel"/>
<br/><br/>
</a4j:repeat>
</div>
<br/><br/>
<h:commandButton value="Start Process" action="#{orderStock.startProcess}"/>
</h:form>
</ui:define>
</ui:composition>
And OrderStock.java looks like this :
package com.ste.crw.jbpm;
import java.io.Serializable;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.bpm.BeginTask;
import org.jboss.seam.annotations.bpm.CreateProcess;
import org.jboss.seam.annotations.bpm.EndTask;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@Name("orderStock")
@Scope(ScopeType.BUSINESS_PROCESS)
public class OrderStock implements Serializable{
private static final long serialVersionUID = -6823728442889976233L;
public String getPercent(String name){
if(name.equals("step1")){
return "0%";
}else if(name.equals("step2")){
return "33%";
}else if(name.equals("step3")){
return "66%";
}else{
return "100%";
}
}
@CreateProcess(definition="simple")
public void startProcess(){
}
@BeginTask
@EndTask(transition="toStep2")
public void doStep1(){}
@BeginTask
@EndTask(transition="toStep3")
public void doStep2(){}
@BeginTask
@EndTask(transition="toEnd")
public void doEnd(){}
@BeginTask
@EndTask(transition="cancel")
public void cancel(){}
}
The beginning works fine
I Create the process , and when i'm log on website with login "toto", I see the process
but when i push on "DoStep1" button i have the following error :
javax.el.ELException: java.lang.IllegalStateException: begin method invoked from a long-running conversation, try using @Begin(joi
n=true) on method: doStep1
Where is the problem ?
I'm a begginner with JBPM and Seam , and documentation is not easy to understand
I use : JBPM 3.2.7 and Seam 2.1.2
Thanks in advance for your help
Leod
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580780#580780]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[Datasource Configuration] - You are trying to use a connection factory that has been shut down
by Antoine Brun
Antoine Brun [http://community.jboss.org/people/abr] created the discussion
"You are trying to use a connection factory that has been shut down"
To view the discussion, visit: http://community.jboss.org/message/580379#580379
--------------------------------------------------------------
Hi,
I have an application running on jboss5 and sometime we lose the database connection.
In the log I get this exception:
12/Jan/2011 14:58:59 ERROR [STDERR] Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
12/Jan/2011 14:58:59 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:487)
12/Jan/2011 14:58:59 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
12/Jan/2011 14:58:59 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
I trying to investigate on this, but I don't really know how to start.
If I restart jboss, the datasource are ok (my application works fine), but the administration console displays this datasource as *unavailable.*
The strange thing is that I have other datasources that are marked as available.
below the DS definition of the unavailable DS:
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/customerDS</jndi-name>
<connection-url>jdbc:oracle:thin:@127.0.0.1:1521:CUSTOMER</connection-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<user-name>ncgest</user-name>
<password>Sec_52jlkhin_b4hdh</password>
<track-statements>true</track-statements>
<min-pool-size>20</min-pool-size>
<max-pool-size>50</max-pool-size>
<idle-timeout-minutes>1</idle-timeout-minutes>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<validate-on-match>false</validate-on-match>
<allocation-retry-wait-millis>200</allocation-retry-wait-millis>
</local-tx-datasource>
</datasources>
and the definition of the available one:
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/reportTxDS</jndi-name>
<connection-url>jdbc:oracle:thin:@127.0.0.1:1521:REPORT
</connection-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<user-name>netreport</user-name>
<password>netreport</password>
<max-pool-size>5</max-pool-size>
<query-timeout>0</query-timeout>
</local-tx-datasource>
</datasources>
My question is:
Is there any way to know why the DS is marked as unavailable?
How can it be marked as unavailable and still the application can access the database through the DS?
Antoine
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580379#580379]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months