commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Harp (JIRA)" <>
Subject [jira] [Commented] (JELLY-277) XMLParser.configure is not threadsafe.
Date Wed, 08 Jun 2011 00:27:59 GMT


Sean Harp commented on JELLY-277:

The compileScript method in org/apache/commons/jelly/ needs to be synchronized
as well.  This solved the issue for us.   

Prior to fixing this, I would experience nearly 50% failures with the error above when running
12 jelly scripts simultaneously on an 8-core server. After synchronizing compileScript, repeated
tests with 50 simultaneous jelly scripts were successful.

> XMLParser.configure is not threadsafe.
> --------------------------------------
>                 Key: JELLY-277
>                 URL:
>             Project: Commons Jelly
>          Issue Type: Bug
>          Components: core / taglib.core
>    Affects Versions: 1.0
>         Environment: Linux 64bits, JDK build 1.6.0_01-b06
>            Reporter: Yung-Lin Ho
> XMLParser will try to load from disk when it first being used. However,
because XMLParser.configure method is not threadsafe, when I tried to run multiple jelly scripts/instance
at the same time, XMLParser threw out the following error message 
> java.lang.ClassNotFoundException: core
>     at
>     at
>     at
>     at java.lang.ClassLoader.loadClass(
>     at org.apache.commons.jelly.parser.XMLParser.createTag(
> java.lang.ClassNotFoundException: core
>     at org.apache.commons.jelly.parser.XMLParser.createSAXException(
>     at org.apache.commons.jelly.parser.XMLParser.createTag(
>     at org.apache.commons.jelly.parser.XMLParser.startElement(
> In order to fix this problem, we have to make ensureConfigured() and configure() synchronized

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message