[
https://issues.apache.org/jira/browse/BEAM-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eugene Kirpichov closed BEAM-2883.
----------------------------------
Resolution: Fixed
Fix Version/s: Not applicable
Fixed a long time ago.
> Poor error message when forgetting to specify a Datastore project.
> ------------------------------------------------------------------
>
> Key: BEAM-2883
> URL: https://issues.apache.org/jira/browse/BEAM-2883
> Project: Beam
> Issue Type: Bug
> Components: io-java-gcp
> Reporter: Scott Wegner
> Assignee: Eugene Kirpichov
> Priority: Minor
> Fix For: Not applicable
>
>
> From:
> https://stackoverflow.com/questions/46155781/mojoexecutionexception-while-writing-to-bigquery
> A Beam user using DatastoreIO.v1() encountered an error because their
> pipeline didn't specify a Datastore project via
> DatastoreIO.v1().read().withProject(..). But the error was not very
> informative. Even when referencing the source code, it is difficult to trace
> through the code due to use of AutoValue and ValueProvider.
> The error was:
> [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java
> (default-cli) on project pubsub-bigquery: An exception occured while
> executing the Java class. null: InvocationTargetException: projectId -> [Help
> 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default-cli) on project
> pubsub-bigquery: An exception occured while executing the Java class. null
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
> 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoExecutionException: An exception
> occured while executing the Java class. null
> at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:345)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
> ... 20 more
> Caused by: java.lang.reflect.InvocationTargetException
> 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.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NullPointerException: projectId
> at
> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787)
> at
> org.apache.beam.sdk.io.gcp.datastore.DatastoreV1$Read.validate(DatastoreV1.java:624)
> at
> org.apache.beam.sdk.Pipeline$ValidateVisitor.enterCompositeTransform(Pipeline.java:610)
> at
> org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:590)
> at
> org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:594)
> at
> org.apache.beam.sdk.runners.TransformHierarchy$Node.access$500(TransformHierarchy.java:276)
> at
> org.apache.beam.sdk.runners.TransformHierarchy.visit(TransformHierarchy.java:210)
> at org.apache.beam.sdk.Pipeline.traverseTopologically(Pipeline.java:440)
> at org.apache.beam.sdk.Pipeline.validate(Pipeline.java:552)
> at org.apache.beam.sdk.Pipeline.run(Pipeline.java:296)
> at org.apache.beam.sdk.Pipeline.run(Pipeline.java:283)
> at org.druk.twc.tobq.DsToBQ.main(DsToBQ.java:126)
> ... 6 more
> [ERROR]
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)