-
Bug
-
Resolution: Fixed
-
P4
-
6u26
-
b01
-
x86
-
linux
-
Verified
FULL PRODUCT VERSION :
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ uname -a
Linux modolo 2.6.35-30-generic #56-Ubuntu SMP Mon Jul 11 20:01:08 UTC 2011 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ env | grep -i lang
LANG=pt_BR.UTF-8
GDM_LANG=pt_BR
LANGUAGE=pt_BR:en
A DESCRIPTION OF THE PROBLEM :
When I try to list the contents of a keystore in my language (pt_BR) I received a error. If I use -v (verbose) the comple exception was:
erro de keytool: java.lang.IllegalArgumentException: unknown format type at
java.lang.IllegalArgumentException: unknown format type at
at java.text.MessageFormat.makeFormat(MessageFormat.java:1442)
at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
at java.text.MessageFormat.<init>(MessageFormat.java:350)
at sun.security.tools.KeyTool.doPrintEntries(KeyTool.java:1649)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:871)
at sun.security.tools.KeyTool.run(KeyTool.java:172)
at sun.security.tools.KeyTool.main(KeyTool.java:166)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
To reproduce the error, change the LANG to pt_BR and try to list the contents of a keystore with the command:
keytool -v -list
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I am expecting the result:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: tomcat
Creation date: Jul 24, 2011
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=localhost, OU=localhost, O=Localhost, L=Niterói, ST=Rio de Janeiro, C=BR
Issuer: CN=localhost, OU=localhost, O=Localhost, L=Niterói, ST=Rio de Janeiro, C=BR
Serial number: 4e2c3b0d
Valid from: Sun Jul 24 12:32:29 BRT 2011 until: Mon Jul 23 12:32:29 BRT 2012
Certificate fingerprints:
MD5: 96:D6:7D:9B:FB:CC:15:F9:AE:94:48:E9:F5:BD:93:65
SHA1: 29:22:74:B4:96:0C:5E:9D:03:30:8F:20:8D:30:0D:02:5D:FC:03:1B
Signature algorithm name: SHA1withRSA
Version: 3
ACTUAL -
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ keytool -v -list -keystore /etc/.keystore-tomcat
Insira a senha do armazenamento de chaves:
Tipo de armazenamento de chaves: JKS
Fornecedor de armazenamento de chaves: SUN
erro de keytool: java.lang.IllegalArgumentException: unknown format type at
java.lang.IllegalArgumentException: unknown format type at
at java.text.MessageFormat.makeFormat(MessageFormat.java:1442)
at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
at java.text.MessageFormat.<init>(MessageFormat.java:350)
at sun.security.tools.KeyTool.doPrintEntries(KeyTool.java:1649)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:871)
at sun.security.tools.KeyTool.run(KeyTool.java:172)
at sun.security.tools.KeyTool.main(KeyTool.java:166)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ keytool -v -list -keystore /etc/.keystore-tomcat
Insira a senha do armazenamento de chaves:
Tipo de armazenamento de chaves: JKS
Fornecedor de armazenamento de chaves: SUN
erro de keytool: java.lang.IllegalArgumentException: unknown format type at
java.lang.IllegalArgumentException: unknown format type at
at java.text.MessageFormat.makeFormat(MessageFormat.java:1442)
at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
at java.text.MessageFormat.<init>(MessageFormat.java:350)
at sun.security.tools.KeyTool.doPrintEntries(KeyTool.java:1649)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:871)
at sun.security.tools.KeyTool.run(KeyTool.java:172)
at sun.security.tools.KeyTool.main(KeyTool.java:166)
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
To bypass this bug I use to pass the user.language with a value off us like the line bellow:
keytool -v -list -keystore /etc/.keystore-tomcat -J"-Duser.language=en"
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: tomcat
Creation date: Jul 24, 2011
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=localhost, OU=localhost, O=Localhost, L=Niterói, ST=Rio de Janeiro, C=BR
Issuer: CN=localhost, OU=localhost, O=Localhost, L=Niterói, ST=Rio de Janeiro, C=BR
Serial number: 4e2c3b0d
Valid from: Sun Jul 24 12:32:29 BRT 2011 until: Mon Jul 23 12:32:29 BRT 2012
Certificate fingerprints:
MD5: 96:D6:7D:9B:FB:CC:15:F9:AE:94:48:E9:F5:BD:93:65
SHA1: 29:22:74:B4:96:0C:5E:9D:03:30:8F:20:8D:30:0D:02:5D:FC:03:1B
Signature algorithm name: SHA1withRSA
Version: 3
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ uname -a
Linux modolo 2.6.35-30-generic #56-Ubuntu SMP Mon Jul 11 20:01:08 UTC 2011 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ env | grep -i lang
LANG=pt_BR.UTF-8
GDM_LANG=pt_BR
LANGUAGE=pt_BR:en
A DESCRIPTION OF THE PROBLEM :
When I try to list the contents of a keystore in my language (pt_BR) I received a error. If I use -v (verbose) the comple exception was:
erro de keytool: java.lang.IllegalArgumentException: unknown format type at
java.lang.IllegalArgumentException: unknown format type at
at java.text.MessageFormat.makeFormat(MessageFormat.java:1442)
at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
at java.text.MessageFormat.<init>(MessageFormat.java:350)
at sun.security.tools.KeyTool.doPrintEntries(KeyTool.java:1649)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:871)
at sun.security.tools.KeyTool.run(KeyTool.java:172)
at sun.security.tools.KeyTool.main(KeyTool.java:166)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
To reproduce the error, change the LANG to pt_BR and try to list the contents of a keystore with the command:
keytool -v -list
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I am expecting the result:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: tomcat
Creation date: Jul 24, 2011
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=localhost, OU=localhost, O=Localhost, L=Niterói, ST=Rio de Janeiro, C=BR
Issuer: CN=localhost, OU=localhost, O=Localhost, L=Niterói, ST=Rio de Janeiro, C=BR
Serial number: 4e2c3b0d
Valid from: Sun Jul 24 12:32:29 BRT 2011 until: Mon Jul 23 12:32:29 BRT 2012
Certificate fingerprints:
MD5: 96:D6:7D:9B:FB:CC:15:F9:AE:94:48:E9:F5:BD:93:65
SHA1: 29:22:74:B4:96:0C:5E:9D:03:30:8F:20:8D:30:0D:02:5D:FC:03:1B
Signature algorithm name: SHA1withRSA
Version: 3
ACTUAL -
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ keytool -v -list -keystore /etc/.keystore-tomcat
Insira a senha do armazenamento de chaves:
Tipo de armazenamento de chaves: JKS
Fornecedor de armazenamento de chaves: SUN
erro de keytool: java.lang.IllegalArgumentException: unknown format type at
java.lang.IllegalArgumentException: unknown format type at
at java.text.MessageFormat.makeFormat(MessageFormat.java:1442)
at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
at java.text.MessageFormat.<init>(MessageFormat.java:350)
at sun.security.tools.KeyTool.doPrintEntries(KeyTool.java:1649)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:871)
at sun.security.tools.KeyTool.run(KeyTool.java:172)
at sun.security.tools.KeyTool.main(KeyTool.java:166)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
modolo@modolo:~/bin/apache-tomcat-7.0.16/bin$ keytool -v -list -keystore /etc/.keystore-tomcat
Insira a senha do armazenamento de chaves:
Tipo de armazenamento de chaves: JKS
Fornecedor de armazenamento de chaves: SUN
erro de keytool: java.lang.IllegalArgumentException: unknown format type at
java.lang.IllegalArgumentException: unknown format type at
at java.text.MessageFormat.makeFormat(MessageFormat.java:1442)
at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
at java.text.MessageFormat.<init>(MessageFormat.java:350)
at sun.security.tools.KeyTool.doPrintEntries(KeyTool.java:1649)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:871)
at sun.security.tools.KeyTool.run(KeyTool.java:172)
at sun.security.tools.KeyTool.main(KeyTool.java:166)
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
To bypass this bug I use to pass the user.language with a value off us like the line bellow:
keytool -v -list -keystore /etc/.keystore-tomcat -J"-Duser.language=en"
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: tomcat
Creation date: Jul 24, 2011
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=localhost, OU=localhost, O=Localhost, L=Niterói, ST=Rio de Janeiro, C=BR
Issuer: CN=localhost, OU=localhost, O=Localhost, L=Niterói, ST=Rio de Janeiro, C=BR
Serial number: 4e2c3b0d
Valid from: Sun Jul 24 12:32:29 BRT 2011 until: Mon Jul 23 12:32:29 BRT 2012
Certificate fingerprints:
MD5: 96:D6:7D:9B:FB:CC:15:F9:AE:94:48:E9:F5:BD:93:65
SHA1: 29:22:74:B4:96:0C:5E:9D:03:30:8F:20:8D:30:0D:02:5D:FC:03:1B
Signature algorithm name: SHA1withRSA
Version: 3
- relates to
-
JDK-7180308 6u34: keytool throws exception in pt_BR locale
- Closed