This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Calling javax.xml.transform.TransformerFactory.newInstance() when running inside the embedded tomcat throws the following exception: javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found javax.xml.transform.TransformerFactory.newInstance(Unknown Source) org.apache.jsp.index_jsp._jspService(index_jsp.java:65) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362) That's NOT the default TransformerFactory for my platform. If I create a standard java application project and run it from inside the IDE, I get a com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl instance. I tested it using jython from outside the IDE as well. Running under JDK 1.5.0 btw. Steps to reproduce with NB4.1: - Create a new web project. - Add this to index.jsp: <%= javax.xml.transform.TransformerFactory.newInstance() %> - Run project, observe stack trace. I read up on the TransformerFactory.newInstance() method. I can verify that the "javax.xml.transform.TransformerFactory" system property is not set, there is no lib/jaxp.properties file in the jre directory, and doing a getResource() for "META-INF/services/javax.xml.transform.TransformerFactory" returns null. This is a standard JDK 1.5.0 with standard Netbeans 4.1 installed. I originally encountered the error trying to use DWR (https://dwr.dev.java.net/) in a web project, and this bug is preventing me from doing so. I might plonk a xalan jar into the project's lib directory as a workaround while the bug remains present, as that is all I can think of to continue at this point.
This seems to be caused by the j2se 1.4 compatibility pack. If you do not plan to use bundled tomcat with j2se 1.4 you can remove it as a work-around until we figure out a better way how to fix it. You can do so by removing the following files: $NB_INSTALL_DIR/enterprise1/jakarta-tomcat-5.5.7/bin/jmx.jar $NB_INSTALL_DIR/enterprise1/jakarta-tomcat-5.5.7/common/endorsed/xercesImpl.jar $NB_INSTALL_DIR/enterprise1/jakarta-tomcat-5.5.7/common/endorsed/xml-apis.jar TM -> 4.2.
Yup, removing those files fixed it, thanks for the workaround.
F. Checking in external/build.xml; /cvs/tomcatint/external/build.xml,v <-- build.xml new revision: 1.29; previous revision: 1.28 done Checking in external/jakarta-tomcat-5.5.9.zip; /cvs/tomcatint/external/jakarta-tomcat-5.5.9.zip,v <-- jakarta-tomcat-5.5.9.zip new revision: 1.2; previous revision: 1.1 done Checking in tomcat5/src/org/netbeans/modules/tomcat5/ide/StartTomcat.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/ide/StartTomcat.java,v <-- StartTomcat.java new revision: 1.78; previous revision: 1.77 done RCS file: /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/EditableProperties.java,v done Checking in tomcat5/src/org/netbeans/modules/tomcat5/util/EditableProperties.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/EditableProperties.java,v <-- EditableProperties.java initial revision: 1.1 done Checking in tomcat5/src/org/netbeans/modules/tomcat5/util/Utils.java; /cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/Utils.java,v <-- Utils.java new revision: 1.3; previous revision: 1.2 done
VERIFIED