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.
Summary: | [JDK 1.4] Cannot create a Java App Project if XML modules are disabled - XMLUtil.write fails to find xerces impl | ||
---|---|---|---|
Product: | platform | Reporter: | _ mihmax <mihmax> |
Component: | -- Other -- | Assignee: | Jesse Glick <jglick> |
Status: | CLOSED WONTFIX | ||
Severity: | blocker | CC: | jchalupa, jglick, mkubec |
Priority: | P4 | Keywords: | JDK_SPECIFIC |
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
_ mihmax
2004-11-30 15:56:16 UTC
Working for me in a dev build. Just turned off all XML modules then created a new Java app with no problems. So Jesse, it won't be fixed in 4.0? WORKSFORME means just what it says - could not observe any bug when attempting to reproduce. If you can reproduce the bug (from scratch, with precise instructions) in 4.0 but *not* in 4.1, then it is FIXED/4.1, and as a priority bug is a possible candidate for a backport before the 4.0 release, if there is a well-understood and safe fix. Milan would be nice if you could double-check this as well. Not reproducible for me either. Tested on RC2. Tested on RC2. RC2 needs more modules being shut down, still J2SE projects module doesn't depend on Xerces intergation module, though it should. Reproduce: 1. Start RC2 2. Go to Tools -> Options 3. In Options window open IDE Configuration -> System -> Modules 4. Switch off the following modules - All XML modules (also swithes off some Web modules) - Tomcat 5 Server 5. Try to create new Java Application project Fails Can reproduce with new instructions. To be expected under JDK 1.5+, since Xerces is repackaged under the "com.sun." prefix, and XMLUtilImpl does not deal with that. Under JDK 1.4, Xerces is not included in the JRE, so this serializer cannot be used, but perhaps org.apache.xalan.serialize.SerializerToXML will be usable. Should evaluate whether it is possible to make XMLUtil.write work reliably (incl. namespaces) on JDK 1.4 and 1.5+ w/o the xerces lib module. If it really isn't, then ant/project will need to declare a (runtime only) dep on the xerces module. Note that it would anyway be desirable to have a solution not requiring the xerces module, since many unit tests directly or indirectly call XMLUtil.write and it is a pain to always be adding xerces.jar (and the org.w3c.dom.ranges.* JAR needed to complete it under JDK 1.4!) to the test runtime classpath. Jesse, what are we going to do with this P2 in 4.1? Waive it? Hrebejku, Jesse will not be available for a few weeks. Can you or someone from projects/stavbicka decide what we can do about this in 4.1? Please, comment here or assign to someone who could comment. Diky. Another waiver for 4.1 I think. *** Issue 52857 has been marked as a duplicate of this issue. *** *** Issue 55337 has been marked as a duplicate of this issue. *** Jesse, is there anything we can do here? A candidate for waiver? *** Issue 54549 has been marked as a duplicate of this issue. *** I can and will fix for JDK 1.5+, but not for JDK 1.4. The problem is that there is *no library* included in JDK 1.4 (at least, Sun's version) which is able to correctly serialize a DOM document with namespaces. JAXP does not do it correctly. JAXP might do it correctly in JDK 1.5+, but there at least Xerces is available in the JDK (packaged under a special name) and we can use Xerces' serializer, which seems to be of good quality. (Xalan's serializer, used by JAXP, is not.) So for JDK 1.5+ it will not matter, but for now under JDK 1.4 you cannot disable the Xerces module. The IDE could prevent you from doing so, with some additional mess, but since this is an obsolete platform I do not want to waste time working around it. Fixing for JDK 1.5+ only, leaving open for JDK 1.4. committed Up-To-Date 1.14 openide/src/org/openide/xml/XMLUtilImpl.java *** Issue 58159 has been marked as a duplicate of this issue. *** I filed #6308026 for namespace ser problems in JDK 1.4. I filed #6308037 for the problem creating new projects. That part is fixable on our side, at least, by using JAXP rather than Xerces serialization (in JDK 1.5+ only). Oops, ignore that last comment, wrong issue. No JDK 1.4 workarounds in trunk. v/c |