java.lang.ExceptionInInitializerError in creating AWSCredentials on Ubuntu

View: New views
2 Messages — Rating Filter:   Alert me  

java.lang.ExceptionInInitializerError in creating AWSCredentials on Ubuntu

by Kenji Imasaki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am trying to run simple Jets3t upload example on Utuntu
8.1/java-6-sun-1.6.0.10 like the followings:

public class jetS3tTest {
        @Test
        public void upload() {
                String awsAccessKey = "XXXX";
                String awsSecretKey = "YYYY";
                AWSCredentials awsCredentials =
                        new AWSCredentials(awsAccessKey, awsSecretKey);     << ERRROR here

              ....
       }
}

Then, I got the following error at creating of AWSCredentials. I did
some google search but I found I have to install sunpkcs. So, I
installed sunpkcs11.jar. But it did not fix the problem.

Could you let me know how to fix it?

Thanks.

FAILED: upload
java.lang.ExceptionInInitializerError
        at sun.text.normalizer.NormalizerBase.decompose(NormalizerBase.java:707)
        at sun.text.normalizer.NormalizerBase$NFKDMode.normalize(NormalizerBase.java:348)
        at sun.text.normalizer.NormalizerBase.normalize(NormalizerBase.java:1592)
        at sun.text.normalizer.NormalizerBase.normalize(NormalizerBase.java:1573)
        at java.text.Normalizer.normalize(Normalizer.java:146)
        at sun.security.x509.AVA.toRFC2253CanonicalString(AVA.java:986)
        at sun.security.x509.RDN.toRFC2253StringInternal(RDN.java:430)
        at sun.security.x509.RDN.toRFC2253String(RDN.java:409)
        at sun.security.x509.X500Name.getRFC2253CanonicalName(X500Name.java:714)
        at sun.security.x509.X500Name.equals(X500Name.java:400)
        at sun.security.pkcs.PKCS7.getCertificate(PKCS7.java:609)
        at sun.security.pkcs.SignerInfo.getCertificate(SignerInfo.java:202)
        at sun.security.pkcs.SignerInfo.verify(SignerInfo.java:328)
        at sun.security.pkcs.PKCS7.verify(PKCS7.java:494)
        at sun.security.pkcs.PKCS7.verify(PKCS7.java:511)
        at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:199)
        at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176)
        at java.util.jar.JarVerifier.processEntry(JarVerifier.java:277)
        at java.util.jar.JarVerifier.update(JarVerifier.java:188)
        at java.util.jar.JarFile.initializeVerifier(JarFile.java:321)
        at java.util.jar.JarFile.getInputStream(JarFile.java:386)
        at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:689)
        at sun.misc.Resource.cachedInputStream(Resource.java:59)
        at sun.misc.Resource.getByteBuffer(Resource.java:154)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:249)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Caused by: java.lang.RuntimeException: could not locate data
        at sun.text.normalizer.NormalizerImpl.<clinit>(NormalizerImpl.java:44)
        ... 56 more
... Removed 22 stack frames

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: java.lang.ExceptionInInitializerError in creating AWSCredentials on Ubuntu

by James Murty-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There is a problem in your Java installation.

How are you running this JetS3t code? Are you running it stand-alone, or in an application server like Tomcat? And what was the initial problem that prompted you to install sunpkcs11.jar?

From a quick Google search it looks like you may have downloaded and installed the wrong version of the security libraries. With any new version of Java you should not need to add security libraries.

Look at the replies to this post:
http://www.mail-archive.com/users@.../msg42161.html

For this person, the issue was caused by:
1) Adding the wrong version of JSSE (which caused the Normalizer error)
2) Launching Tomcat from within the Eclispe IDE, which caused the original error for which installing the new JSSE library was the wrong solution.

Hope this helps,
James

---
http://www.jamesmurty.com


On Wed, Mar 18, 2009 at 6:26 AM, Kenji Imasaki <kimasaki@...> wrote:
Hi,

I am trying to run simple Jets3t upload example on Utuntu
8.1/java-6-sun-1.6.0.10 like the followings:

public class jetS3tTest {
       @Test
       public void upload() {
               String awsAccessKey = "XXXX";
               String awsSecretKey = "YYYY";
               AWSCredentials awsCredentials =
                       new AWSCredentials(awsAccessKey, awsSecretKey);     << ERRROR here

             ....
      }
}

Then, I got the following error at creating of AWSCredentials. I did
some google search but I found I have to install sunpkcs. So, I
installed sunpkcs11.jar. But it did not fix the problem.

Could you let me know how to fix it?

Thanks.

FAILED: upload
java.lang.ExceptionInInitializerError
       at sun.text.normalizer.NormalizerBase.decompose(NormalizerBase.java:707)
       at sun.text.normalizer.NormalizerBase$NFKDMode.normalize(NormalizerBase.java:348)
       at sun.text.normalizer.NormalizerBase.normalize(NormalizerBase.java:1592)
       at sun.text.normalizer.NormalizerBase.normalize(NormalizerBase.java:1573)
       at java.text.Normalizer.normalize(Normalizer.java:146)
       at sun.security.x509.AVA.toRFC2253CanonicalString(AVA.java:986)
       at sun.security.x509.RDN.toRFC2253StringInternal(RDN.java:430)
       at sun.security.x509.RDN.toRFC2253String(RDN.java:409)
       at sun.security.x509.X500Name.getRFC2253CanonicalName(X500Name.java:714)
       at sun.security.x509.X500Name.equals(X500Name.java:400)
       at sun.security.pkcs.PKCS7.getCertificate(PKCS7.java:609)
       at sun.security.pkcs.SignerInfo.getCertificate(SignerInfo.java:202)
       at sun.security.pkcs.SignerInfo.verify(SignerInfo.java:328)
       at sun.security.pkcs.PKCS7.verify(PKCS7.java:494)
       at sun.security.pkcs.PKCS7.verify(PKCS7.java:511)
       at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:199)
       at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176)
       at java.util.jar.JarVerifier.processEntry(JarVerifier.java:277)
       at java.util.jar.JarVerifier.update(JarVerifier.java:188)
       at java.util.jar.JarFile.initializeVerifier(JarFile.java:321)
       at java.util.jar.JarFile.getInputStream(JarFile.java:386)
       at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:689)
       at sun.misc.Resource.cachedInputStream(Resource.java:59)
       at sun.misc.Resource.getByteBuffer(Resource.java:154)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:249)
       at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Caused by: java.lang.RuntimeException: could not locate data
       at sun.text.normalizer.NormalizerImpl.<clinit>(NormalizerImpl.java:44)
       ... 56 more
... Removed 22 stack frames

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...