[jBPM] - Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
by hamsterdancer
hamsterdancer [https://community.jboss.org/people/hamsterdancer] created the discussion
"Problem with jBPM5.3 and (needed) activated jpa in standalone.xml"
To view the discussion, visit: https://community.jboss.org/message/742051#742051
--------------------------------------------------------------
Hi there.
I'm running jBoss 7.1.1 with jBPM5.3 and postgresSQL and some other applications.
I've seen, the jpa part in the standalone.xml is commented out and everything works fine. Some of our other allpications are using jpa and are depended on the outcommented lines.
> <subsystem xmlns="urn:jboss:domain:jpa:.0">
> <jpa default-datasource=""/>
> </subsystem>
The point is, with these lines, our other applications are running perfectly but the jbpm console server and the human task service is not running. Without these lines the jpbm stuff works fine but the other applications do not.
Any ideas or workarounds what I could do except for not using jpa in my other applications running on the same server (which is not an option :-/ ) ?
Thanks.
(btw. I'm still missing the catecory jBPM 5.3 on creating a new topic^^)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/742051#742051]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 7 months
[JBoss Tools] - JBoss Tools 4
by Max Rydahl Andersen
Max Rydahl Andersen [https://community.jboss.org/people/maxandersen] modified the blog post:
"JBoss Tools 4"
To view the blog post, visit: https://community.jboss.org/community/tools/blog/2012/09/17/the-return-of...
--------------------------------------------------------------
Summer is over and it's time to start getting the JBoss Tools release train moving again.
h4. JBoss Tools 4 Alpha 1
[ http://www.jboss.org/tools/download/dev/4_0.html Download] [ http://download.jboss.org/jbosstools/updates/development/juno/ Update Site] | [ http://docs.jboss.org/tools/whatsnew What's New] [ http://www.jboss.com/index.html?module=bb&op=viewforum&f=201 Forums] [ http://jira.jboss.com/jira/browse/JBIDE JIRA] [ http://twitter.com/jbosstools Twitter]
h2. A new version ?
This year we are starting on JBoss Tools 4 (opposite to previous years where we have been moving on JBoss Tools 3). Why the new version ? There are a bunch of reasons why it was time, one is that our target platform on Eclipse.org also changed (Eclipse 3.x to 4.x), the projects is growing bigger and bigger so its time to clean up some of the API's and move from our big SVN semi-modularized monolithic layout to smaller more independent but still aligned Git backed projects. The groundworks for this does require splitting with things in the past, at least on a technical level - but we do plan on making this transition as transparent as possible on the user level.
We are also starting to use Alpha (A) instead of Milestone (M) in our versioning - same meaning at user level (development releases/semi-bleeding edge), but at technical levels it allow us to follow and use osgi/p2 friendly version schemes that prevents and detects incompatible changes better than in the past.
But enough about a single digit - on to the user visible changes/improvements...
h2. Installation
Recommended path to install is to have a clean Eclipse Juno install and use our updatesite to install from.
This release you need Eclipse 4.2 but we recommend using the http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/... Eclipse 4.2 JEE Bundle since then you get most of the dependencies preinstalled.
Once you have installed Eclipse use our update site directly.
The update site URL to use from Help > Install New Software... is:
http://download.jboss.org/jbosstools/updates/development/juno/
Note: SOA tooling such as Drools, jbpm, ESB, Teeid etc. are not included in the JBoss Tools core releases at this time - they will be available separately.
+Note m2e-wtp users+: In case you already have m2e-wtp installed, then add the updatesite first and then run "Help > Find Updates" before trying to run Help > Install. This way you will get the old m2e-wtp updated automatically to eclipse.org.
h2. Eclipse Juno & m2e-wtp
JBoss Tools 3.x could and can run on Juno but it did have its problems, especially in context of Eclipse Dali/Hibernate integration since the Dali API changed radically from Indigo to Juno. In JBoss Tools 4 Alpha1 all of this should now be a thing of the past. Let us know if you find any discrepencencies in this area.
Since m2eclipse-wtp is moving to Eclipse.org as https://www.eclipse.org/m2e-wtp/ m2e-wtp. As such the existing dependency on m2eclipse-wtp has been changed to http://wiki.eclipse.org/M2E-WTP/New_and_Noteworthy/0.16 m2e-wtp 0.16.0. Since the two plugins overlap and can not coexist you have to either uninstall the old m2e-wtp before installing the new or perform a "Help > Check for updates..." which will be able to do the uninstall old/install new automatically. We wish it could be easier but a bug in p2 install UI prevents this.
h2. Bugfixes
278 issues were fixed in this Alpha1, mainly targeted on issues reported and found when working on Juno and of course a good bunch of bugfixes based on the feedback from previous releases - please keep the feedback coming, its immensly useful.
h2. Migrate jar-classpath to maven-classpath
The biggest in Maven tools are that we now use the eclipse.org m2e-wtp but there are also work on making it easy to convert an eclipse project into a Maven project by helping identifiying the proper Maven Group-Artifact-Version id's of the various jars on your classpath. http://docs.jboss.org/tools/whatsnew/maven/maven-news-4.0.0.Alpha1.html Maven Tools What's'New has more about this.
http://docs.jboss.org/tools/whatsnew/images/dependency_conversion.png http://docs.jboss.org/tools/whatsnew/images/dependency_conversion.png
h2. "As-you-type" validation
Our CDI and JSF/xhtml validation previously only ran when you saved your file(s) and triggered the incremental-builds which would validate the changes across the project. In JBoss Tools 4
we validate the file being edited as you type allowing you to get feedback faster.
Alexey Kazakov recorded a video highlighting how it works:
h2.
h2. Next steps...
JBoss Tools 4 is planned to have a very short release cycle compared to previous years - we want to GA in 2012, running on a well-performing Eclipse 4/Juno release inside JBoss Developer Studio 6.
Our https://issues.jboss.org/browse/JBIDE#selectedTab=com.atlassian.jira.plug... Jira contains the roadmap with tentative dates and in the upcoming weeks we'll blog more about planned/upcoming features for JBoss Tools 4 and onward.
For now, take Alpha1 a spin and let us know what you think!
Have fun,
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/community/tools/blog/2012/09/17/the-return-of...]
13 years, 7 months
[jBPM] - BPMN2 Editor / jBPM Problem
by Andre Pietsch
Andre Pietsch [https://community.jboss.org/people/andre.pietsch] created the discussion
"BPMN2 Editor / jBPM Problem"
To view the discussion, visit: https://community.jboss.org/message/759650#759650
--------------------------------------------------------------
Hello,
I work with jBPM v5.3 to run BPMN 2.0 processes that have been created with the new BPMN2 Editor plugin for Eclipse (BPMN2 Editor | 0.0.1.201209101728) that has been promoted by you at the release of v5.3.
Now I have a problem using global parameters in processes with that setup. The editor creates a line that looks like this
[code]<tns:global tns:identifier="MyGlobal" tns:type="java.lang.String"/>[/code]
The jBPM KnowledgeBuilder with which I have to load the process-file to run the process gives me the following error:
[code]ProcessLoadError: unable to parse xml : Exception class org.xml.sax.SAXParseException : <global> requires a 'identifier' attribute[/code]
When I remove the "tns:" before "identifier" and "type" (same problem here) with a text-editor, the KnowledgeBuilder has no problem with the files. The line looks like this after modification:
[code]<tns:global identifier="MyGlobal" type="java.lang.String"/>[/code]
After that modification the BPMN2 Editor is not able to recognize the global variable so I have to change it back in order to use the editor.
This is a SERIOUS problem but I don't know who makes the mistake here. Is it the editor which generates false BPMN-XMLs or is it jBPM which interprets it the wrong way.
I also don't want to point with a finger. I only want the problem to be fixed. So is it correct to address you or do I have to address the BPMN2 Editor guys? Or maybe both? I created a topic in their support forum for the problem to be addressed. It can be found under the following link:
http://www.eclipse.org/forums/index.php/t/376303/ http://www.eclipse.org/forums/index.php/t/376303/
I hope for a fast answer because I have a project that depends on that stuff.
Kindest regards
Andre
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759650#759650]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 7 months
[jBPM] - Nullpointer exception when retrieveing tasks for a user
by jess singh
jess singh [https://community.jboss.org/people/singhjess] created the discussion
"Nullpointer exception when retrieveing tasks for a user"
To view the discussion, visit: https://community.jboss.org/message/747629#747629
--------------------------------------------------------------
I am using JBPM 5.3 with Jboss 7.1 and Seam managed persistence context here is my persistence.xml
<persistence xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="main" transaction-type="JTA">
<description>Forge Persistence Unit</description>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/oracleDS</jta-data-source>
<mapping-file>META-INF/JBPMOrm-JPA2.xml</mapping-file>
<mapping-file>META-INF/Taskorm.xml</mapping-file>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.User</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<!-- <class>org.jbpm.process.audit.ProcessInstanceLog</class> <class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class> -->
<properties>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.transaction.flush_before_completion"
value="true" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
<!--
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
-->
</properties>
</persistence-unit>
</persistence>
here is the code -
@Resource( mappedName = "java:/TransactionManager" )
private TransactionManager tm;
@Inject
private UserTransaction ut;
public void startProcess() {
try {
// getUserTransaction().begin();
new TaskManagerServer().startServer();
KnowledgeBase kbase = readKnowledgeBase();
TransactionManager manager = (TransactionManager) new InitialContext().lookup( "java:jboss/TransactionManager" );
//manager.begin();
// create the entity manager factory and register it in the environment
EntityManagerFactory emf = EMFactory.getEntityManagerFactory(); // Persistence.createEntityManagerFactory( "main" );
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );
env.set( EnvironmentName.TRANSACTION, ut );
env.set( EnvironmentName.GLOBALS, new MapGlobalResolver() );
env.set( EnvironmentName.APP_SCOPED_ENTITY_MANAGER, entityManager );
env.set( EnvironmentName.TRANSACTION_MANAGER, manager );
Map<String,Object> params = new HashMap<String,Object>();
params.put( "name", "Arthur" );
params.put( "money", 800 );
// create a new knowledge session that uses JPA to store the runtime state
StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
AsyncMinaHTWorkItemHandler handler = new AsyncMinaHTWorkItemHandler( ksession );
// CommandBasedWSHumanTaskHandler handler = new CommandBasedWSHumanTaskHandler( ksession );
ksession.getWorkItemManager().registerWorkItemHandler( "Human Task", handler );
String name = "ksclient-" + UUID.randomUUID();
// invoke methods on your method here
ksession.startProcess( "process_1", params );
TaskClient client = new TaskClient( new MinaTaskClientConnector( name, new MinaTaskClientHandler(
SystemEventListenerFactory.getSystemEventListener() ) ) );
client.connect( "127.0.0.1", 9123 );
BlockingTaskSummaryResponseHandler taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();
client.getTasksAssignedAsPotentialOwner( "john", "en-US", taskSummaryResponseHandler ); // this line throws but continues
List<TaskSummary> tasks = taskSummaryResponseHandler.getResults(); // number of tasks is always zero
for ( TaskSummary taskSummary : tasks ) {
System.out.println( taskSummary.getName() );
}
//manager.commit();
// getUserTransaction().commit();
// ksession.dispose();
} catch ( Throwable t ) {
t.printStackTrace();
}
}
405 ERROR [org.jbpm.task.service.TaskServerHandler] (NioProcessor-1) Could not start transaction.: java.lang.RuntimeException: Could not start transaction.
at org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:994) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.task.service.TaskServiceSession.addTask(TaskServiceSession.java:186) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:144) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.task.service.mina.MinaTaskServerHandler.messageReceived(MinaTaskServerHandler.java:41) [jbpm-human-task-mina-5.3.0.Final.jar:5.3.0.Final]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilter.java:176) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969) [mina-core-2.0.0-RC1.jar:]
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) [mina-core-2.0.0-RC1.jar:]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
Caused by: java.lang.NullPointerException
at org.drools.persistence.jta.JtaTransactionManager.getStatus(JtaTransactionManager.java:205) [drools-persistence-jpa-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.persistence.TaskJTATransactionManager.getStatus(TaskJTATransactionManager.java:63) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.task.service.persistence.TaskJTATransactionManager.begin(TaskJTATransactionManager.java:36) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.task.service.persistence.TaskPersistenceManager.beginTransaction(TaskPersistenceManager.java:79) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:976) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
... 28 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/747629#747629]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 7 months
[jBPM] - Re: how to export jbpm database tables ?
by eric jiang
eric jiang [https://community.jboss.org/people/kanawalo] created the discussion
"Re: how to export jbpm database tables ?"
To view the discussion, visit: https://community.jboss.org/message/760124#760124
--------------------------------------------------------------
I got it!!!
this is the answer:
these files need to be modified:
* db/persistence.xml
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
* task-service/resources/META-INF/persistence.xml
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:test" />
* db/jBPM-ds.xml * If you're using the JBoss AS 5 server
this is on JBPM site, I also changed it.
<connection-url>jdbc:oracle:thin:@localhost:1521:test</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>scott</user-name>
<password>scott</password>
* standalone.xml * If you're using the JBoss AS 7 server
<datasource jndi-name="java:jboss/datasources/jbpmDS" pool-name="H2DS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:oracle:thin:@localhost:1521:test</connection-url>
<driver>oracle</driver>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>4</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>scott</user-name>
<password>scott</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
</datasource>
<drivers>
<driver name="oracle" module="com.oracle">
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
* db/driver_jar_moudle.xml
<resource-root path="ojdbc14.jar"/>
after that, pls run
1. ant install.demo.db
2. ant start.demo.db
:^0
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/760124#760124]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 7 months