java - Set javax.xml.transform.TransformerFactory in Wildfly 8.1 -


i need 2 transformerfactory implementations software. must process xml , xls/fo (formatting object) pdfs. newer versions of our software want use user defined xsl functions use net.sf.saxon.transformerfactoryimpl directly referenced in sourcecode. because of old data in database in need process old ones org.apache.xalan.processor.transformerfactoryimpl, saxon thrown error , not render pdf.

when using tomcat set "-djavax.xml.transform.transformerfactory=org.apache.xalan.processor.transformerfactoryimpl" vm argument , no problem.

when using wildfly setting vm argument causes wildfly throw following exception: "exception in thread "main" javax.xml.transform.transformerfactoryconfigurationerror: provider org.apache.xalan.processor.transformerfactoryimpl not found"

a xalan.jar contained in war file. jboss specific version of xalan part of wildlfy distribution.

why none of them found? why wildfly try load factory on startup of wildfly service? how configure wildfly find xalan transformer factory during startup? writing module entry standalone.xml or domain.xml not help.

i aware there bug in wildfly saying redirect of transformer factory not point wildfly transformer factory java default. think should not have influence on problem because try set default.

any help?

i had similar issue jboss 7 , seem same issue wildfly too. wild guess: jboss loads configuration files on startup , saves them on shutdown (not sure why if make modifications standalone.xml while jboss runs see @ shutdown overwritten). guess jboss need use transformer save configuration files (standalone.xml) why loads transformer @ startup (even before modules configuration parsed see there xalan library added classpath , before war file deployed). said guess…i might wrong.

in order rid of startup error either have place xalan library in $java_home/jre/lib/ext (this way make available applications) or stop using system property -djavax.xml.transform.transformerfactory , add next property in standalone.xml file.

 <system-properties>     <property name="javax.xml.transform.transformerfactory" value="org.apache.xalan.xsltc.trax.transformerfactoryimpl"/> </system-properties> 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -