Project

Profile

Help

Saxon.NET HE with Mono 2.10.8 not working?

Added by eric fontana almost 12 years ago

I'm trying to use Saxon.net with Mono (2.10.8) on Linux, when I try to run it with mono i get:

[eric@farm228 MetaTemplateGenerator]$ mono bin/Debug/MetaTemplateGenerator.exe simple.xml

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for net.sf.saxon.Configuration ---> System.TypeLoadException: A type load exception has occurred.
  at java.lang.Class.desiredAssertionStatus () [0x00000] in :0
  at net.sf.saxon.Configuration..cctor () [0x00000] in :0
  --- End of inner exception stack trace ---
  at Saxon.Api.Processor..ctor () [0x00000] in :0
  at MetaTemplateGenerator.Program.Main (System.String[] args) [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for net.sf.saxon.Configuration ---> System.TypeLoadException: A type load exception has occurred.
  at java.lang.Class.desiredAssertionStatus () [0x00000] in :0
  at net.sf.saxon.Configuration..cctor () [0x00000] in :0
  --- End of inner exception stack trace ---
  at Saxon.Api.Processor..ctor () [0x00000] in :0
  at MetaTemplateGenerator.Program.Main (System.String[] args) [0x00000] in :0
[eric@farm228 MetaTemplateGenerator]$ which mono
/tools/linux/mono-2.10.8/bin/mono

Replies (7)

Please register to reply

RE: Saxon.NET HE with Mono 2.10.8 not working? - Added by Michael Kay almost 12 years ago

Saxon on Mono is untested and officially unsupported, but I believe people have used it successfully.

The first thing we need to know (obviously) is which version of Saxon you are using.

The path it is failing in (in case this is helpful) is the static initialization of the Configuration class, where the initializer attempts to locate the edition.properties file in order to discover which version/variant of Saxon is in use. The code here has been refined in successive releases to handle the variety of class loading environments that it has to cope with: hence the importance of knowing the precise version. So failures in "untested" environments on this path are not uncommon.

RE: Saxon.NET HE with Mono 2.10.8 not working? - Added by eric fontana almost 12 years ago

The version I'm using is SaxonHE9.4N, my question is, how do I code around this? Do i need to construct a configuration class and pass the path to it or something?

RE: Saxon.NET HE with Mono 2.10.8 not working? - Added by eric fontana almost 12 years ago

Also, the .net assembly reports version 9.4.0.3 for (saxon9he) and 9.4.0.3 for (saxon9he-api)

RE: Saxon.NET HE with Mono 2.10.8 not working? - Added by Michael Kay almost 12 years ago

If it's not working with 9.4.0.3 then I'm afraid there's probably no straightforward workaround. We'll give it a try ourselves next week; if we can't get it to work then we might talk to the IKVM people, but since this isn't an environment we test the product on, the response might have to be that if it doesn't work, then it doesn't work.

RE: Saxon.NET HE with Mono 2.10.8 not working? - Added by eric fontana almost 12 years ago

Thanks for checking, it's very important for us.

RE: Saxon.NET HE with Mono 2.10.8 not working? - Added by eric fontana almost 12 years ago

Michael Kay wrote:

If it's not working with 9.4.0.3 then I'm afraid there's probably no straightforward workaround. We'll give it a try ourselves next week; if we can't get it to work then we might talk to the IKVM people, but since this isn't an environment we test the product on, the response might have to be that if it doesn't work, then it doesn't work.

is there a place where I can download an older version to try?

RE: Saxon.NET HE with Mono 2.10.8 not working? - Added by eric fontana almost 12 years ago

FYI: I tested 9.1.0.8 and it works! with mono

    (1-7/7)

    Please register to reply