You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kenneth Knowles (Jira)" <ji...@apache.org> on 2021/03/13 03:26:00 UTC
[jira] [Commented] (BEAM-4732) Failed to construct instance from
factory method SparkRunner#fromOptions
[ https://issues.apache.org/jira/browse/BEAM-4732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17300698#comment-17300698 ]
Kenneth Knowles commented on BEAM-4732:
---------------------------------------
This is very likely an issue with how you have built a bundled jar for running on Spark. I think you may want to reach out to one of the channels at https://beam.apache.org/community/contact-us/. You could ask on user@beam.apache.org or the Slack channel or StackOverflow.
> Failed to construct instance from factory method SparkRunner#fromOptions
> -------------------------------------------------------------------------
>
> Key: BEAM-4732
> URL: https://issues.apache.org/jira/browse/BEAM-4732
> Project: Beam
> Issue Type: Bug
> Components: runner-spark
> Affects Versions: 2.5.0
> Environment: Eclipse neon 3 in windows 10, Spark 2.1.0
> Reporter: Piyush Ratan
> Priority: P1
> Labels: patch
> Attachments: Wordcount_lambda.java
>
>
> Unable to run Spark as a runner due to following errors-
> {code:java}
> 3910 [main] INFO org.spark_project.jetty.server.handler.ContextHandler - Started o.s.j.s.ServletContextHandler@18324f97{/metrics/json,null,AVAILABLE,@Spark}
> Exception in thread "main" java.lang.RuntimeException: Failed to construct instance from factory method SparkRunner#fromOptions(interface org.apache.beam.sdk.options.PipelineOptions)
> at org.apache.beam.sdk.util.InstanceBuilder.buildFromMethod(InstanceBuilder.java:233)
> at org.apache.beam.sdk.util.InstanceBuilder.build(InstanceBuilder.java:162)
> at org.apache.beam.sdk.PipelineRunner.fromOptions(PipelineRunner.java:55)
> at org.apache.beam.sdk.Pipeline.create(Pipeline.java:150)
> at com.svayamtech.bean_app.Wordcount_lambda.main(Wordcount_lambda.java:42)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.beam.sdk.util.InstanceBuilder.buildFromMethod(InstanceBuilder.java:222)
> ... 4 more
> Caused by: java.lang.NoClassDefFoundError: org/apache/beam/runners/core/construction/PipelineResources
> at org.apache.beam.runners.spark.SparkRunner.fromOptions(SparkRunner.java:129)
> ... 9 more
> Caused by: java.lang.ClassNotFoundException: org.apache.beam.runners.core.construction.PipelineResources
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> ... 10 more
> 4022 [Thread-1] INFO org.apache.spark.SparkContext - Invoking stop() from shutdown hook{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)