hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Sharma <kippy....@gmail.com>
Subject Signed Jars with ADD JAR statement
Date Thu, 05 Mar 2015 19:35:47 GMT
Hi,

I am trying to use a signed jar (BouncyCastle) in one of my UDFs. Since
signed jars shouldn't be extracted I am using two ADD JAR statements to add
both the UDF jar as well as BouncyCastle provider jar to the classpath.

However, hive/hadoop automatically extracts the signed jar (BouncyCastle)
into the distributed cache.

So I get an error like:

Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
	at javax.crypto.Cipher.getInstance(DashoA13*..)
	at javax.crypto.Cipher.getInstance(DashoA13*..)
	at org.bouncycastle.jcajce.NamedJcaJceHelper.createCipher(Unknown Source)
	at org.bouncycastle.openpgp.operator.jcajce.OperatorHelper.createCipher(Unknown
Source)
	at org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder$1.recoverKeyData(Unknown
Source)
	... 26 more
Caused by: java.util.jar.JarException: Cannot parse
file:/hadoop/mapred/taskTracker/anonymous/distcache/1290123759589215370_2104765478_1147426198/sandbox/user/anonymous/.staging/job_201502252132_0001/libjars/bcprov-jdk15on-1.50.jar/
	at javax.crypto.SunJCE_c.a(DashoA13*..)
	at javax.crypto.SunJCE_b.b(DashoA13*..)
	at javax.crypto.SunJCE_b.a(DashoA13*..)
	... 31 more


If I do an 'ls' on the said directory, I see that the jar is extracted:

[root@sandbox bcprov-jdk15on-1.50.jar]# ls -l
total 2680
-rwxr-xr-x 1 mapred hadoop 2732684 Feb 25 22:13 bcprov-jdk15on-1.50.jar
drwxr-xr-x 2 mapred hadoop    4096 Feb 25 22:13 META-INF
drwxr-xr-x 3 mapred hadoop    4096 Feb 25 22:13 org

Is there any other way to add signed jars to classpath so that they can be
used by the UDF without extracting?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message