Re: [Ikvm-developers] Exception launching Saxon from .NET web application but not from windows appl
Brought to you by:
jfrijters
From: Michael K. <mi...@sa...> - 2012-09-15 18:31:49
|
Jason Beal reported on the Saxon list that this was Saxon 9.1.0.2. It would require a certain amount of archaeology to determine which version of IKVM that was built with, but it would be whatever we considered to be the most stable release in July 2008. Michael Kay Saxonica On 15/09/2012 09:09, Jeroen Frijters wrote: > For some reason the security stack walk that AtomicReferenceFieldUpdater does encounters an unexpected stack frame and that causes the security check to fail. > > BTW, what version of IKVM are you using? Recent versions have an optimized AtomicReferenceFieldUpdater implementation that completely by-pass the security check in this scenario. > > Regards, > Jeroen > >> -----Original Message----- >> From: Jason Beal [mailto:jas...@ya...] >> Sent: Friday, September 14, 2012 15:15 >> To: ikv...@li... >> Subject: [Ikvm-developers] Exception launching Saxon from .NET web >> application but not from windows application on same machine >> >> 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("Trying to 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.AtomicReferenceF >> ieldUpdaterImpl..ctor(Class , Class , String ) --- End of inner >> exception stack trace --- at >> java.util.concurrent.atomic.AtomicReferenceFieldUpdater.AtomicReferenceF >> ieldUpdaterImpl..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. >> > > ------------------------------------------------------------------------------ > How fast is your code? > 3 out of 4 devs don\\\'t know how their code performs in production. > Find out how slow your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219672;13503038;z? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers > |