[JBoss JIRA] Created: (JBPM-2908) Creating JbpmConfiguration with a different jbpm.cfg.xml in an action handler causes StackOverflowError
by Toshiya Kobayashi (JIRA)
Creating JbpmConfiguration with a different jbpm.cfg.xml in an action handler causes StackOverflowError
-------------------------------------------------------------------------------------------------------
Key: JBPM-2908
URL: https://jira.jboss.org/browse/JBPM-2908
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 3.2.9
Environment: SOA-P 4.3.0 CP04
Reporter: Toshiya Kobayashi
I tried to switch jbpm.cfg.xml (= create JbpmConfiguration with a different jbpm.cfg.xml) and start a process instance in my action handler.
Client:
1. Create a JbpmConfiguration with "jbpm.1.cfg.xml"
2. Create a JbpmContext with the JbpmConfiguration(jbpm.1.cfg.xml)
3. Create and start a process instance
Action handler of the process:
4. Create JbpmConfiguration instance with "jbpm.2.cfg.xml"
5. Create a JbpmContext with the JbpmConfiguration(jbpm.2.cfg.xml)
6. jbpmContext.getGraphSession() causes infinite loop and ends up with StackOverFlowError
Caused by: java.lang.StackOverflowError
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:210)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
at org.apache.log4j.Category.callAppenders(Category.java:203)
at org.apache.log4j.Category.forcedLog(Category.java:388)
at org.apache.log4j.Category.log(Category.java:853)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.logging.impl.Log4jProxy.log(Log4jProxy.java:311)
at org.apache.commons.logging.impl.Log4jProxy.info(Log4jProxy.java:273)
at org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:150)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1432)
at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:89)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:69)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:97)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:330)
at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:618)
at org.jbpm.instantiation.ProcessClassLoader.getProcessDefinition(ProcessClassLoader.java:57)
at org.jbpm.instantiation.ProcessClassLoader.findResource(ProcessClassLoader.java:63)
at java.lang.ClassLoader.getResource(ClassLoader.java:958)
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1148)
at org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:51)
at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:187)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150)
at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:83)
at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)
at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)
at org.dom4j.io.SAXReader.read(SAXReader.java:435)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1490)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:89)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:69)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:97)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:330)
at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:618)
...
How to reproduce:
- Start SOA-P 4.3 CP04
- download and unzip reproducer.zip
- copy jbpm.1.cfg.xml and jbpm.2.cfg.xml to <SOA_HOME>/jbossas/server/<config>/deploy/jbpm.esb
- cd ProcessDefinitions
- modify build.properties
- ant deploypar
- cd ..
- cd ProcessCallWS
- modify build.properties
- ant deploy
- ant run
# jbpm.1.cfg.xml and jbpm.2.cfg.xml have same contents as this is a test reproducer
Analysis:
As the context classloader is ProcessClassLoader in action handler execution, JbpmContext.getGraphSession() -> org.hibernate.cfg.Configuration.configure() let ProcessClassLoader find resources, but ProcessClassLoader invokes JbpmContext.getGraphSession() recursively.
Once DbPersistenceServiceFactory builds SessionFactory, the loop won't happen.
--
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, 3 months
[JBoss JIRA] Created: (JBPM-2876) Password encoding for login to console
by M M (JIRA)
Password encoding for login to console
--------------------------------------
Key: JBPM-2876
URL: https://jira.jboss.org/browse/JBPM-2876
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Console
Affects Versions: jBPM 4.3
Reporter: M M
When logging into the console, if a user's password includes a '%' (percent) symbol, the following error shows up in the server log and GWT shows an "authentication failed" error message.
06-01 12:03:22,412 WARN [org.apache.tomcat.util.http.Parameters] (http-stinger%2F10.20.36.59-8080-1) Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: isHexDigit
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:429)
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:412)
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:363)
at org.apache.catalina.connector.Request.parseParameters(Request.java:2562)
at org.apache.catalina.connector.Request.getParameter(Request.java:1060)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:254)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Here are some relevant links:
http://ninadgawad.wordpress.com/2008/08/21/character-decoding-error-while...
http://www.mail-archive.com/users@tomcat.apache.org/msg36743.html
http://www.mail-archive.com/users@tomcat.apache.org/msg36744.html
--
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, 3 months
[JBoss JIRA] Created: (JBPM-2931) Revert a DateVariable (ThreadSave)
by Michael Dirks (JIRA)
Revert a DateVariable (ThreadSave)
-----------------------------------
Key: JBPM-2931
URL: https://jira.jboss.org/browse/JBPM-2931
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.4
Environment: Windows XP, in a jvm (not jboss)
Reporter: Michael Dirks
If the DateToStringConverter will revert more than one Date in diffrent threads in the same time. Runtime excetion (NumberFormat....) will be thrown.
The SimpleDateFormat is not thread save!
Solution is:
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package de.isr.bpm.jbpm.internal;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.jbpm.api.JbpmException;
import org.jbpm.pvm.internal.model.ScopeInstanceImpl;
import org.jbpm.pvm.internal.type.Converter;
import org.jbpm.pvm.internal.type.Variable;
/**
* @author Tom Baeyens
*/
public class DateToStringConverter implements Converter {
private static final long serialVersionUID = 1L;
String format = "yyyy-MM-dd HH:mm:ss,SSS";
public Object convert(Object o, ScopeInstanceImpl scopeInstance, Variable variable) {
DateFormat dateFormat = new SimpleDateFormat(format);
return dateFormat.format((Date)o);
}
public Object revert(Object o, ScopeInstanceImpl scopeInstance, Variable variable) {
try {
DateFormat dateFormat = new SimpleDateFormat(format);
return dateFormat.parseObject((String)o);
} catch (ParseException e) {
throw new JbpmException("invalid date format in date variable: "+o, e);
}
}
public boolean supports(Object value, ScopeInstanceImpl scopeInstance, Variable variable) {
return ((value!=null) && (value instanceof Date));
}
public void setFormat(String format) {
this.format = format;
}
}
--
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, 3 months