Project

Profile

Help

Bug #2755

closed

java.lang.IllegalStateException thrown when creating a pipeline

Added by O'Neil Delpratt almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Category:
.NET API
Sprint/Milestone:
-
Start date:
2016-05-23
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7
Fixed in Maintenance Release:
Platforms:

Description

Reported by user on saxon-list:

Trying to setup a processing pipeline in .NET (Latest stable 9.0.7.4) I get the following error:

An unhandled exception of type 'java.lang.IllegalStateException' occurred in saxon9he.dll

Additional information: The Controller has not been initialized

I have tried to setup the pipeline in the following manner:

var p = new Processor();
            var c = p.NewXsltCompiler();
            var xsltStep1 = c.Compile(new Uri(@"p1.xsl"));
            var xsltStep2 = c.Compile(new Uri(@"p2.xsl"));           
 
            var step1 = xsltStep1.Load();           
            var step2 = xsltStep2.Load();
 
            var dest = new Serializer();
            dest.SetOutputFile(@"OutputStep2.xml");
 
            step2.Destination = dest;
 
            var inputFilePath = @"input.xml";
            using (var input = System.IO.File.OpenRead(inputFilePath))
            {
                step1.SetInputStream(input, new Uri(inputFilePath));
                step1.Run(step2);
            }

Is this the way to setup a pipeline?

Actions #1

Updated by O'Neil Delpratt almost 8 years ago

This is indeed a bug. I have managed to reproduce the exception on .NET

Actions #2

Updated by O'Neil Delpratt almost 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
  • Fix Committed on Branch 9.7 added

Fix made in the XsltTransformer class and committed to subversion available for the next maintenance release.

Here we had failed to call the initializeController method when the Destination is itself a XsltTransformer.

This meant that the transformer was in an unsatisfactory state when we executing the second transformer.

Added nunit test for the pipeline.

Actions #3

Updated by O'Neil Delpratt almost 8 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.7.0.6 added

Bug fixed in maintenance release 9.7.0.6.

Please register to edit this issue

Also available in: Atom PDF