java.lang.NoClassDefFoundError for com.saxoni

  • aganatra

    aganatra - 2012-06-05


    I am getting this exception when I try to invoke the following line in C#. I
    am using Saxon 9.4 EE in .Net.

    XsltTransformer transformer = processor.NewXsltCompiler().Compile(new

    The exception is below. I would appreciate any help.

    java.lang.NoClassDefFoundError was unhandled
    thisClassLoader, String name, Byte b, Int32 off, Int32 len, Object pd, String
    at java.lang.ClassLoader.defineClass(String name, Byte b, Int32 off, Int32
    len, ProtectionDomain protectionDomain)
    at java.lang.ClassLoader.defineClass(String name, Byte b, Int32 off, Int32
    at com.saxonica.bytecode.util.CompilerService$1.findClass(String )
    at java.lang.ClassLoader.loadClass(String name, Boolean resolve)
    at java.lang.ClassLoader.loadClass(String name)
    at com.saxonica.bytecode.util.CompilerService.makeClass(ClassWriter writer,
    String className)
    at com.saxonica.bytecode.util.CompilerService.compileToByteCode(Expression
    expr, String objectName, Int32 evaluationModes)
    at expr, String
    objectName, Int32 evaluationMethods)
    at declaration)
    at net.sf.saxon.PreparedStylesheet.setStylesheetDocument(DocumentImpl doc)
    at net.sf.saxon.PreparedStylesheet.prepare(Source styleSource)
    at net.sf.saxon.TransformerFactoryImpl.newTemplates(Source source,
    CompilerInfo info)
    at Saxon.Api.XsltCompiler.Compile(Uri uri)
    at ConsoleApplication1.Program.Main(String args) in
    C:\Users\aganatra\Documents\Visual Studio
    2010\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 64
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
    assemblySecurity, String args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
    ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
    ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()

  • aganatra

    aganatra - 2012-06-05

    I read on another post that this may be a bug that was fixed. Also it was
    suggested that if you turn off byte code generation the issue may be fixed,
    but I wasn't able to set a feature to turn off the byte code. Couldn't get the
    exact property name. I tried the following line, but it didn't work.

    ", "false");

  • Michael Kay

    Michael Kay - 2012-06-05

    It would be useful if you could report problems on rather
    than here, especially if they relate only to commercial versions of the

    Please make sure you are using the latest maintenance release of the software
    ( This incorporates a later version of IKVM than, which fixes
    some issues in byte code generation.

    If you want to suppress byte code generation, the property name to use is "ht
    ". I'm afraid that for historic reasons the property names use
    camelcase versus hyphenated names rather unpredictably. You can find the list
    of names here:

  • aganatra

    aganatra - 2012-06-06

    Thanks Michael,

    I believe I am using The download package I used to install says

    I tried with bytecode generation disabled using the property name you provided
    and that seems to get rid of the issue. So for now I will stick to that.

    Thanks a lot for quick response. I will use in future.

  • Michael Kay

    Michael Kay - 2012-06-06

    I'm glad you have a workaround, but if you experienced the problem on
    then we would much appreciate it if you could put together the materials
    needed for us to reproduce the problem so we can avoid other users running
    into the same issue in the future.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks