{"action":"created","issue":{"url":"https://api.github.com/repos/aliyun/aliyun-emapreduce-sdk/issues/156","repository_url":"https://api.github.com/repos/aliyun/aliyun-emapreduce-sdk","labels_url":"https://api.github.com/repos/aliyun/aliyun-emapreduce-sdk/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/aliyun/aliyun-emapreduce-sdk/issues/156/comments","events_url":"https://api.github.com/repos/aliyun/aliyun-emapreduce-sdk/issues/156/events","html_url":"https://github.com/aliyun/aliyun-emapreduce-sdk/issues/156","id":182974760,"number":156,"title":"找不到类","user":{"login":"mahuichao","id":12440741,"avatar_url":"https://avatars.githubusercontent.com/u/12440741?v=3","gravatar_id":"","url":"https://api.github.com/users/mahuichao","html_url":"https://github.com/mahuichao","followers_url":"https://api.github.com/users/mahuichao/followers","following_url":"https://api.github.com/users/mahuichao/following{/other_user}","gists_url":"https://api.github.com/users/mahuichao/gists{/gist_id}","starred_url":"https://api.github.com/users/mahuichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahuichao/subscriptions","organizations_url":"https://api.github.com/users/mahuichao/orgs","repos_url":"https://api.github.com/users/mahuichao/repos","events_url":"https://api.github.com/users/mahuichao/events{/privacy}","received_events_url":"https://api.github.com/users/mahuichao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-14T06:40:59Z","updated_at":"2016-10-24T09:00:37Z","closed_at":null,"body":"按照官方的方式打包后，我把core下面的/emr-core-1.3.0-SNAPSHOT.jar文件和sdk下面的/emr-sdk_2.10-1.3.0-SNAPSHOT.jar 引入了spark-shell,然后出现错误，错误如下：\r\n\r\n> java.lang.NoClassDefFoundError: com/aliyun/oss/OSSException\r\n\tat com.aliyun.fs.oss.nat.JetOssNativeFileSystemStore.initialize(JetOssNativeFileSystemStore.java:152)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:187)\r\n\tat org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)\r\n\tat com.sun.proxy.$Proxy30.initialize(Unknown Source)\r\n\tat com.aliyun.fs.oss.nat.NativeOssFileSystem.initialize(NativeOssFileSystem.java:135)\r\n\tat org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2596)\r\n\tat org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:91)\r\n\tat org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2630)\r\n\tat org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2612)\r\n\tat org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370)\r\n\tat org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)\r\n\tat org.apache.hadoop.mapred.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:256)\r\n\tat org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:228)\r\n\tat org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:313)\r\n\tat org.apache.spark.rdd.HadoopRDD.getPartitions(HadoopRDD.scala:199)\r\n\tat org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:239)\r\n\tat org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:237)\r\n\tat scala.Option.getOrElse(Option.scala:120)\r\n\tat org.apache.spark.rdd.RDD.partitions(RDD.scala:237)\r\n\tat org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)\r\n\tat org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:239)\r\n\tat org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:237)\r\n\tat scala.Option.getOrElse(Option.scala:120)\r\n\tat org.apache.spark.rdd.RDD.partitions(RDD.scala:237)\r\n\tat org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)\r\n\tat org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:239)\r\n\tat org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:237)\r\n\tat scala.Option.getOrElse(Option.scala:120)\r\n\tat org.apache.spark.rdd.RDD.partitions(RDD.scala:237)\r\n\tat org.apache.spark.rdd.RDD$$anonfun$takeOrdered$1.apply(RDD.scala:1380)\r\n\tat org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)\r\n\tat org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:111)\r\n\tat org.apache.spark.rdd.RDD.withScope(RDD.scala:316)\r\n\tat org.apache.spark.rdd.RDD.takeOrdered(RDD.scala:1370)\r\n\tat org.apache.spark.rdd.RDD$$anonfun$top$1.apply(RDD.scala:1351)\r\n\tat org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)\r\n\tat org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:111)\r\n\tat org.apache.spark.rdd.RDD.withScope(RDD.scala:316)\r\n\tat org.apache.spark.rdd.RDD.top(RDD.scala:1350)\r\n\tat $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:30)\r\n\tat $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:35)\r\n\tat $iwC$$iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:37)\r\n\tat $iwC$$iwC$$iwC$$iwC$$iwC.<init>(<console>:39)\r\n\tat $iwC$$iwC$$iwC$$iwC.<init>(<console>:41)\r\n\tat $iwC$$iwC$$iwC.<init>(<console>:43)\r\n\tat $iwC$$iwC.<init>(<console>:45)\r\n\tat $iwC.<init>(<console>:47)\r\n\tat <init>(<console>:49)\r\n\tat .<init>(<console>:53)\r\n\tat .<clinit>(<console>)\r\n\tat .<init>(<console>:7)\r\n\tat .<clinit>(<console>)\r\n\tat $print(<console>)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat org.apache.spark.repl.SparkIMain$ReadEvalPrint.call(SparkIMain.scala:1065)\r\n\tat org.apache.spark.repl.SparkIMain$Request.loadAndRun(SparkIMain.scala:1346)\r\n\tat org.apache.spark.repl.SparkIMain.loadAndRunReq$1(SparkIMain.scala:840)\r\n\tat org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:871)\r\n\tat org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:819)\r\n\tat org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:857)\r\n\tat org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.scala:902)\r\n\tat org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:814)\r\n\tat org.apache.spark.repl.SparkILoop.processLine$1(SparkILoop.scala:657)\r\n\tat org.apache.spark.repl.SparkILoop.innerLoop$1(SparkILoop.scala:665)\r\n\tat org.apache.spark.repl.SparkILoop.org$apache$spark$repl$SparkILoop$$loop(SparkILoop.scala:670)\r\n\tat org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$SparkILoop$$process$1.apply$mcZ$sp(SparkILoop.scala:997)\r\n\tat org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$SparkILoop$$process$1.apply(SparkILoop.scala:945)\r\n\tat org.apache.spark.repl.SparkILoop$$anonfun$org$apache$spark$repl$SparkILoop$$process$1.apply(SparkILoop.scala:945)\r\n\tat scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)\r\n\tat org.apache.spark.repl.SparkILoop.org$apache$spark$repl$SparkILoop$$process(SparkILoop.scala:945)\r\n\tat org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:1059)\r\n\tat org.apache.spark.repl.Main$.main(Main.scala:31)\r\n\tat org.apache.spark.repl.Main.main(Main.scala)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)\r\n\tat org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)\r\n\tat org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)\r\n\tat org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)\r\n\tat org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)\r\nCaused by: java.lang.ClassNotFoundException: com.aliyun.oss.OSSException\r\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:366)\r\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:355)\r\n\tat java.security.AccessController.doPrivileged(Native Method)\r\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:354)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:425)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:358)\r\n\t... 89 more\r\n\r\n请问我需要修改什么吗，pom中我看只有spark和hadoop的写着provided了，其余的按道理都应该一起被打包才对呀，为什么还找不到类呢 求指点\r\n"},"comment":{"url":"https://api.github.com/repos/aliyun/aliyun-emapreduce-sdk/issues/comments/255685467","html_url":"https://github.com/aliyun/aliyun-emapreduce-sdk/issues/156#issuecomment-255685467","issue_url":"https://api.github.com/repos/aliyun/aliyun-emapreduce-sdk/issues/156","id":255685467,"user":{"login":"mahuichao","id":12440741,"avatar_url":"https://avatars.githubusercontent.com/u/12440741?v=3","gravatar_id":"","url":"https://api.github.com/users/mahuichao","html_url":"https://github.com/mahuichao","followers_url":"https://api.github.com/users/mahuichao/followers","following_url":"https://api.github.com/users/mahuichao/following{/other_user}","gists_url":"https://api.github.com/users/mahuichao/gists{/gist_id}","starred_url":"https://api.github.com/users/mahuichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahuichao/subscriptions","organizations_url":"https://api.github.com/users/mahuichao/orgs","repos_url":"https://api.github.com/users/mahuichao/repos","events_url":"https://api.github.com/users/mahuichao/events{/privacy}","received_events_url":"https://api.github.com/users/mahuichao/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T09:00:37Z","updated_at":"2016-10-24T09:00:37Z","body":"@uncleGen  没问题了 我发现并不是包的问题 oss sdk 我之前加入了  还是报错  是因为使用spark-shell时引入第三方的包 使用--driver-class-path 参数 十分感谢"}}
{"actor":{"display_login":"mahuichao"}}