Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4662527
Votes 11
Synopsis org.apache.xalan.xslt.Process doesn't work in Japanese environment
Category jaxp:other
Reported Against 1.4
Release Fixed 1.5(tiger)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 03-APR-2002
Description


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

FULL OPERATING SYSTEM VERSION :
Windows XP Home Edition

A DESCRIPTION OF THE PROBLEM :
If you try to use org. customer .xalan.xslt.Process to
transform a XML file into a HMTL under the Japanese
version of Windows XP Home edition, it fails with the
following message:

Exception in thread "main" java.lang.ClassCastException:
org. customer .xalan.res.XSLTErrorResources_ja
        at org. customer .xalan.xslt.Process.main
Process.java:209)

In the source code of Process.java, loading a error
message resource is coded as following:

XSLTErrorResources resbundle =
      (XSLTErrorResources) (XSLMessages.loadResourceBundle(
        
org. customer .xml.utils.res.XResourceBundle.ERROR_RESOURCES));

In an English environment, an instance of
XSLTErrorResources class is loaded, but in the Japanese
environment, an instance of XSLTErrorResources_ja class is
loaded. The failure reason is that XSLTErrorResources_ja
class doesn't extend XSLTErrorResources class. So the
above lines should be fixed as following

    XResourceBundleBase resbundle =
      (XResourceBundleBase) (XSLMessages.loadResourceBundle
(
        
org. customer .xml.utils.res.XResourceBundle.ERROR_RESOURCES));

This bug can be reproduced always.
(Review ID: 144548) 
======================================================================
Work Around
N/A
Evaluation
In jdk-1.4.1 b20, XSLTErrorResources_ja extends from XSLTErrorResource so  it should not the throw the ClassCastException anymore. We are looking into the various issues related to internationalization in xalan, we will futher  look into it if problem still exist. 

This bug has been fixed in jaxp-1_3_0 branch of Xalan at Apache.


  xxxxx@xxxxx   2003-09-11
Comments
  
  Include a link with my name & email   

Submitted On 14-APR-2002
buessow
The same error appears in a German environment (on RedHat
Linux). A workaround is setting the locale to English:
LC_ALL=en_US


Submitted On 06-MAY-2002
garyp2
Rather than changing the Xalan-supplied code in 
Process.java, perhaps Sun should change its 
XSLTErrorResources_xx classes to extend XSLTErrorResources 
rather than XResourceBundleBase.


Submitted On 06-MAY-2002
garyp2
In connection with my previous post, please see 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4649


Submitted On 09-JUL-2002
choikkor
The same error appears in a JDK 1.4.0 under Korean WinXP. 
But there is no error in a JDK 1.3.4 or below under Korean 
WinXP 


Submitted On 01-AUG-2002
bernddorn
Another solution which also works on win32, is to change the
language with the command line argument like this:
-Duser.language=en



PLEASE NOTE: JDK6 is formerly known as Project Mustang