[Ikvm-developers] Exception launching Saxon from .NET web application but not from windows applicat
Brought to you by:
jfrijters
|
From: Jason B. <jas...@ya...> - 2012-09-14 13:15:32
|
One particular IIS server we have for in-house testing is failing to instantiate a Saxon processor object. Other IIS servers we have deployed the web application on work fine.
I created a basic web app to instantiate the processor with the following code behind:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Write("Tryingto instantiate SaxonProcessor...")
Try
Dim SaxonProcessor As Saxon.Api.Processor = New Saxon.Api.Processor()
Response.Write("Saxon instantiated successfully!")
Catch ex As Exception
Response.Write("Error: " & ex.Message & ex.StackTrace)
End Try
End Sub
This is the exception that I get when the page loads:
Trying to instantiate SaxonProcessor...
System.TypeInitializationException: The
type initializer for 'IKVM.NativeCode.java.lang.Thread' threw an exception.
---> System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.TypeInitializationException: The
type initializer for 'java.io.BufferedInputStream' threw an exception. --->
java.lang.RuntimeException: java.lang.IllegalAccessException: Class
java.util.concurrent.atomic.AtomicReferenceFieldUpdater can not access a member
of class java.io.BufferedInputStream with modifiers "volatile" --->
java.lang.IllegalAccessException: Class
java.util.concurrent.atomic.AtomicReferenceFieldUpdater can not access a member
of class java.io.BufferedInputStream with modifiers "volatile" at
sun.reflect.misc.ReflectUtil.ensureMemberAccess(Class currentClass, Class
memberClass, Object target, Int32 modifiers) at
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.AtomicReferenceFieldUpdaterImpl..ctor(Class
, Class , String ) --- End of inner exception stack trace --- at
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.AtomicReferenceFieldUpdaterImpl..ctor(Class
, Class , String ) at
java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater(Class tclass,
Class vclass, String fieldName) at java.io.BufferedInputStream..cctor() --- End
of inner exception stack trace --- at java.io.BufferedInputStream.__()
at java.lang.System.initializeSystemClass() --- End of inner exception stack
trace --- at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo
method, Object target, Object[] arguments, SignatureStruct& sig,
MethodAttributes methodAttributes, RuntimeType typeOwner) at
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object
target, Object[] arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean skipVisibilityChecks) at
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr,
Binder binder, Object[] parameters, CultureInfo culture) at
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at
IKVM.NativeCode.java.lang.Thread..cctor() --- End of inner exception stack trace
--- at IKVM.NativeCode.java.lang.Class.forName0(String name, Boolean initialize,
Object loader) at java.lang.Class.forName(String className) at
net.sf.saxon.dotnet.DotNetExtensionFunctionFactory.class$(String x0) at
net.sf.saxon.dotnet.DotNetExtensionFunctionFactory..ctor(Configuration config)
at net.sf.saxon.dotnet.DotNetPlatform.initialize(Configuration config) at
net.sf.saxon.Configuration.init() at net.sf.saxon.Configuration..ctor() at
Saxon.Api.Processor..ctor() at BealSaxxon._Default.Page_Load(Object sender,
EventArgs e)
If I write equivalent code and execute it from a windows application and run that application from the same machine, it works fine.
There is some factor in play between the IIS code and the windows application that I cannot figure out. |