Actions
Bug #1647
closedTransformerException: Exception of timeout in Schema compile
Start date:
2012-11-15
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
When Saxon DLL is used for validation,
If we are using version 9.4.0.4 (SaxonEE9.4N)
The use of xs:include in the schema throws an exception with the message timeout in Schema compile. This exception is not repeatable if the FeatureKeys.TIMING is set to true. The exception can be reproduced by the code below:
SchemaValidator schemaValidator = null;
try
{
IList errors = new ArrayList();
Saxon.Api.Processor proc = new Processor(true);
//proc.SetProperty(net.sf.saxon.lib.FeatureKeys.VALIDATION_WARNINGS, "true");
SchemaManager schemaManager = proc.SchemaManager;
//EXCEPTION
schemaManager.Compile(new Uri("http://www.example.com/example.xsd"));
schemaValidator = schemaManager.NewSchemaValidator();
using (FileStream xmlFs = new FileStream(@"C:\Users\alex.ABC\Desktop\Z\test.xml", FileMode.Open))
{
schemaValidator.SetSource(XmlReader.Create(xmlFs));
schemaValidator.ErrorList = errors;
schemaValidator.Run();
}
}
catch (net.sf.saxon.type.ValidationException e)
{
foreach (StaticError error in schemaValidator.ErrorList)
{
Console.WriteLine(error.ToString());
}
Console.ReadKey(true);
Environment.Exit(0);
}
foreach (StaticError error in schemaValidator.ErrorList)
{
Console.WriteLine(error.ToString());
}
Transformation error:, Exception: net.sf.saxon.trans.XPathException: javax.xml.transform.TransformerException: The operation has timed out, StackTrace: at com.saxonica.schema.sdoc.SchemaElement.error(SchemaException exception)
at com.saxonica.schema.sdoc.XSDInclude.prepareAttributes()
at com.saxonica.schema.sdoc.SchemaElement.processAllAttributes()
at com.saxonica.schema.sdoc.SchemaElement.processAllAttributes()
at com.saxonica.schema.sdoc.SchemaReader.read(Source source, SchemaCompiler compiler, PipelineConfiguration pipe, SchemaElement referrer)
at com.saxonica.config.EnterpriseConfiguration.addSchemaSource(Source schemaSource, ErrorListener errorListener)
at Saxon.Api.SchemaManager.Compile(XmlReader reader)
After upgrading to SaxonEE9.4.06N the exception (timeout) on second call in Schema compile seems to disappear. However the cause of the problem in earlier releases remains unresolved.
Updated by O'Neil Delpratt almost 11 years ago
- Status changed from New to Won't fix
We have not been able to establish the cause and are unable to consistently reproduce it. Please let us know if the problem reoccurs.
Please register to edit this issue
Actions