[jBPM] - [jbpm-console][Error] result returns more than one elements
by Shamal Karunarathne
Shamal Karunarathne [https://community.jboss.org/people/shamalk] created the discussion
"[jbpm-console][Error] result returns more than one elements"
To view the discussion, visit: https://community.jboss.org/message/745345#745345
--------------------------------------------------------------
Hi,
I'm getting an error when I try to start a process in JBPM-Console. This usually happens after a jboss restart or a system restart (not everytime).
The only way I can fix this is by dropping the databases (jbpm5, task) and recreating them. Note: I'm using mysql as my database. I have attached my standalone.xml and the persistence.xml (~/Desktop/jbpm-installer/jboss-as-7.0.2.Final/standalone/deployments/jbpm-gwt-console-server.war/WEB-INF/classes/META-INF/persistence.xml) with this.
Could you help me to resolve this problem?
13:43:35,006 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gwt-console-server].[Resteasy]] (http-localhost-127.0.0.1-8080-5) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: javax.persistence.NonUniqueResultException: result returns more than one elements
at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.2.1.GA.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_33]
Caused by: javax.persistence.NonUniqueResultException: result returns more than one elements
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:109) [hibernate-entitymanager-3.4.0.GA.jar:]
at org.jbpm.process.audit.JPAProcessInstanceDbLog.findProcessInstance(JPAProcessInstanceDbLog.java:124) [jbpm-bam-5.3.0.Final.jar:]
at org.jbpm.integration.console.CommandDelegate.startProcess(CommandDelegate.java:121) [jbpm-gwt-core-5.3.0.Final.jar:]
at org.jbpm.integration.console.ProcessManagement.newInstance(ProcessManagement.java:88) [jbpm-gwt-core-5.3.0.Final.jar:]
at org.jboss.bpm.console.server.FormProcessingFacade.startProcessWithUI(FormProcessingFacade.java:197) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_33]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_33]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_33]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_33]
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519) [resteasy-jaxrs-2.2.1.GA.jar:]
... 24 more
13:43:59,645 WARN [org.jboss.seam.transaction.TransactionServletListener] (http-localhost-127.0.0.1-8080-5) Transaction was already started before the listener
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/745345#745345]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[JBoss Messaging] - JBOSS Connection Issue with MQ
by forum khan
forum khan [https://community.jboss.org/people/forum.khan] created the discussion
"JBOSS Connection Issue with MQ"
To view the discussion, visit: https://community.jboss.org/message/745063#745063
--------------------------------------------------------------
Hi,
Let me explain the scenario:
1. I will be sending the message to the JMS queue which is delivered successfully. In the mean time i will stop the server then it throws the exception marked in Red.
2. Next i will restart the server. Exactly after 5 mins it display's the message it got reconnected successfully which is marked in Green.
3. After it gets connected successfully again am able to send the messages successfully to the queue.
Now i like to understand the below points
1. How this is getting reconnected exactly after 5 mins, where is the configuration setting?
2. It is observed that if i disconnect MQ for the whole night without shutting down the JBOSS then next day my JBOSS will not able to reconnect to MQ and will not be able to process the JMS messages. Here I like to understand after shutting down and restart the MQ it used to connect automatically. But when its closed from the whole night, next day JBOSS is not able to identity the MQ. Is there any special configuration setting for this?
The below message is from the console.
*Console:*
20:06:59,380 WARN [HttpRouter] Received status code '302' on HTTP mailto:org.apache.commons.httpclient.methods.PostMethod@a29bbd org.apache.commons.httpclient.methods.PostMethod@a29bbd request to ' http://localhost:8080/someservice http://localhost:8080/someservice.
20:09:02,441 INFO [CNN_Connection_Factory] JMSCC3036:An exception has been delivered to the connections exception listener: '
Message : com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ1107: A problem with this connection has occurred. An error has occurred with the WebSphere MQ JMS connection. Use the linked exception to determine the cause of this error.
Class : class com.ibm.msg.client.jms.DetailedJMSException
Stack : com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:608)
: com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:236)
: com.ibm.msg.client.wmq.internal.WMQConnection.consumer(WMQConnection.java:823)
: com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.callEventHandler(RemoteAsyncConsume.java:1018)
: com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.driveEventsEH(RemoteAsyncConsume.java:1376)
: com.ibm.mq.jmqi.remote.internal.RemoteDispatchThread.run(RemoteDispatchThread.java:309)
: com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:209)
: com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:100)
: com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:224)
: com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:298)
: com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1220)
Caused by [1] --> Message : com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2009' ('MQRC_CONNECTION_BROKEN').
Class : class com.ibm.mq.MQException
Stack : com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:223)
: com.ibm.msg.client.wmq.internal.WMQConnection.consumer(WMQConnection.java:823)
: com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.callEventHandler(RemoteAsyncConsume.java:1018)
: com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.driveEventsEH(RemoteAsyncConsume.java:1376)
: com.ibm.mq.jmqi.remote.internal.RemoteDispatchThread.run(RemoteDispatchThread.java:309)
: com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:209)
: com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:100)
: com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:224)
: com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:298)
: com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1220)
'.
20:09:02,441 INFO [CNN_Connection_Factory] MQJCA4013:A connection to a queue manager failed for activationSpec 'javax.jms.Queue:CNN https://community.jboss.org/mailto:_Gateway@QM_GIS01234 _Gateway@QM_GIS01234 <3852704>'. Check the queue manager error logs for details.
20:09:17,441 INFO [CNN_Connection_Factory] MQJCA4003:A recoverable exception occurred in the JMS layer: 'JMSCMQ0002: The method 'MQCTL' failed.'
20:09:17,441 INFO [CNN_Connection_Factory] MQJCA4003:A recoverable exception occurred in the JMS layer: 'JMSWMQ0019: Failed to disconnect from queue manager 'QM_GIS01234' using connection mode '1' and host name 'gis01234.cloud.abc.com(1414)'.'
*20:14:21,687 INFO [CNN_Connection_Factory] MQJCA4019:ActivationSpec 'javax.jms.Queue:CNN_Gateway@QM_GIS01234<3852704>' reconnected successfully.*
*Thanks in Advance*
*KK*
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/745063#745063]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[EJB3] - EJB & PostgreSQL FK?
by Dirk Robbes
Dirk Robbes [https://community.jboss.org/people/underflyer] created the discussion
"EJB & PostgreSQL FK?"
To view the discussion, visit: https://community.jboss.org/message/745268#745268
--------------------------------------------------------------
Hi everyone,
im trying to deploy my EJB.jar on my new JBOSS 7.1.1. Well the deploy of the EJB-Container works like a charm. All Tables have been created, correctly. But I am unable to insert any Data in any Table where @ManyToOne Annotations are declared.
Example: Unidirectional ManyToOne
public class A
{
private Integer id;
@Id
@GeneratedValue(stretegy=Generation.TYPE=Auto)
public Integer getId(){ return id;}
public void setId(Integer id){ this.id=id;}
}
public class B
{
private Integer id;
@Id
@GeneratedValue(stretegy=Generation.TYPE=Auto)
public Integer getId(){ return id;}
public void setId(Integer id){ this.id=id;}
private A a;
@ManyToOne
@JoinColumn(name="a_id", nullable=false)
public A getA() {return a;}
public void setA(A a){ this.a=a;}
}
this code, creates in PostgresSQL two Tables with (a, b) with the corresponding Columns (a = id) (b = id, a_id)
Additional there are "two" (not one) ForeignKey Constraints defined, in Table "b":
- fk.... foreign key (a_id) references a (id)
- fk.... foreign key (id) references a(id)
the second FK-Constraint makes trouble:
INSERT A (id=1) = OK!
INSERT B (id=1, a_id=1) = OK!
INSERT B (id=2, a_id=1) = ERROR !!!!!!
DETAIL key (id) = 2 is not present in table "a"
where is my fault?
Thanks for Advice
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/745268#745268]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months