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.

Bug 24154 - problem with UTF8 XML files?
Summary: problem with UTF8 XML files?
Status: RESOLVED FIXED
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P1 blocker (vote)
Assignee: nbbuild-issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-28 23:22 UTC by ivan
Modified: 2002-05-31 19:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch (4.03 KB, patch)
2002-05-29 09:06 UTC, Michal Zlamal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2002-05-28 23:22:36 UTC
When I build I get these errors:

beans:
  [genlist] Generating information for Auto
Update...
Bad update_tracking
org.xml.sax.SAXParseException: Invalid encoding
name "UTF8".
        at
org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)
        at

org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
        at
org.netbeans.nbbuild.XMLUtil.parse(XMLUtil.java:58)
        at
org.netbeans.nbbuild.UpdateTracking.read(UpdateTracking.java:92)

This was diagnosed as follows:
> From
nbdev-return-16539-Ivan.Soleimanipour=eng.sun.com@netbeans.org
Fri May 24 03:13:14 2002
> Date: Fri, 24 May 2002 12:12:43 +0200
> From: Libor Kramolis <libor.kramolis@sun.com>
> To: nbdev@netbeans.org
> CC: Michal Zlamal <michal.zlamal@sun.com>
> Subject: Re: [nbdev] What with ANT?
> 
> It looks Xerces is stricter than Crimson and
does not allow Java encodings 
> (UTF8) if it is not explicitly set 
>
("http://apache.org/xml/features/allow-java-encodings").
I did not find who 
> created XML document with UTF8 encoding but
Michal could know more about it.
> 
> So there are two possibilities for
org.netbeans.nbbuild.UpdateTracking 
> maintainers:
>    - avoid creation of XML docs with UTF8
>    - start parser with set allow-java-encodings

Can we please fix this soon?
These errors cause my build sub-targets to not
complete and get
redundantly revisited on every build.

I.e. I _think_ my builds would go faster if this
were fixed.
Comment 1 akemr 2002-05-29 07:45:36 UTC
nbbuild component
Comment 2 Michal Zlamal 2002-05-29 09:00:44 UTC
I found solution - I'll attach proposed patch. It is 
workaround done with using reflection API.
Comment 3 Michal Zlamal 2002-05-29 09:06:35 UTC
Created attachment 5992 [details]
proposed patch
Comment 4 Michal Zlamal 2002-05-29 12:32:12 UTC
I applied suggested patch. 
Please verify.
Comment 5 Jesse Glick 2002-05-29 18:45:28 UTC
AFAIK "UTF8" really *is* an invalid encoding and no XML file should be
using it. They should be using "UTF-8". What file was using this
encoding?! I would recommend the patch be rolled back, the file with
the bogus encoding found, and the encoding declaration fixed to be
compliant to the XML standard.

Also who else gets this error? What is it about Ivan's build? Is there
some non-NetBeans module which includes the incorrect encoding
declaration in some XML file?
Comment 6 ivan 2002-05-29 20:17:19 UTC
Do you guys have enough info? Do I need to provide more details?

And _yes_ I'd very much like to know why I"m suffering from this
and no-one else. In a related matter I also had my ant
problems (the "What with ant" theread) which only seemed to
affect me.
Comment 7 Michal Zlamal 2002-05-30 10:16:29 UTC
I'm sorry Jesse to be unclear, the encoding used in 
UpdateTracking task is UTF-8. I don't know why there is in 
exception encoding name UTF8.
But the problem should be fixed. I tried nearly all 
imaginalbe combinations of ANT and JDK and it was 
working...
I also tried ANT bundled with extra binaries.

Ivan: I think I don't need more informations. Please 
verify if it is fixed.
And as a reply on your question: Nearly nobody are using 
bundled ANT
Comment 8 ivan 2002-05-31 19:57:50 UTC
It works for me.
Thanks.