[JBoss JIRA] Created: (JBPM-2840) NullPointerException when ExecutionImpl.createVariable() with isHistoryEnabled=true
by Huisheng Xu (JIRA)
NullPointerException when ExecutionImpl.createVariable() with isHistoryEnabled=true
-----------------------------------------------------------------------------------
Key: JBPM-2840
URL: https://jira.jboss.org/jira/browse/JBPM-2840
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.3
Reporter: Huisheng Xu
When I want to create a history enabled variable, the ProcessInstanceImpl will invoke variable.seValue(), in this method, variable will fire a VariableUpdate command. This command will try to get the HistoryVariableImpl and update it. But at this moment, the HistoryVariableImpl has not been created, so there will be a NullPointerException.
I think we should check whether the HistoryVariableImpl instance exists, then decide to update it or not.
The used code is like this:
ProcessInstance processInstance = executionService.startProcessInstanceByKey("Normal");
EnvironmentImpl environment = ((EnvironmentFactory)processEngine).openEnvironment();
((ExecutionImpl)processInstance).createVariable("test", "valuetest","string",true);
Session session = environment.get(Session.class);
Transaction tx = session.beginTransaction();
session.update(processInstance);
tx.commit();
environment.close();
The exception stack trace is like this:
15:27:28,703 SEV | [BaseJbpmTestCase] TEST THROWS EXCEPTION: null
java.lang.NullPointerException
at org.jbpm.pvm.internal.history.events.VariableUpdate.process(VariableUpdate.java:48)
at org.jbpm.pvm.internal.history.HistorySessionImpl.process(HistorySessionImpl.java:31)
at org.jbpm.pvm.internal.history.HistoryEvent.fire(HistoryEvent.java:62)
at org.jbpm.pvm.internal.history.HistoryEvent.fire(HistoryEvent.java:52)
at org.jbpm.pvm.internal.type.Variable.setValue(Variable.java:97)
at org.jbpm.pvm.internal.model.ScopeInstanceImpl.createVariableObject(ScopeInstanceImpl.java:140)
at org.jbpm.pvm.internal.model.ScopeInstanceImpl.createVariable(ScopeInstanceImpl.java:90)
at com.asset.jupiter.jbpm.processes.Normal.NormalTest.testCreateProcessInstance(NormalTest.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:80)
at junit.framework.TestCase.runBare(TestCase.java:130)
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:120)
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:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2584) Command execution problems: org.hibernate.MappingException: Named query not known
by Dominic Umbeer (JIRA)
Command execution problems: org.hibernate.MappingException: Named query not known
---------------------------------------------------------------------------------
Key: JBPM-2584
URL: https://jira.jboss.org/jira/browse/JBPM-2584
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.1
Environment: - jBPM Version : 4.1
- JBOSS Version: 5.0.0.GA
- Database : Oracle 11g
- JDK : java version "1.6.0_12"
- Configuration : original jbpm.cfg.xml
- Libraries : no additional libs
Reporter: Dominic Umbeer
While executing e.g. a FindProcessInstanceByIdCmd or FindProcessInstanceByKeyCmd it occured a org.hibernate.MappingException: Named query not known: findProcessDefinitionsById or org.hibernate.MappingException: Named query not known: findProcessDefinitionsByKey respectivly.
FindProcessInstanceByIdCmd and FindProcessInstanceByKeyCmd are the known commands with this problem. Maybe other commands are effected too.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2715) Missing elements in jpdl-4.3.xsd
by Florent Legendre (JIRA)
Missing elements in jpdl-4.3.xsd
--------------------------------
Key: JBPM-2715
URL: https://jira.jboss.org/jira/browse/JBPM-2715
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.3
Environment: Windows Vista, java 1.6, jboss 4.2.2.GA
Reporter: Florent Legendre
Priority: Critical
The xsd file for the jpdl has created validation errors in 4.0, 4.1, 4.2 and now also 4.3, but the difference is that the parsing of the jpdl has become more efficient in 4.3 and now throws an exception when defining an argument on a constructor element.
The main problem here is that the declaration of arg elements does not allow for any child, which means that you can define the type of the argument, but not its value, making it pretty useless.
Here are the extracts of the various problematic files:
jpdl-4.3.xsd (from line 921):
==========
<complexType name="argType">
<annotation><documentation>The method arguments.
Each 'arg' element should have exactly one child element
that represents the value of the argument.
</documentation></annotation>
<attribute name="type" type="string">
<annotation><documentation>The java class name representing
the type of the method. This is optional and can be used to
indicate the appropriate method in case of method overloading.
</documentation></annotation>
</attribute>
</complexType>
An example jpdl which would trigger the error (as the string element in the arg does is not valid based on the xsd):
=========================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<process name="MyProsess"
version="1"
xmlns="http://jbpm.org/4.3/jpdl">
<start name="start">
<transition name="myTransition"
to="end">
<event-listener class="com.comp.MyEventListener">
<field name="myObjectField">
<object class="com.comp.MyObjectField">
<constructor>
<arg type="java.lang.String"><string value="hello world"/></arg>
</constructor>
</object>
</field>
</event-listener>
</transition>
</start>
<end name="end"/>
</process>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2884) Maven archetype for user web app
by Maciej Swiderski (JIRA)
Maven archetype for user web app
--------------------------------
Key: JBPM-2884
URL: https://jira.jboss.org/browse/JBPM-2884
Project: jBPM
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Maciej Swiderski
Assignee: Maciej Swiderski
Fix For: jBPM 4.x
At the moment to help with embedding jBPM into custom web application ant target is delivered as part of the distribution. Most of the development make use of Maven2 so I think maven archetype could be of quite big interest for developers.
Attached you can find a first version of the archetype that I created during one of the projects.
Some key characteristics:
- configures all required dependencies of jBPM web application - built based on ant target
- all dependencies are configured with properties which makes upgrading quite easy
- ready section of artifacts that shall be excluded while running in the container such as JBoss (jta, mail, servlet-api, etc)
- provides jBPM configuration that is stored both in src/main/resources and src/test/resources (only for tests with pre configured HSQLDB and logging, etc)
- sample process definition (very very basic) and sample test case for it
Attached you can find both sources and the archetype.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2882) NPE when parsing invalid script activity xml
by M M (JIRA)
NPE when parsing invalid script activity xml
--------------------------------------------
Key: JBPM-2882
URL: https://jira.jboss.org/browse/JBPM-2882
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.3
Reporter: M M
When attempting to deploy a process definition containing an invalid script element, the ScriptBinding throws a NPE rather than giving a meaningful error. This manifests itself as other unrelated errors that make no sense.
Caused by: java.lang.NullPointerException
at org.jbpm.pvm.internal.util.XmlUtil.getContentText(XmlUtil.java:237)
at org.jbpm.jpdl.internal.activity.ScriptBinding.parseJpdl(ScriptBinding.java:56)
at org.jbpm.jpdl.internal.activity.JpdlBinding.parse(JpdlBinding.java:52)
at org.jbpm.jpdl.internal.xml.JpdlParser.parseActivities(JpdlParser.java:317)
at org.jbpm.jpdl.internal.xml.JpdlParser.parseDocumentElement(JpdlParser.java:248)
at org.jbpm.pvm.internal.xml.Parser.parseDocument(Parser.java:476)
at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:396)
at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158)
at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:68)
at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2746) Broken NON-LATIN characters in project/node names/values during the replication Process Definition to the DB
by Konstantin Kasatkin (JIRA)
Broken NON-LATIN characters in project/node names/values during the replication Process Definition to the DB
------------------------------------------------------------------------------------------------------------
Key: JBPM-2746
URL: https://jira.jboss.org/jira/browse/JBPM-2746
Project: jBPM
Issue Type: Patch
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.1, jBPM 4.2, jBPM 4.3, jBPM 4.x
Reporter: Konstantin Kasatkin
Priority: Critical
Attachments: patch.zip
This issue is continuation of story described here https://jira.jboss.org/jira/browse/GPD-384
Please apply our patch over the source code.
It fixes improper treatment with non-latin character encoding during rooming process definition into DB.
Patch contains 2 modified classed from source code JBPM-4.2
Class StringStreamInput.java fixed by adding explicit encoding of source XML stream "UTF-8"
public InputStream openStream() {
byte[] bytes = string.getBytes();
return new ByteArrayInputStream(bytes);
}
changed to
public InputStream openStream() {
try {
byte[] bytes = string.getBytes("UTF-8");
return new ByteArrayInputStream(bytes);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
throw new RuntimeException("Unsupported encoding UTF-8");
}
}
Method checkKey(...) in Class ProcessDeployer.java fixed by commenting unnecessary replacing of non-latin characters to "_"
processDefinitionKey = processDefinitionName.replaceAll("\\W", "_");
changed to
processDefinitionKey = processDefinitionName;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months