You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Raul Kripalani (JIRA)" <ji...@apache.org> on 2009/04/24 14:34:38 UTC
[jira] Created: (CAMEL-1565) Make camel-validation thread-safe
Make camel-validation thread-safe
---------------------------------
Key: CAMEL-1565
URL: https://issues.apache.org/activemq/browse/CAMEL-1565
Project: Apache Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 1.4.0
Reporter: Raul Kripalani
When a flow which contains a camel-validation endpoint is started, the XSD schemas are not loaded until the first request comes in and the camel-validation endpoint is first hit.
If two requests come in simultaneously, the initialization will be performed twice, at the same time. It seems that SchemaFactory is not thread-safe, so this results in the following exception:
10:38:20,860 | ERROR - org.apache.camel.processor.DeadLetterChannel - org.apache.camel.processor.Logger - Failed delivery for exchangeId: ID-ATOS-B624
E47AF0/3211-1240562892751/0-11. On delivery attempt: 0 caught: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXException(Util.java:62)
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:214)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
at org.apache.camel.processor.validation.ValidatingProcessor.createSchema(ValidatingProcessor.java:204)
at org.apache.camel.processor.validation.ValidatingProcessor.getSchema(ValidatingProcessor.java:118)
at org.apache.camel.processor.validation.ValidatingProcessor.process(ValidatingProcessor.java:54)
at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:92)
at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:66)
at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
.....
For more info: http://www.nabble.com/Concurrency-Issue-with-camel-validation-td23213294.html
Is it possible to backport the fix to 1.4?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-1565) Make camel-validation thread-safe
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-1565.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
1.6.1
Assignee: Claus Ibsen
1.x: 768346
trunk: 768342
> Make camel-validation thread-safe
> ---------------------------------
>
> Key: CAMEL-1565
> URL: https://issues.apache.org/activemq/browse/CAMEL-1565
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 1.4.0
> Reporter: Raul Kripalani
> Assignee: Claus Ibsen
> Fix For: 1.6.1, 2.0.0
>
>
> When a flow which contains a camel-validation endpoint is started, the XSD schemas are not loaded until the first request comes in and the camel-validation endpoint is first hit.
> If two requests come in simultaneously, the initialization will be performed twice, at the same time. It seems that SchemaFactory is not thread-safe, so this results in the following exception:
> 10:38:20,860 | ERROR - org.apache.camel.processor.DeadLetterChannel - org.apache.camel.processor.Logger - Failed delivery for exchangeId: ID-ATOS-B624
> E47AF0/3211-1240562892751/0-11. On delivery attempt: 0 caught: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
> org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
> at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXException(Util.java:62)
> at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:214)
> at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
> at org.apache.camel.processor.validation.ValidatingProcessor.createSchema(ValidatingProcessor.java:204)
> at org.apache.camel.processor.validation.ValidatingProcessor.getSchema(ValidatingProcessor.java:118)
> at org.apache.camel.processor.validation.ValidatingProcessor.process(ValidatingProcessor.java:54)
> at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:92)
> at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:66)
> at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> .....
> For more info: http://www.nabble.com/Concurrency-Issue-with-camel-validation-td23213294.html
> Is it possible to backport the fix to 1.4?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1565) Make camel-validation thread-safe
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51390#action_51390 ]
Claus Ibsen commented on CAMEL-1565:
------------------------------------
Raul, we will not backport a fix into Camel 1.4.x.
You have to use your own component or patch Camel yourself.
But the patch will make it into the existing 1.x line, that is 1.6.1
> Make camel-validation thread-safe
> ---------------------------------
>
> Key: CAMEL-1565
> URL: https://issues.apache.org/activemq/browse/CAMEL-1565
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 1.4.0
> Reporter: Raul Kripalani
>
> When a flow which contains a camel-validation endpoint is started, the XSD schemas are not loaded until the first request comes in and the camel-validation endpoint is first hit.
> If two requests come in simultaneously, the initialization will be performed twice, at the same time. It seems that SchemaFactory is not thread-safe, so this results in the following exception:
> 10:38:20,860 | ERROR - org.apache.camel.processor.DeadLetterChannel - org.apache.camel.processor.Logger - Failed delivery for exchangeId: ID-ATOS-B624
> E47AF0/3211-1240562892751/0-11. On delivery attempt: 0 caught: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
> org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
> at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXException(Util.java:62)
> at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:214)
> at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
> at org.apache.camel.processor.validation.ValidatingProcessor.createSchema(ValidatingProcessor.java:204)
> at org.apache.camel.processor.validation.ValidatingProcessor.getSchema(ValidatingProcessor.java:118)
> at org.apache.camel.processor.validation.ValidatingProcessor.process(ValidatingProcessor.java:54)
> at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:92)
> at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:66)
> at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> .....
> For more info: http://www.nabble.com/Concurrency-Issue-with-camel-validation-td23213294.html
> Is it possible to backport the fix to 1.4?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-1565) Make camel-validation thread-safe
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51393#action_51393 ]
Claus Ibsen commented on CAMEL-1565:
------------------------------------
Raul see this link for the patch
http://svn.apache.org/viewvc?view=rev&revision=768346
> Make camel-validation thread-safe
> ---------------------------------
>
> Key: CAMEL-1565
> URL: https://issues.apache.org/activemq/browse/CAMEL-1565
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 1.4.0
> Reporter: Raul Kripalani
> Assignee: Claus Ibsen
> Fix For: 1.6.1, 2.0.0
>
>
> When a flow which contains a camel-validation endpoint is started, the XSD schemas are not loaded until the first request comes in and the camel-validation endpoint is first hit.
> If two requests come in simultaneously, the initialization will be performed twice, at the same time. It seems that SchemaFactory is not thread-safe, so this results in the following exception:
> 10:38:20,860 | ERROR - org.apache.camel.processor.DeadLetterChannel - org.apache.camel.processor.Logger - Failed delivery for exchangeId: ID-ATOS-B624
> E47AF0/3211-1240562892751/0-11. On delivery attempt: 0 caught: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
> org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
> at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXException(Util.java:62)
> at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:214)
> at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
> at org.apache.camel.processor.validation.ValidatingProcessor.createSchema(ValidatingProcessor.java:204)
> at org.apache.camel.processor.validation.ValidatingProcessor.getSchema(ValidatingProcessor.java:118)
> at org.apache.camel.processor.validation.ValidatingProcessor.process(ValidatingProcessor.java:54)
> at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:92)
> at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:66)
> at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> .....
> For more info: http://www.nabble.com/Concurrency-Issue-with-camel-validation-td23213294.html
> Is it possible to backport the fix to 1.4?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.