[jBPM] - jBPM 5.4, Persistence, and Safe-Points
by Franco Gasperino
Franco Gasperino [https://community.jboss.org/people/franco.gasperino] created the discussion
"jBPM 5.4, Persistence, and Safe-Points"
To view the discussion, visit: https://community.jboss.org/message/825366#825366
--------------------------------------------------------------
Community,
Excuse the long-winded post. I'm trying to debug an issue with an integration project with the following components:
* jBPM 5.4 final, Drools 5.5 final
* Spring 3.2.x
* Bitronix 2.1.x
The core jBPM engine is heavily integrated with a custom stack allowing process instances to be created and run via all sorts of connectivity. The custom layer will take the process id & input parameters, delegate to a thread in an executor, which will:
1. Instantiate the drools environment (with JTA support).
2. Create the knowledge session.
3. Create a custom WorkItemHandler, associate each custom service task with this handler.
4. Create and associate the event handlers.
5. Create and start the process instance.
Everything executes as-expected, the JTA is performing commits and I can see the Hibernate activity inserting, updating, and deleting records from the Derby XA database.
However, when testing a process instance which *should* trigger a safe-point, i see unexpected behavior. In this case:
* Script "Hello" is a java/groovy/whatever script task.
* ServiceTask "MockAsyncTask" is a java class, which is associated / registered with the custom WorkItemHandler. * executeWorkItem() does NOT call completeWorkItem()
* Returns control to the jBPM engine, which should trigger a safe-point.
* Causes return of startProcessInstance(), which will exit the worker thread in the executor.
* Script "Bye" is a java/groovy/whatever script task.
The workflow: Start -> Hello -> MockAsyncTask -> Bye -> End
As expected, I see the behavior. I see that the ProcessInstance object associated has a state field of "2", which is active. Howevever, the hibernate update statements on the ProcessInstanceInfo table always have a state value of '0'. This is the breaking behavior.
When I attempt to call the adapter layer with the session id, process instance id, work item id, and a payload:
1. Instantiate the drools environment (JTA support).
2. Load the existing knowledge session.
3. Create a custom WorkItemHandler, associate each custom service task with this handler.
4. Create and associate event handlers.
5. Call completeWorkItem().
The workItem does complete, and i see it deleted from the WorkItemInfo table. However, since the process instance state has been reloaded with a value of '0', the "Bye" script task is never fired.
Any ideas? A full code dump would be huge, but I'm happy to inject some loggers if it would assist troubleshooting.
Thanks!
Franco
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/825366#825366]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 8 months
[JBoss Tools] - JBosstoolsVisualEditorFAQ
by Yahor Radtsevich
Yahor Radtsevich [https://community.jboss.org/people/yradtsevich] modified the document:
"JBosstoolsVisualEditorFAQ"
To view the document, visit: https://community.jboss.org/docs/DOC-10862
--------------------------------------------------------------
*Q: Which platforms are supported by* *Visual Editor?*
*A:* The list of supported platforms (and their IDs):
* Windows with Java 32-bit (win32.win32.x86)
* Windows with Java 64-bit (win32.win32.x86_64) - Experimental support is available in JBoss Tools 4.1.0.Beta1/JBoss Developer Studio 7.0.0.Beta1 and above. To enable it, you need to install XULRunner from this update site:* http://download.jboss.org/jbosstools/updates/integration/kepler/core/xulr... http://download.jboss.org/jbosstools/updates/integration/kepler/core/xulr...
* If you cannot start Eclipse after this installation, you may use –Dorg.jboss.tools.vpe.loadxulrunner=false option as described in the next question.
Please comment in https://issues.jboss.org/browse/JBIDE-2720 JBIDE-2720 if something went wrong.
* Linux x86 (gtk.linux.x86)
* Linux x86-64 (gtk.linux.x86_64)
* Mac OS X Cocoa with Java 32-bit (cocoa.macosx.x86)
* Mac OS X Carbon with Java 32-bit (carbon.macosx.x86) [not supported by JBoss Tools 3.3.0 and later, JBDS 5.0 and later]
In brief, Java 64-bit is supported on Linux only, on all other systems Visual Editor requires Java 32-bit.
*Q: Eclipse crashes when I use Visual Editor, what can I do?*
*A:* This may happen in JBoss Tools 3.3.0.M2 and above with Eclipse 3.7.0 due to https://issues.jboss.org/browse/JBIDE-9144 the WebKit and XULRunner conflict. You can disable Visual Editor by adding the option –Dorg.jboss.tools.vpe.loadxulrunner=false to the eclipse.ini (or jbdevstudio.ini if you use JBoss Developer Studio).
*Q: Visual Editor does not start under Linux*
*A:* Linux users may need to do the following to get the visual editor to work correctly on their machines.
* The Visual Page Editor (before JBoss Tools 3.1.0.M4) requires the library libstdc++.so.5. This library is contained in the compat-libstdc++-33.i386 package.
* To install this package on Fedora Core or Red Hat Enterprise Linux run the following command:
yum install compat-libstdc++-33.i386
** On any other rpm based distributions download libstdc++.so.5 and run the following command:
rpm -Uvh compat-libstdc++-33.i386
** On Debian and Debian based distributions (e.g. Ubuntu) run the following command:
apt-get install libstdc++5
* In case you have the library installed and you still have issue with starting the visual page editor then close all browser views/editors and leave one visual page editor open and restart eclipse. This should force a load of the right XULRunner viewer.
*Q: Visual Editor doesn't start at any platform and shows message 'The VPE editor can't be run because your system environment needs to be changed slightly'*
*A:* Check if you version of JBoss Developer Studio/JBoss Tools is compatible with you version of Eclipse, see the compatibility matrix https://community.jboss.org/docs/DOC-14297 http://www.jboss.org/community/wiki/Matrixofsupportedplatformsruntimesand...
*Q: Visual Editor starts OK, but the following message dialog appears:*
https://community.jboss.org/servlet/JiveServlet/showImage/102-10862-53-19... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-10862-5...
*A:* Some functionality of Visual Editor may not work if a project doesn't have org.jboss.tools.jsf.jsfnature or org.jboss.tools.jst.web.kb.kbnature in .project configuration. To fix this problem and turn off the message box execute next steps:
* Right mouse button click on a project in Package Explorer.
* Select +Configure -> Add JSF Capabilities+ from the context menu.
* Configure your project using +Add JSF Capabilities+ wizard and press Finish.
*P.S.* If you are sure that your project does not need JSF capabilities, just disable this message box by checking "+Do not show this dialog again!+" checkbox.
*Q: Visual Part doesn't start and "XPCOM error -2147467259" is shown*
*A:* Something bad happened with buildin xulrunner. To check it you should:
* Go to Eclipse -> Help -> About -> Installation Details... -> Configuration
* find +org.eclipse.swt.browser.XULRunnerPath+ and open this path in terminal
* try xulrunner.exe -version or ./xulrunner -version and it should show what is needed for XR to work
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-10862]
Create a new document in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years, 8 months
[JBoss Tools] - JBosstoolsVisualEditorFAQ
by Nick Boldt
Nick Boldt [https://community.jboss.org/people/nickboldt] modified the document:
"JBosstoolsVisualEditorFAQ"
To view the document, visit: https://community.jboss.org/docs/DOC-10862
--------------------------------------------------------------
*Q: Which platforms are supported by* *Visual Editor?*
*A:* The list of supported platforms (and their IDs):
* Windows with Java 32-bit (win32.win32.x86)
* Windows with Java 64-bit (win32.win32.x86_64) - Experimental support is available in JBoss Tools 4.1.0.Beta1/2 and JBoss Developer Studio 7.0.0.Beta1/2. To enable it, you need to install XULRunner from this update site:* http://download.jboss.org/jbosstools/updates/integration/kepler/core/xulr... http://download.jboss.org/jbosstools/updates/integration/kepler/core/xulr... (previously http://download.jboss.org/jbosstools/builds/staging/xulrunner-1.9.2_win64... http://download.jboss.org/jbosstools/builds/staging/xulrunner-1.9.2_win64... )
* If you cannot start Eclipse after this installation, you may use –Dorg.jboss.tools.vpe.loadxulrunner=false option as described in the next question.
Please comment in https://issues.jboss.org/browse/JBIDE-2720 JBIDE-2720 if something went wrong.
* Linux x86 (gtk.linux.x86)
* Linux x86-64 (gtk.linux.x86_64)
* Mac OS X Cocoa with Java 32-bit (cocoa.macosx.x86)
* Mac OS X Carbon with Java 32-bit (carbon.macosx.x86) [not supported by JBoss Tools 3.3.0 and later, JBDS 5.0 and later]
In brief, Java 64-bit is supported on Linux only, on all other systems Visual Editor requires Java 32-bit.
*Q: Eclipse crashes when I use Visual Editor, what can I do?*
*A:* This may happen in JBoss Tools 3.3.0.M2 and above with Eclipse 3.7.0 due to https://issues.jboss.org/browse/JBIDE-9144 the WebKit and XULRunner conflict. You can disable Visual Editor by adding the option –Dorg.jboss.tools.vpe.loadxulrunner=false to the eclipse.ini (or jbdevstudio.ini if you use JBoss Developer Studio).
*Q: Visual Editor does not start under Linux*
*A:* Linux users may need to do the following to get the visual editor to work correctly on their machines.
* The Visual Page Editor (before JBoss Tools 3.1.0.M4) requires the library libstdc++.so.5. This library is contained in the compat-libstdc++-33.i386 package.
* To install this package on Fedora Core or Red Hat Enterprise Linux run the following command:
yum install compat-libstdc++-33.i386
** On any other rpm based distributions download libstdc++.so.5 and run the following command:
rpm -Uvh compat-libstdc++-33.i386
** On Debian and Debian based distributions (e.g. Ubuntu) run the following command:
apt-get install libstdc++5
* In case you have the library installed and you still have issue with starting the visual page editor then close all browser views/editors and leave one visual page editor open and restart eclipse. This should force a load of the right XULRunner viewer.
*Q: Visual Editor doesn't start at any platform and shows message 'The VPE editor can't be run because your system environment needs to be changed slightly'*
*A:* Check if you version of JBoss Developer Studio/JBoss Tools is compatible with you version of Eclipse, see the compatibility matrix https://community.jboss.org/docs/DOC-14297 http://www.jboss.org/community/wiki/Matrixofsupportedplatformsruntimesand...
*Q: Visual Editor starts OK, but the following message dialog appears:*
https://community.jboss.org/servlet/JiveServlet/showImage/102-10862-52-19... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-10862-5...
*A:* Some functionality of Visual Editor may not work if a project doesn't have org.jboss.tools.jsf.jsfnature or org.jboss.tools.jst.web.kb.kbnature in .project configuration. To fix this problem and turn off the message box execute next steps:
* Right mouse button click on a project in Package Explorer.
* Select +Configure -> Add JSF Capabilities+ from the context menu.
* Configure your project using +Add JSF Capabilities+ wizard and press Finish.
*P.S.* If you are sure that your project does not need JSF capabilities, just disable this message box by checking "+Do not show this dialog again!+" checkbox.
*Q: Visual Part doesn't start and "XPCOM error -2147467259" is shown*
*A:* Something bad happened with buildin xulrunner. To check it you should:
* Go to Eclipse -> Help -> About -> Installation Details... -> Configuration
* find +org.eclipse.swt.browser.XULRunnerPath+ and open this path in terminal
* try xulrunner.exe -version or ./xulrunner -version and it should show what is needed for XR to work
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-10862]
Create a new document in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years, 8 months
[JBoss Tools] - MappingException "Could not determine type for: pg-uuid" Thrown When Opening Session Factory
by Dirk Weinhardt
Dirk Weinhardt [https://community.jboss.org/people/dweinhardt] created the discussion
"MappingException "Could not determine type for: pg-uuid" Thrown When Opening Session Factory"
To view the discussion, visit: https://community.jboss.org/message/824799#824799
--------------------------------------------------------------
Hi Community,
I am trying to use Hibernate Tools within Eclipse (Eclipse Juno Service Release 2 on Windows 7 x64, PostgreSQL 9.2 on Debian 6). I was able to set up a Hibernate Configuration. All my data objects are listed under the Configuration node as well as the database can be browsed under the Database node. But a MappingException is thrown for a pg-uuid ID column when trying to open a Session Factory.
Error Message: org.hibernate.MappingException: Could not determine type for: pg-uuid, at table: roles, for columns: [org.hibernate.mapping.Column(id)]
The affected ID property of the roles entity is defined as:
@Id
@Type(type = "pg-uuid")
@GeneratedValue(generator="hibernate-uuid")
@GenericGenerator(name="hibernate-uuid", strategy="uuid2")
protected UUID id;
We are not experiencing this issue when using the class and configuration with Hibernate 4.1.8 in a Spring MVC application.
What could we be doing wrong? Is any additional information required to understand this issue? Would this problem better be reported as a bug to the Hibernate Tools team?
Any help is highly appreciated.
Thank you,
Dirk
Full Stack Trace;
org.hibernate.MappingException: Could not determine type for: pg-uuid, at table: roles, for columns: [org.hibernate.mapping.Column(id)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:291)
at org.hibernate.cfg.Configuration$1.getIdentifierType(Configuration.java:2217)
at org.hibernate.type.EntityType.getIdentifierType(EntityType.java:553)
at org.hibernate.type.EntityType.getIdentifierOrUniqueKeyType(EntityType.java:578)
at org.hibernate.type.ManyToOneType.getColumnSpan(ManyToOneType.java:120)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:275)
at org.hibernate.mapping.ToOne.isValid(ToOne.java:105)
at org.hibernate.mapping.Property.isValid(Property.java:217)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)
at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:66)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1193)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:278)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:273)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/824799#824799]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 8 months