[JBoss jBPM] - Re: How to deploy websales.par to Oracle database with eclip
by jstachera
"idyuce" wrote : if gpd plugin causes problem while deploying, You can write a custom Deployer java class to deploy process definitons to db.
| e.g. you can write follwing lines for deploying.
|
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("websale.par/processdefiniton.xml"); //path may be relative
| jbpmContext .deployProcessDefinition(processDefinition);
I tried to deploy the websale process in this way and I got the following error:
| org.jbpm.jpdl.JpdlException: [[ERROR] line 334: cos-ct-extends.1.4.2.2.2.2.1: Error for type '#AnonType_assignment'. The content type of a derived type and that of its base must both be mixed or element-only., [WARNING] swimlane 'buyer' does not have an assignment]
| at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:163)
| at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:172)
| at com.dnet.def.jbpm.utils.JbpmInitializer.deployProcess(JbpmInitializer.java:37)
| at com.dnet.def.jbpm.utils.JbpmInitializer.main(JbpmInitializer.java:85)
|
The problem is due to unassigned swimlane in the websale processdefiniton file:
| <?xml version="1.0"?>
|
| <process-definition name="websale"
| xmlns="urn:jbpm.org:jpdl-3.1">
|
| <!-- SWIMLANES (= process roles) -->
|
| <swimlane name="buyer">
|
| </swimlane>
|
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979085#3979085
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979085
19 years, 8 months
[JBoss Messaging] - Re: Messages Stuck in Queue
by guinsu
Ok, I've been running various tests and it seems that once items get stuck in the jboss queue the only way to fix it is to stop and restart the queue.
When items got stuck, I shut down all my producers and consumers and ran the following program, it never received a single item from the queue. I have also switch my back end database from the default HSQL to MySQL, JBoss behaved the same way with both DBs. Also, I have noticed the queue size on the stuck queue would be wildly innaccurate at various times. From these problems and the fact that this simple program receives nothing the problem appears to be in JBoss.
| import javax.jms.*;
|
| import java.util.concurrent.atomic.AtomicBoolean;
| import javax.naming.Context;
| import javax.naming.InitialContext;
| import org.apache.log4j.Logger;
| import org.apache.log4j.PropertyConfigurator;
|
| public class JMSDrainTest
| {
| private static final Logger log = Logger.getLogger(JMSDrainTest.class.getName());
|
| /**
| * Starts up many send and recieve threads.
| *
| * @param args a String[]
| *
| */
| public static void main(String[] args)
| {
| System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
| System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true");
|
| String log_file=args[0];
| try
| {
| PropertyConfigurator.configure(JMSLargeFileTest.class.getResource("/"+log_file));
| AtomicBoolean done = new AtomicBoolean(false);
| String clientID = "IndexDrainer-"+System.currentTimeMillis();
| Connection connection;
| Context ic;
| ic = new InitialContext();
| log.info("Looking up ConnectionFactory");
| ConnectionFactory connectionFactory = (ConnectionFactory) ic.lookup("/ConnectionFactory");
| clientID = clientID.replaceAll("\\.", "-");
|
| log.info("Creating connection");
| connection = connectionFactory.createConnection();
| connection.setClientID(clientID);
| log.info("Starting connection");
| connection.start();
|
| String name="/queue/Index";
| log.info("Creating session");
| Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
| log.info("Looking up destination");
| Destination destination = (Destination)ic.lookup(name);
| log.info("Creating consumer");
| MessageConsumer consumer = session.createConsumer(destination, null, false);
|
| log.info("Start Receive");
| while(!done.get())
| {
| consumer.receive();
| log.info("Receiving");
| }
| }
| catch (JMSException e)
| {
| log.error(e.toString(), e);
| }
| catch (Exception e)
| {
| log.error(e.toString(), e);
| }
| catch (Error e)
| {
| log.error(e.toString(), e);
| }
|
| }
| }
|
|
Output:
18 Oct 2006 09:38:03 INFO : Looking up ConnectionFactory
18 Oct 2006 09:38:04 INFO : Creating connection
18 Oct 2006 09:38:05 INFO : Starting connection
18 Oct 2006 09:38:05 INFO : Creating session
18 Oct 2006 09:38:06 INFO : Looking up destination
18 Oct 2006 09:38:06 INFO : Creating consumer
18 Oct 2006 09:38:06 INFO : Start Receive
Then it just sits.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979080#3979080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979080
19 years, 8 months