We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Using Aspose seems to change default locale

Hi all,


We use Aspose inside a web application. At the (currently only) customer where this application runs the JVM’s default locale changes randomly during the day from it’s default setting “Nederland (Nederlands)” (nl_NL) to “English (New Zealand)” (en_NZ). This causes huge problems because all locale-specific code in the application now returns wrong data.

When I say the locale changes I mean that the call Locale.getDefault() suddenly returns something else than the locale we defaulted it to. We set that default with java startup parameters on the command line ( -Duser.language=nl -Duser.country=NL). After startup we can validate that a call to Locale.getDefault() indeed returns the Dutch locale.

From the JDK’s source it’s clear that the only way to change the locale is to call Locale.setDefault(Locale l) from code. Since the locale is a global setting this call will change it for the entire running JVM.

I checked all our source code for a call to this method but we do not use it. I then wrote an ASM class visitor to discover that call in all jars and .class files used in our application. The code found the following matches:

Locale.setDefault() call executed from com/sun/msv/driver/textui/Driver.class, method run
Locale.setDefault() call executed from com/sun/msv/driver/textui/Driver.class, method run
Locale.setDefault() call executed from asposewobfuscated/├лIQ.class, method ëZ9
Locale.setDefault() call executed from asposewobfuscated/├лIQ.class, method ëZ9
Locale.setDefault() call executed from asposewobfuscated/├лIQ.class, method ëZ9
Locale.setDefault() call executed from asposewobfuscated/├лIQ.class, method ëFw
Scanned 53449 classes

I checked the Driver.class and it is something that is part of JAXB and unused. The only other references are inside Aspose.

Can someone check if this call is indeed used by Aspose code? If it is we would need a fix, because using that call should not be allowed from server code…

Thanks for your time,

Frits Jalvingh
Itris B.V.

Hi Frits,


Thanks for your inquiry. I have logged a new task in our issue tracking system as WORDSJAVA-738 for our development team to further look into the details of this problem. Your thread has also been linked to this task and you will be notified as soon as it is worked out. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSJAVA-738) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)