[JBoss jBPM] - Trying to run jbpm outside tomcat on mysql
by dingo001
I am trying to run the HelloWorldDbTest at http://docs.jboss.com/jbpm/v3.2/userguide/html/tutorial.html
Now, I set up my hibernate.cfg.xml as
| <!-- hibernate dialect -->
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
|
| <!-- JDBC connection properties (begin) -->
| <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
| <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmtest</property>
| <property name="hibernate.connection.username">root</property>
| <property name="hibernate.connection.password"></property>
| <!-- JDBC connection properties (end) -->
|
| <!-- DataSource properties (begin) ===
| <property name="hibernate.connection.datasource">java:/JbpmDS</property>
| ==== DataSource properties (end) -->
|
I create the db manually from the script at /db/jbpm.jpdl.mysql.sql because of the JIRA issue here.
But when I run the code, I get this error
| [ 10 Aug 2007 14:36:12,822],[ERROR], org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:300), Error in named query: GraphSession.deleteJobsForProcessInstance
| org.hibernate.hql.ast.QuerySyntaxError: unexpected token: job near line 3, column 36 [
|
| delete from org.jbpm.job.Job job
| where job.processInstance = :processInstance
|
| ]
| at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
| at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:215)
| at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
| at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
| at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
| at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:388)
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:291)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
| at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
| at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
| at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98)
| at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:336)
| at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
| at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
| at org.jbpm.examples.HelloWorldDbTest.deployProcessDefinition(HelloWorldDbTest.java:108)
| at org.jbpm.examples.HelloWorldDbTest.testSimplePersistence(HelloWorldDbTest.java:80)
| 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:597)
| at junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: line 3:36: unexpected token: job
| at org.hibernate.hql.antlr.HqlBaseParser.deleteStatement(HqlBaseParser.java:242)
| at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:139)
| at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:209)
| ... 32 more
|
Any ideas why this is happening?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073191#4073191
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073191
18Â years, 10Â months
[JBoss Messaging] - JMS Bridge Question
by viniciuscarvalho
Hello there! I'm configuring a jms-bridge here. Both sides have identical configuration:
*JBoss AS 4.2.0.GA
*JBoss Messaging 1.4.0CR1
On the producer side I have a queue named CMSOutboundQueue (the source)
and on the receiver side (CMSInboundQueue). Here's my configuration:
My remote Loader (jms-ds.xml)
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.messaging:service=JMSProviderLoader,name=CSMJMSProvider">
| <attribute name="ProviderName">CSMJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">
| org.jboss.jms.jndi.JNDIProviderAdapter
| </attribute>
|
| <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
|
| <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
|
| <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
|
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=192.168.0.22:1099
| </attribute>
|
| </mbean>
|
my bridge-service
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!--
| Example deployment descriptor for a message bridge
|
| $Id: messaging-secure-socket-service.xml 2737 2007-05-29 17:56:49Z timfox $
| -->
|
| <server>
|
|
| <mbean code="org.jboss.jms.server.bridge.BridgeService"
| name="jboss.messaging:service=Bridge,name=TestBridge"
| xmbean-dd="xmdesc/Bridge-xmbean.xml">
|
| <!-- The JMS provider loader that is used to lookup the source destination -->
| <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
|
| <!-- The JMS provider loader that is used to lookup the target destination -->
| <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=CSMJMSProvider</depends>
|
| <!-- The JNDI lookup for the source destination -->
| <attribute name="SourceDestinationLookup">/queue/CSMOutboundQueue</attribute>
|
| <!-- The JNDI lookup for the target destination -->
| <attribute name="TargetDestinationLookup">/queue/CSMInboundQueue</attribute>
|
| <!-- The username to use for the source connection
| <attribute name="SourceUsername">bob</attribute>
| -->
|
| <!-- The password to use for the source connection
| <attribute name="SourcePassword">cheesecake</attribute>
| -->
|
| <!-- The username to use for the target connection
| <attribute name="TargetUsername">mary</attribute>
| -->
|
| <!-- The password to use for the target connection
| <attribute name="TargetPassword">hotdog</attribute>
| -->
|
| <!-- Optional: The Quality Of Service mode to use, one of:
| QOS_AT_MOST_ONCE = 0;
| QOS_DUPLICATES_OK = 1;
| QOS_ONCE_AND_ONLY_ONCE = 2; -->
| <attribute name="QualityOfServiceMode">0</attribute>
|
| <!-- JMS selector to use for consuming messages from the source
| <attribute name="Selector">specify jms selector here</attribute>
| -->
|
| <!-- The maximum number of messages to consume from the source before sending to the target -->
| <attribute name="MaxBatchSize">5</attribute>
|
| <!-- The maximum time to wait (in ms) before sending a batch to the target even if MaxBatchSize is not exceeded.
| -1 means wait forever -->
| <attribute name="MaxBatchTime">-1</attribute>
|
| <!-- If consuming from a durable subscription this is the subscription name
| <attribute name="SubName">mysub</attribute>
| -->
|
| <!-- If consuming from a durable subscription this is the client ID to use
| <attribute name="ClientID">myClientID</attribute>
| -->
|
| <!-- The number of ms to wait between connection retrues in the event connections to source or target fail -->
| <attribute name="FailureRetryInterval">5000</attribute>
|
| <!-- The maximum number of connection retries to make in case of failure, before giving up
| -1 means try forever-->
| <attribute name="MaxRetries">-1</attribute>
|
| <!-- If true then the message id of the message before bridging will be added as a header to the message so it is available
| to the receiver. Can then be sent as correlation id to correlate in a distributed request-response -->
| <attribute name="AddMessageIDInHeader">false</attribute>
|
| </mbean>
|
| </server>
|
I guess I can skip the destinations config files since they are working ok ;)
So I have a sessionbean sending the message to my source queue, but I get this error:
| 2007-08-10 16:08:49,033 ERROR [org.jboss.messaging.util.ExceptionUtil] SessionEndpoint[m3-1nky175f-1-6fmx175f-1me2v4-110j3] send [n3-dnky175f-1-6fmx175f-1me2v4-110j3]
| javax.jms.JMSException: Failed to route Reference[48640]:RELIABLE to CSMInboundQueue
| at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:709)
| at org.jboss.jms.server.endpoint.ServerSessionEndpoint.send(ServerSessionEndpoint.java:343)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$send$aop(SessionAdvised.java:80)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_6145266547759487588.invokeNext(SessionAdvised$send_6145266547759487588.java)
| at org.jboss.jms.server.container.SecurityAspect.handleSend(SecurityAspect.java:152)
| 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:597)
| at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_6145266547759487588.invokeNext(SessionAdvised$send_6145266547759487588.java)
| at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_6145266547759487588.invokeNext(SessionAdvised$send_6145266547759487588.java)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised.send(SessionAdvised.java)
| at org.jboss.jms.wireformat.SessionSendRequest.serverInvoke(SessionSendRequest.java:85)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:165)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734)
| at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:101)
| at org.jboss.remoting.Client.invoke(Client.java:1550)
| at org.jboss.remoting.Client.invoke(Client.java:530)
| at org.jboss.remoting.Client.invoke(Client.java:518)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:186)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:157)
| at org.jboss.jms.client.delegate.ClientSessionDelegate.org$jboss$jms$client$delegate$ClientSessionDelegate$send$aop(ClientSessionDelegate.java:447)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$send_6145266547759487588.invokeNext(ClientSessionDelegate$send_6145266547759487588.java)
| at org.jboss.jms.client.container.SessionAspect.handleSend(SessionAspect.java:631)
| at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect28.invoke(SessionAspect28.java)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$send_6145266547759487588.invokeNext(ClientSessionDelegate$send_6145266547759487588.java)
| at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:91)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$send_6145266547759487588.invokeNext(ClientSessionDelegate$send_6145266547759487588.java)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$send_6145266547759487588.invokeNext(ClientSessionDelegate$send_6145266547759487588.java)
| at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)
| at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:243)
| at org.jboss.aop.advice.org.jboss.jms.client.container.ProducerAspect46.invoke(ProducerAspect46.java)
| at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
| at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
| at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)
| at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:207)
| at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)
| at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)
| at org.jboss.jms.server.bridge.Bridge.sendBatch(Bridge.java:1197)
| at org.jboss.jms.server.bridge.Bridge.access$1700(Bridge.java:63)
| at org.jboss.jms.server.bridge.Bridge$SourceListener.onMessage(Bridge.java:1537)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:157)
| at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:941)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:619)
|
What did I do wrong :) ?
Best Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073188#4073188
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073188
18Â years, 10Â months