Bug #3374
closedMethod does not have an implementation. -- Utilize .net API and HE edition
Added by Alan Dillon over 7 years ago. Updated about 7 years ago.
0%
Description
Getting the following error when using the .net api with the HE edition. I have tried a number of things and I just cannot work through it:
Method 'forEach' in type 'net.sf.saxon.value.QNameValue' from assembly 'saxon9he, Version=9.8.0.1, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6' does not have an implementation.
Any help is appreciated.
It happens on this line in the .net API:
processor = new JProcessor(false);
In the Constructor of the Processor Class.
Files
saxon.config (3.63 KB) saxon.config | Alan Dillon, 2017-08-07 18:56 | ||
books.txt (22 Bytes) books.txt | Alan Dillon, 2017-08-09 16:32 | ||
books.xsl (4.52 KB) books.xsl | Alan Dillon, 2017-08-09 16:32 | ||
neterror.html (38.8 KB) neterror.html | Alan Dillon, 2017-08-09 17:50 | ||
c2.png (6.85 KB) c2.png | Alan Dillon, 2017-08-09 18:34 | ||
c1.png (19.2 KB) c1.png | Alan Dillon, 2017-08-09 18:34 |
Updated by Alan Dillon over 7 years ago
Guess I could post this in the forum. Did not think about that first!
Let me know if you would rather I do that.
Updated by Michael Kay over 7 years ago
It's quite appropriate to post it here: we track bug postings much more carefully to make sure they eventually get closed, whereas forum postings can go unanswered if no-one knows how to answer.
This is a strange one and it's not immediately obvious how to investigate it. From your description, you're not doing anything that isn't done in every single test case. It might be useful to have more detail about your configuration. Also, can you run Transform successfully on .net from the command line?
QNameValue extends QualifiedNameValue which extends AtomicValue which implements AtomicSequence which implements Iterable, and in Java 8, the Iterable interface acquires a new method forEach. But it shouldn't be necessary for Saxon to implement this method because the interface provides a default implementation. There's some kind of confusion over Java versions going on here. Have you done any kind of custom configuration, e.g. could you be picking up the wrong version of IKVM?
Updated by O'Neil Delpratt over 7 years ago
Please can you send us an example code which reproduces the error.
Updated by Alan Dillon over 7 years ago
- File saxon.config saxon.config added
So I am currently running the .net api source I pulled down from sourceforge.
I do the following in my code:
var path = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, System.AppDomain.CurrentDomain.RelativeSearchPath ?? "");
// Create a Processor instance.
Saxon.Api.Processor processor = new Saxon.Api.Processor(new StreamReader(path + @"\saxon.config").BaseStream);
It fails on that second line which calls the API Constructor:
public class Processor
{
//Transformation data variables
private SchemaManager schemaManager = null;
/*internal JConfiguration config;
*/
private TextWriter textWriter = Console.Error;
private JProcessor processor;
/// <summary>
/// Create a new Processor. This Processor will have capabilities that depend on the version
/// of the software that has been loaded, and on the features that have been licensed.
/// </summary>
public JResult ResResult { get; set; }
public Processor()
{
/*config = JConfiguration.newConfiguration();
config.registerExternalObjectModel(new DotNetObjectModelDefinition());
config.setProcessor(this);*/
processor = new JProcessor(false);
processor.getUnderlyingConfiguration().registerExternalObjectModel(new DotNetObjectModelDefinition());
}
Then errors on:
processor = new JProcessor(false);
My config is attached.
I have no weird configurations currently. (Does not mean something from the past could not be haunting me.)
Updated by O'Neil Delpratt over 7 years ago
Hi,
We are failing to reproduce the error you reported. Is it possible for you tell us more about your environment. For example, is it possible you are picking up a different version of IKVM? Does it work if you call Transform from the commandline? Does it work if you instantiate a Processor without a configuration file?
Updated by Alan Dillon over 7 years ago
Right now in command line I get the following when using the samples:
PS C:\Program Files\Saxonica\Resources\samples\styles> transform -s:"books.txt" -xsl:"books.xsl" -o:"temp.out"
Warning at xsl:transform on line 3 column 17 of books.xsl:
Running an XSLT 2.0 stylesheet with an XSLT 3.0 processor
Unhandled Exception: System.TypeInitializationException: The type initializer for 'net.sf.saxon.expr.number.NumberFormat
ter' threw an exception. ---> System.TypeInitializationException: The type initializer for 'net.sf.saxon.regex.charclass
.Categories' threw an exception. ---> java.lang.RuntimeException: Unable to read categories.xml file
at net.sf.saxon.regex.charclass.Categories.build()
at net.sf.saxon.regex.charclass.Categories.getCategory(String cat)
at net.sf.saxon.regex.charclass.Categories..cctor()
--- End of inner exception stack trace ---
at net.sf.saxon.regex.charclass.Categories.getCategory(String cat)
at net.sf.saxon.expr.number.NumberFormatter..cctor()
--- End of inner exception stack trace ---
at net.sf.saxon.expr.number.NumberFormatter..ctor()
at net.sf.saxon.style.XSLNumber.prepareAttributes()
at net.sf.saxon.style.StyleElement.processAttributes()
at net.sf.saxon.style.StyleElement.processAllAttributes()
at net.sf.saxon.style.StyleElement.processAllAttributes()
at net.sf.saxon.style.StyleElement.processAllAttributes()
at net.sf.saxon.style.StyleElement.processAllAttributes()
at net.sf.saxon.style.StyleElement.processAllAttributes()
at net.sf.saxon.style.StyleElement.processAllAttributes()
at net.sf.saxon.style.StyleElement.processAllAttributes()
at net.sf.saxon.style.StyleElement.processAllAttributes()
at net.sf.saxon.style.XSLTemplate.processAllAttributes()
at net.sf.saxon.style.PrincipalStylesheetModule.processAllAttributes()
at net.sf.saxon.style.PrincipalStylesheetModule.preprocess()
at net.sf.saxon.style.Compilation.compilePackage(Source source)
at net.sf.saxon.style.StylesheetModule.loadStylesheet(Source styleSource, Compilation compilation)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Configuration config, CompilerInfo compilerInfo, Source sou
rce)
at net.sf.saxon.s9api.XsltCompiler.compile(Source source)
at net.sf.saxon.Transform.doTransform(String[] args, String command)
at Saxon.Cmd.DotNetTransform.Main(String[] args)
PS C:\Program Files\Saxonica\Resources\samples\styles>
It does not work if I instantiate the processor without a config file. I have tried the last three versions of IKVM and none make a difference.
Updated by O'Neil Delpratt over 7 years ago
- Applies to branch 9.8 added
Hi,
Looking at the error. It looks like Saxon is failing here to read the data files, which should have been included in the dll. Please can you send me the files: books.txt and books.xsl.
Updated by O'Neil Delpratt over 7 years ago
Hi,
i think this problem has been resolved. Please use the latest Saxon 9.8 maintenance release: Currently at version 9.8.0.3
Updated by Alan Dillon over 7 years ago
Attached files. I will also update my version.
Updated by Alan Dillon over 7 years ago
New error:
PS C:\Program Files\Saxonica\Resources\samples\styles> transform -s:"books.txt" -xsl:"books.xsl" -o:"temp.out"
Error on line 1 column 1 of books.txt:
SXXP0003: Error reported by XML parser: Content is not allowed in prolog.
org.xml.sax.SAXParseException; systemId: file:///C:/Program%20Files/Saxonica/Resources/samples/styles/books.txt; lineNumber: 1; columnNumber: 1;
Content is not allowed in prolog.
PS C:\Program Files\Saxonica\Resources\samples\styles>
Updated by Michael Kay over 7 years ago
books.txt is a text file not an XML file so you would expect this error.
Updated by Alan Dillon over 7 years ago
Right. Yes.
So is there some XML in samples to use with the transformer?
I can pull my files from the DB and try those right now to see what I get.
Updated by Michael Kay over 7 years ago
There are plenty of suitable files in the saxon-resources download, a separate download available either from saxonica.com or from saxon.sf.net.
Updated by O'Neil Delpratt over 7 years ago
Hi,
Looking at the stylesheet it reads the books.txt using unparsed-text.
Updated by Alan Dillon over 7 years ago
- File neterror.html neterror.html added
Ok so the command line worked for my xml and the sample.
I removed the older transform from the path variable.
Pointed the Saxon .net api to the 9.8.0.3 (running the source so I can debug)
Attached error page from .net
Updated by O'Neil Delpratt over 7 years ago
Hi,
The error message is difficult to read as it is an html file. Please, can you paste the error message you are getting.
Thanks
Updated by Alan Dillon over 7 years ago
Server Error in '/' Application.
Method 'forEach' in type 'net.sf.saxon.value.QNameValue' from assembly 'saxon9he, Version=9.8.0.3, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6' does not have an implementation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Method 'forEach' in type 'net.sf.saxon.value.QNameValue' from assembly 'saxon9he, Version=9.8.0.3, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6' does not have an implementation.
Source Error:
Line 153: {
Line 154: StreamSource ss = new StreamSource(new JDotNetInputStream(configurationFile));
Line 155: JConfiguration config = JConfiguration.readConfiguration(ss);
Line 156: config.registerExternalObjectModel(new DotNetObjectModelDefinition());
Line 157: //config.setProcessor(this);
Source File: Q:\REPOS\Legacy\Utilities\PdfGenerator\SaxonApi\Configuration.cs Line: 155
Stack Trace:
[TypeLoadException: Method 'forEach' in type 'net.sf.saxon.value.QNameValue' from assembly 'saxon9he, Version=9.8.0.3, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6' does not have an implementation.]
System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) +0
System.Reflection.RuntimeMethodInfo.FetchReturnParameter() +62
System.Reflection.RuntimeMethodInfo.get_ReturnParameter() +13
IKVM.Internal.CompiledTypeWrapper.GetNameSigFromMethodBase(MethodBase method, String& name, String& sig, TypeWrapper& retType, TypeWrapper[]& paramTypes, MemberFlags& flags) +92
IKVM.Internal.CompiledTypeWrapper.AddMethodOrConstructor(MethodBase method, HideFromJavaFlags hideFromJavaFlags, List`1 methods) +285
IKVM.Internal.CompiledTypeWrapper.AddMethods(MethodInfo[] add, List`1 methods) +50
IKVM.Internal.CompiledTypeWrapper.LazyPublishMethods() +230
IKVM.Internal.TypeWrapper.GetMethods() +69
Java_java_lang_Class.getDeclaredConstructors0(Class thisClass, Boolean publicOnly) +78
java.lang.Class.privateGetDeclaredConstructors(Boolean ) +112
java.lang.Class.getConstructor0(Class[] , Int32 ) +38
java.lang.Class.newInstance(CallerID ) +126
net.sf.saxon.Configuration.newConfiguration() +111
net.sf.saxon.Configuration.readConfiguration(Source source) +11
Saxon.Api.Processor..ctor(Stream configurationFile) in Q:\REPOS\Legacy\Utilities\PdfGenerator\SaxonApi\Configuration.cs:155
PdfGenerator.Services.PdfService.GeneratePdf(String xsl, String xml, String templateID) in Q:\REPOS\Legacy\Utilities\PdfGenerator\PdfGenerator\Services\PdfService.cs:196
PdfGeneratorMvc.Controllers.PublicationsController.Publications(DocumentSettingsViewModel model) in Q:\REPOS\Legacy\Utilities\PdfGenerator\PdfGeneratorMvc\Controllers\PublicationsController.cs:374
lambda_method(Closure , ControllerBase , Object[] ) +104
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +157
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +228
System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9765901
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Updated by O'Neil Delpratt over 7 years ago
Hi,
Thanks for sending me the error. To investigate the problem further we need to try and understand more about your solution and the environment in how you are running Saxon. For instance, in the stack trace, I see things such as "System.Web.HttpApplication" and "System.Web.Mvc" which makes me think you are running it in some kind of server?
Updated by Alan Dillon over 7 years ago
Yeah. This is a .net MVC Web Application.
My application calls the Saxon .net API then from there that is where the issue happens.
The Saxon API is setup like so on my machine (This is just the .net wrapper that was written by your team)
Attached image of how it looks in visual studio.
Here are the packages:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="IKVM" version="8.1.5717.0" targetFramework="net462" />
</packages>
And the csproj:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8688C2E0-A5A0-4E63-8D40-4D3E7499F153}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SaxonApi</RootNamespace>
<AssemblyName>SaxonApi</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="IKVM.AWT.WinForms, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.AWT.WinForms.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Beans, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Beans.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Charsets, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Charsets.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Cldrdata, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Cldrdata.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Corba, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Corba.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Core, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Core.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Jdbc, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Jdbc.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Localedata, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Localedata.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Management, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Management.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Media, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Media.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Misc, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Misc.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Naming, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Naming.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Nashorn, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Nashorn.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Remoting, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Remoting.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Security, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Security.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.SwingAWT, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.SwingAWT.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Text, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Text.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Tools, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Tools.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Util, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.Util.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.XML.API, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.API.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.XML.Bind, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Bind.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.XML.Crypto, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Crypto.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.XML.Parse, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Parse.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.XML.Transform, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.Transform.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.XML.WebServices, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.WebServices.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.XML.XPath, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.OpenJDK.XML.XPath.dll</HintPath>
</Reference>
<Reference Include="IKVM.Runtime, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.Runtime.dll</HintPath>
</Reference>
<Reference Include="IKVM.Runtime.JNI, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<HintPath>..\packages\IKVM.8.1.5717.0\lib\IKVM.Runtime.JNI.dll</HintPath>
</Reference>
<Reference Include="saxon9he, Version=9.8.0.3, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Saxonica\SaxonHE9.8N\bin\saxon9he.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration.cs" />
<Compile Include="Destination.cs" />
<Compile Include="Errors.cs" />
<Compile Include="Extensibility.cs" />
<Compile Include="Model.cs" />
<Compile Include="NamespaceConstant.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Schema.cs" />
<Compile Include="Types.cs" />
<Compile Include="XPath.cs" />
<Compile Include="XQuery.cs" />
<Compile Include="Xslt.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Updated by Michael Kay over 7 years ago
I think this is the issue. Saxon 9.8 on .NET is built using ikvm-7.2.4630.5.
Why aren't you simply using the DLL that we issue?
Updated by Alan Dillon over 7 years ago
It was running on 7.2 then I updated it to try and fix the issue.
Neither one had a difference.
I removed the package via nuget and now with the DLLs that came with 9.8.0.3 referenced.
Still get:
Method 'forEach' in type 'net.sf.saxon.value.QNameValue' from assembly 'saxon9he, Version=9.8.0.3, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6' does not have an implementation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Method 'forEach' in type 'net.sf.saxon.value.QNameValue' from assembly 'saxon9he, Version=9.8.0.3, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6' does not have an implementation.
Source Error:
Line 153: {
Line 154: StreamSource ss = new StreamSource(new JDotNetInputStream(configurationFile));
Line 155: JConfiguration config = JConfiguration.readConfiguration(ss);
Line 156: config.registerExternalObjectModel(new DotNetObjectModelDefinition());
Line 157: //config.setProcessor(this);
Same error as above.
New csconfig:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8688C2E0-A5A0-4E63-8D40-4D3E7499F153}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SaxonApi</RootNamespace>
<AssemblyName>SaxonApi</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="IKVM.OpenJDK.Charsets, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Saxonica\SaxonHE9.8N\bin\IKVM.OpenJDK.Charsets.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Core, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Saxonica\SaxonHE9.8N\bin\IKVM.OpenJDK.Core.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Text, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Saxonica\SaxonHE9.8N\bin\IKVM.OpenJDK.Text.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Util, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Saxonica\SaxonHE9.8N\bin\IKVM.OpenJDK.Util.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.XML.API, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Saxonica\SaxonHE9.8N\bin\IKVM.OpenJDK.XML.API.dll</HintPath>
</Reference>
<Reference Include="IKVM.Runtime, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Saxonica\SaxonHE9.8N\bin\IKVM.Runtime.dll</HintPath>
</Reference>
<Reference Include="saxon9he, Version=9.8.0.3, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Saxonica\SaxonHE9.8N\bin\saxon9he.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration.cs" />
<Compile Include="Destination.cs" />
<Compile Include="Errors.cs" />
<Compile Include="Extensibility.cs" />
<Compile Include="Model.cs" />
<Compile Include="NamespaceConstant.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Schema.cs" />
<Compile Include="Types.cs" />
<Compile Include="XPath.cs" />
<Compile Include="XQuery.cs" />
<Compile Include="Xslt.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Updated by Michael Kay over 7 years ago
You still seem to be rebuilding the Saxon.Api modules from source code. I can't see why you are doing this. Just install the product as described in the documentation, and ensure that your project references the issued DLLs.
Updated by Alan Dillon over 7 years ago
Did that originally. Still had issues so I wanted to step into the API code.
Also my application is running the newest version of IKVM and needs it.
I am not completely sure if I can make saxon look at an older version and not the rest of the app.
At least I have never had to do that before.
Updated by Michael Kay about 7 years ago
- Status changed from New to Closed
This thread has meandered through a number of issues (which should really have been classed as Support rather than Bug). As it has been dormant for a while I think it would be best to close it now: please feel free to open a new Support thread if you are still having problems. I think the final status was that you were trying to build Saxon on .NET with a different IKVM version than the one we have used ourselves, and frankly that is something that we cannot really support: in other words, try to make it work if you want, but we can't really help you or guarantee success.
Please register to edit this issue