Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sealing violation: package org.apache.accumulo.core.client is sealed #57

Closed
pattanib opened this issue Aug 5, 2019 · 3 comments
Closed
Labels

Comments

@pattanib
Copy link

pattanib commented Aug 5, 2019

spark2-submit --class org.apache.accumulo.spark.CopyPlus5K /home/hduser/examples/accumulo-examples/spark/target/accumulo-spark-2.0.0-SNAPSHOT-jar-with-dependencies.jar bulk /opt/accumulo-1.9.2/conf/accumulo-client.properties

It is giving following error

19/08/05 06:59:47 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Exception in thread "main" java.lang.SecurityException: sealing violation: package org.apache.accumulo.core.client is sealed
at java.net.URLClassLoader.getAndVerifyPackage(URLClassLoader.java:400)
at java.net.URLClassLoader.definePackageInternal(URLClassLoader.java:420)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:452)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.accumulo.spark.CopyPlus5K.main(CopyPlus5K.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:849)
at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:167)
at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:195)
at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:924)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:933)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
19/08/05 06:59:47 INFO util.ShutdownHookManager: Shutdown hook called
19/08/05 06:59:47 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-bd60a9c7-31d6-40d8-ad89-a7432e920fbf

@ctubbsii
Copy link
Member

ctubbsii commented Aug 6, 2019

I'm not familiar with spark much, but I am familiar with jar sealing problems. The error indicates that you probably have more than one jar on your class path containing Accumulo resources, and your class loader is trying to load resources from both.

What created target/accumulo-spark-2.0.0-SNAPSHOT-jar-with-dependencies.jar?
From what I can tell, the shaded jar the project builds is named target/accumulo-spark-shaded.jar instead. Are you sure you created it correctly?

The problem could be related to how you built the shaded jar, or it could be with some other Accumulo jar on your class path.

Are you able to investigate further based on this information?

@ctubbsii
Copy link
Member

ctubbsii commented Aug 9, 2019

A similar issue was found and fixed in apache/fluo-examples#10

@pattanib
Copy link
Author

pattanib commented Aug 9, 2019

issue is resolved for me.

I just have done following items.

  • Removed accumulo client jar from $SPARK_HOME/jars directory.
  • Build accumulo-spark-shaded.jar

It works fine for me.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants