[jBPM] - Attempt to test human task API on jbpm5.4.CR1 failed
by dany171
dany171 [https://community.jboss.org/people/dany171] created the discussion
"Attempt to test human task API on jbpm5.4.CR1 failed"
To view the discussion, visit: https://community.jboss.org/message/777560#777560
--------------------------------------------------------------
Hi all,
I tried to test the human task API over the jbpm5.4.CR1 version, based on https://community.jboss.org/people/bpmn2user/blog/2011/04/03/jbpm5-human-... https://community.jboss.org/people/bpmn2user/blog/2011/04/03/jbpm5-human-....
I created a maven project and started to setup it , so , I added dependencies into the pom.xml and configuring it to use jBPM5.4.CR1 libraries, because the original example did not compiled.
After that I get the TaskServer running succesfully, I was very happy.
Then I tried to run ProcessTaskAPITest class and in the instruction (the bold line)
|
|
| KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); |
|
|
| *kbuilder.add(ResourceFactory.newClassPathResource(process), ResourceType.BPMN2);* |
it throwns the next exception in execution time.
*java.lang.NoSuchMethodError: org.jbpm.workflow.core.node.EndNode.setScope(I)V*
at org.jbpm.bpmn2.xml.EndEventHandler.handleTerminateNode(EndEventHandler.java:116)
at org.jbpm.bpmn2.xml.EndEventHandler.end(EndEventHandler.java:63)
at org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:417)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:296)
at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:175)
at org.jbpm.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:46)
at org.jbpm.compiler.ProcessBuilderImpl.addProcessFromXml(ProcessBuilderImpl.java:247)
at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:652)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:688)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:45)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:34)
at com.test.human.api.ProcessTaskAPITest.readKnowledgeBase(ProcessTaskAPITest.java:182)
at com.test.human.api.ProcessTaskAPITest.main(ProcessTaskAPITest.java:116)
I think, it is because of the versions of the dependencies in my pom.xml, because I changed them, but I can't fix it until now.
I'm attaching my project, so, if somebody can take a look and give guideliness I will really appreciate (I have some days trying to run it), or fi anybody can share to me an project testing the human task api with jbpm 5.3 or 5.4 it will be really nice for me.
Thanks in advanced.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777560#777560]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[JNDI and Naming] - JBoss 5.0.1 GA mail-service jndi
by Ale Ale
Ale Ale [https://community.jboss.org/people/armun] created the discussion
"JBoss 5.0.1 GA mail-service jndi"
To view the discussion, visit: https://community.jboss.org/message/777948#777948
--------------------------------------------------------------
Hi i want send a mail from localhost.
My mail-service.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mail-service.xml 62350 2007-04-15 16:50:12Z mailto:dimitris@jboss.org dimitris(a)jboss.org $ -->
<server>
<!-- ==================================================================== -->
<!-- Mail Connection Factory -->
<!-- ==================================================================== -->
<mbean code="org.jboss.mail.MailService"
name="jboss:service=Mail">
<attribute name="JNDIName">java:/Mail</attribute>
<attribute name="User">nobody</attribute>
<attribute name="Password">password</attribute>
<attribute name="Configuration">
<!-- A test configuration -->
<configuration>
<!-- Change to your mail server prototocol -->
<property name="mail.store.protocol" value="pop3"/>
<property name="mail.transport.protocol" value="smtp"/>
<!-- Change to the user who will receive mail -->
<property name="mail.user" value="nobody"/>
<!-- Change to the mail server -->
<property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/>
<!-- Change to the SMTP gateway server -->
<property name="mail.smtp.host" value="localhost"/>
<!-- The mail server port -->
<property name="mail.smtp.port" value="25"/>
<!-- Change to the address mail will be from -->
<property name="mail.from" value=" mailto:nobody@nosuchhost.nosuchdomain.com nobody(a)nosuchhost.nosuchdomain.com"/>
<!-- Enable debugging output from the javamail classes -->
<property name="mail.debug" value="false"/>
</configuration>
</attribute>
<depends>jboss:service=Naming</depends>
</mbean>
</server>
my java class using JNDI java:/Mail
package it;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.naming.InitialContext;
import com.sun.mail.smtp.SMTPTransport;
public class SendEmail {
public static void main(String args[]) throws Exception {
String host = "localhost";
String from = "test@localhost";
String to = " mailto:anemail@email.it anemail(a)email.it";
// Get system properties
Properties properties = System.getProperties();
// Setup mail server
properties.setProperty("mail.smtp.host", host);
InitialContext ctx = new InitialContext();
Session session = (Session) ctx.lookup("java:/Mail");
// Create a default MimeMessage object.
MimeMessage message = new MimeMessage(session);
// Set the RFC 822 "From" header field using the
// value of the InternetAddress.getLocalAddress method.
message.setFrom(new InternetAddress(from));
// Add the given addresses to the specified recipient type.
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
// Set the "Subject" header field.
message.setSubject("hi..!");
// Sets the given String as this part's content,
// with a MIME type of "text/plain".
message.setText("Hi ......");
message.setContent ("<h1>Hello world</h1>", "text/html");
Transport.send(message);
System.out.println("Message Send.....");
}
}
the output :
Exception in thread "main" javax.naming.NamingException: Lookup failed for 'java:/Mail' in SerialContext [Root exception is javax.naming.NamingException: Invocation exception: Got null ComponentInvocation ]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:439)
at javax.naming.InitialContext.lookup(Unknown Source)
at it.SendEmail.main(SendEmail.java:69)
Caused by: javax.naming.NamingException: Invocation exception: Got null ComponentInvocation
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.getComponentId(GlassfishNamingManagerImpl.java:722)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:639)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:150)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:425)
... 2 more
I think localhost port 25 is disabled.
If i start another server like "freeSMTP server" it sent mail.
I can configure mail-service.xml or enable port 25 at localhost?
i m only interested to send, not receive email. So i'm interested to SMTP not POP3.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777948#777948]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[jBPM] - about task operation request timed out
by johennes fan
johennes fan [https://community.jboss.org/people/johennes] created the discussion
"about task operation request timed out"
To view the discussion, visit: https://community.jboss.org/message/777306#777306
--------------------------------------------------------------
I even don't know what is problem.
The stacktrace is like this:
ERROR - Tue Nov 20 11:15:20 CST 2012: Error when creating task on task server for work item id 176. Error reported by task server: Task operation request timed out
java.lang.RuntimeException: Task operation request timed out
at org.jbpm.task.service.SyncTaskServiceWrapper.addTask(SyncTaskServiceWrapper.java:118)
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:145)
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164)
at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:47)
at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:162)
at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:143)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:239)
at org.jbpm.workflow.instance.node.HumanTaskNodeInstance.triggerCompleted(HumanTaskNodeInstance.java:90)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:301)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:277)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:326)
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:121)
at org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:69)
at org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:32)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:367)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler.handleCompletedTask(GenericHTWorkItemHandler.java:221)
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler$1.run(GenericHTWorkItemHandler.java:187)
at java.lang.Thread.run(Thread.java:722)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777306#777306]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[JBoss Messaging] - Re: Problem upgrading to JBoss Messaging from 1.4.3 to 1.4.5 in JBoss 5.1
by Nitesh Mehta
Nitesh Mehta [https://community.jboss.org/people/niteshmehta] created the discussion
"Re: Problem upgrading to JBoss Messaging from 1.4.3 to 1.4.5 in JBoss 5.1"
To view the discussion, visit: https://community.jboss.org/message/777523#777523
--------------------------------------------------------------
OK, I thing I got it.
Although Code of
org.jboss.jms.server.ServerPeer
class look almost similar
But when I compared /xmdesc/ServerPeer-xmbean.xml file I found that
<attribute access="read-write" getMethod="getSecurityStore" setMethod="setSecurityStore">
<description>The SecurityStore implementation for the server.</description>
<name>SecurityStore</name>
<type>org.jboss.jms.server.SecurityStore</type>
</attribute>
Does not exist in JBM 1.4.5
Whereas two new attributes
<attribute access="read-write" getMethod="getSecurityDomain" setMethod="setSecurityDomain">
<description>The Security Domain to be used by the Server Peer</description>
<name>SecurityDomain</name>
<type>java.lang.String</type>
</attribute>
<attribute access="read-write" getMethod="getDefaultSecurityConfig" setMethod="setDefaultSecurityConfig">
<description>The Security config to use when the destination does not supply any</description>
<name>DefaultSecurityConfig</name>
<type>org.w3c.dom.Element</type>
</attribute>
has been added. These two attributes (DefaultSecurityConfig, SecurityDomain ) was part of SecurityStore bean @see SecurityStore bean above.
I copied these two entries directly into ServerPeer mbean
Now myServerPeer mbean looks something like
<mbean code="org.jboss.jms.server.ServerPeer"
name="jboss.messaging:service=ServerPeer"
xmbean-dd="xmdesc/ServerPeer-xmbean.xml">
<!-- The unique id of the server peer - in a cluster each node MUST have a unique value - must be an integer -->
<attribute name="ServerPeerID">${jboss.messaging.ServerPeerID:0}</attribute>
<!-- The default JNDI context to use for queues when they are deployed without specifying one -->
<attribute name="DefaultQueueJNDIContext">/queue</attribute>
<!-- The default JNDI context to use for topics when they are deployed without specifying one -->
<attribute name="DefaultTopicJNDIContext">/topic</attribute>
<attribute name="PostOffice">jboss.messaging:service=PostOffice</attribute>
<!-- The default Dead Letter Queue (DLQ) to use for destinations.
This can be overridden on a per destinatin basis -->
<attribute name="DefaultDLQ">jboss.messaging.destination:service=Queue,name=DLQ</attribute>
<!-- The default maximum number of times to attempt delivery of a message before sending to the DLQ (if configured).
This can be overridden on a per destinatin basis -->
<attribute name="DefaultMaxDeliveryAttempts">10</attribute>
<!-- The default Expiry Queue to use for destinations. This can be overridden on a per destinatin basis -->
<attribute name="DefaultExpiryQueue">jboss.messaging.destination:service=Queue,name=ExpiryQueue</attribute>
<!-- The default redelivery delay to impose. This can be overridden on a per destination basis -->
<attribute name="DefaultRedeliveryDelay">10000</attribute>
<!-- The periodicity of the message counter manager enquiring on queues for statistics -->
<attribute name="MessageCounterSamplePeriod">5000</attribute>
<!-- The maximum amount of time for a client to wait for failover to start on the server side after
it has detected failure -->
<attribute name="FailoverStartTimeout">60000</attribute>
<!-- The maximum amount of time for a client to wait for failover to complete on the server side after
it has detected failure -->
<attribute name="FailoverCompleteTimeout">300000</attribute>
<attribute name="StrictTck">false</attribute>
<!-- The maximum number of days results to maintain in the message counter history -->
<attribute name="DefaultMessageCounterHistoryDayLimit">-1</attribute>
<!-- The name of the connection factory to use for creating connections between nodes to pull messages -->
<attribute name="ClusterPullConnectionFactoryName">jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory</attribute>
<!-- When redistributing messages in the cluster. Do we need to preserve the order of messages received
by a particular consumer from a particular producer? -->
<attribute name="DefaultPreserveOrdering">false</attribute>
<!-- Max. time to hold previously delivered messages back waiting for clients to reconnect after failover -->
<attribute name="RecoverDeliveriesTimeout">300000</attribute>
<!-- Set to true to enable message counters that can be viewed via JMX -->
<attribute name="EnableMessageCounters">false</attribute>
<attribute name="SuckerPassword">${queues.database.password}</attribute>
<attribute name="SecurityDomain">messaging</attribute>
<attribute name="DefaultSecurityConfig">
<![CDATA[
<security>
<role name="guest" read="true" write="true" create="true"/>
</security>
]]>
</attribute>
<!-- The name of the server aspects configuration resource
<attribute name="ServerAopConfig">aop/jboss-aop-messaging-server.xml</attribute>
-->
<!-- The name of the client aspects configuration resource
<attribute name="ClientAopConfig">aop/jboss-aop-messaging-client.xml</attribute>
-->
<depends optional-attribute-name="PersistenceManager">jboss.messaging:service=PersistenceManager</depends>
<depends optional-attribute-name="JMSUserManager">jboss.messaging:service=JMSUserManager</depends>
<depends>jboss.messaging:service=Connector,transport=bisocket</depends>
<depends>jboss.messaging:service=SecurityStore</depends>
</mbean>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/777523#777523]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months