not sure where to ask this question. We have problem with Saxon not able to find out license file in our web application
deployed on JBoss7.

We have license file at WEB-INF/classes/saxon-license.lic

When I run:
SchemaFactory factory = new com.saxonica.jaxp.SchemaFactoryImpl();

it fails with error:
2013-04-05 18:06:44,571 ERROR [stderr] (Thread-78) 
License file saxon-license.lic not found. Running in non-schema-aware 

When I use following code snippet to load content of license file it works fine:
InputStream is = CreateFragment.class.getResourceAsStream("/saxon-license.lic");
logger.info("validateFragment is: " + is);
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
String line;
while ((line = reader.readLine()) != null) {
logger.info("validateFragment line: " + line);

The same code (ie. SchemaFactory factory = new com.saxonica.jaxp.SchemaFactoryImpl();) works fine when run in unit test.

Is there any way how to investigate/workaround this? (I found some constructor SchemaFactoryImpl with configuration
parameter but it works only with OEM license.) Currently as workaround I use SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
which uses default JDK schema factory loaded by JBoss wrapper. Yes it works as we do not need specific Saxon functionality
for XML validation but still I would like to be able to use full Saxon version. We use Saxon 9.



Marek Slamasaxon-license.lic