Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Patch to fix time unit parsing in Turkish locale

762733Mar 25 2010 — edited May 3 2010
For BDB Java Edition (Oracle: Berkeley DB, Java Edition 4.0.92: January 29, 2010)

In src/com/sleepycat/je/utilint/PropUtil.java in the parseDuration method around line 80:

. . . . StringTokenizer tokens =
. . . . . . new StringTokenizer(property.toUpperCase(), " \t");

when the default locale is Turkish, this fails to parse "75 min" with the following exception.
java.lang.ExceptionInInitializerError
. . at com.sleepycat.je.EnvironmentConfig.setTransactional(EnvironmentConfig.java:2270)
. . at org.prebake.fs.FileHashesTest.setUp(FileHashesTest.java:40)
Caused by: java.lang.IllegalArgumentException: Duration argument has unknown unit name: 75 min
. . at com.sleepycat.je.utilint.PropUtil.parseDuration(PropUtil.java:108)
. . at com.sleepycat.je.config.DurationConfigParam.(DurationConfigParam.java:41)
. . at com.sleepycat.je.config.EnvironmentParams.(EnvironmentParams.java:402)
Possibly, the "i" in "min" is uppercased to a Turkish dotted uppercase I as described at http://www.i18nguy.com/unicode/turkish-i18n.html .

Changing those two lines to
. . . . StringTokenizer tokens =
. . . . . . new StringTokenizer(property.toUpperCase(java.util.Locale.ENGLISH), " \t");
fixes the problem.

This is not a major issue. I run unittests in the Turkish locale to avoid case folding issues that could cause whitelists to be misapplied.

Cheers,
mike

Comments

843798
Which class was not found?
843798
no, and on my machine even Java-1.5 is detecting proxy-settings automatically.
843798
Which class was not found?
The class specified in the code parameter of the Applet tag, which is loaded to start the applet.

Thanks.
843798
no, and on my machine even Java-1.5 is detecting
proxy-settings automatically.
Thanks for the info. I probably should have been more specific in regards to web browser and o/s.

My O/S is Windows2000 Pro (with SPs). The failures occur using IE 6 and the "Automatically detect settings" LAN/Network setting; and with Mozilla Firefox 1.0.3, using the "Auto detect proxy settings for this network" Connections settings. Both these browsers worked with these settings when using the JRE 1.4.2*

Thanks.
796365
Here's the proxy documentation for Java 5:
http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/proxie_config.html
843798
Chuck,

Thanks a lot for the link. However, comparing it with the same from the 1.4.2 docs, I don't see any major differences that would explain why what once worked in the 1.4.2 environment no longer does in the 1.5 JRE (nothing new in 1.5 Deployment that I found). I found nothing in the 5.0 release notes/compatibility info either that would explain this. Maybe JRE 1.5 is just enforcing now what has always been documented?

If you come across any other sources I can investigate, let me know. I'm mainly trying to come up with a fact-based technical story for our hundreds of customers that are going to blame our product Applet for suddenly not working in the JRE 1.5.

Thanks for your help.

Craig
796365
This may not be relevant. It's an excerpt from a Sun chat session.

SDN Chat Sessions
Java Plug-In Technology
SDN Chat Sessions Transcripts Index

April 12, 2005
Guests: Dennis Gu, Calvin Cheung, and Danielle Pham
Moderator: Edward Ort (MDR-EdO)
...

Tom: I have "Automatically detect settings" selected in IE for proxy but I cannot get plug-in to work. Other proxy settings work fine though. Why?

Dennis Gu: Well, because JRE doesn't support it yet. The good news is that we are working on this feature in JRE 6.0.
1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 31 2010
Added on Mar 25 2010
4 comments
3,201 views