Project

Profile

Help

Trouble upgrading to Sanon SA

Added by Anonymous almost 16 years ago

Legacy ID: #5154196 Legacy Poster: Jim O'Hara (jimbocz)

Hello, I am trying to upgrade an application that was previously running the free version of Saxon to Saxon SA. I am getting the error: {"java.lang.ClassNotFoundException: com.saxonica.validate.SchemaAwareConfiguration, saxon9sa, Version=9.1.0.1, Culture=neutral, PublicKeyToken=e1fdd002d5083fe6"} This happens right at the point when I try to create a new processor by using processor = new Processor(true); . Bizarely, If I use a function that worked before the upgrade that creates a non-scehma aware proccessor ( by using Processor processor = new Processor(); ) , then everything works fine. I have copied the entire bin directory of the saxonsa9-1-0-1n.zip to a folder at C:\Dev\ThirdParty\Saxon 9 SA\bin. My Visual Studio project references the dlls from that folder. I have also put the license file in that folder as well. My Path environmental variable looks like this with Saxon at the very end: C:\Program Files\IBM\WebSphere MQ\Java\lib;C:\Program Files\CA\Dcs\DMScripting;C:\Program Files\CA\DCS\CAWIN;C:\PROGRA~1\FileNET\Shared;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\CA\Unicenter Software Delivery\BIN;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\Rational\common;C:\Program Files\CA\SharedComponents\CAM\bin;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn;C:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\Program Files\Microsoft SQL Server\90\DTS\Binn;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies;C:\Dev\ThirdParty\Saxon 9 SA\bin My SAXON_HOME environmental variable looks like this: C:/Dev/ThirdParty/Saxon 9 SA/ Can you help me figure out what is wrong? Thanks, Jim


Replies (1)

RE: Trouble upgrading to Sanon SA - Added by Anonymous almost 16 years ago

Legacy ID: #5154270 Legacy Poster: Michael Kay (mhkay)

The saxon.dll code does a dynamic load of this class whenever you try to create a schema-aware Processor object (which explains why it doesn't fail when you create a non-schema-aware processor). My understanding of dynamic loading under .NET is that there are two things that work: placing the assembly in the same directory as the initial .exe application, and placing it in the Global Assembly Cache. I would recommend installing in the GAC (which you don't seem to have tried). There's a simple script to install DLLs in the GAC (install-gac.cmd) provided with the product, but it doesn't always work (depends on your security settings). I find it's better to use the .NET administration tools which you can find via the control panel - Administrative Tools / Microsoft .NET Configuration / Manage the Assembly Cache / Add an Assembly to the Cache. As far as I'm aware this isn't affected by anything you do with the PATH, with SAXON_HOME, or with cross-assembly references created by the compiler or set in Visual Studio.

    (1-1/1)

    Please register to reply