IllegalArgumentException: Unable to convert url (j

2019-04-02 13:15发布

Built spring boot 2.0.0.RC application with Google Dataflow and other services and deployed with following maven command mvn appengine:deploy. The build goes successful to AppEngine and an instance is created.

The problem is at the App Engine dashboard following error is displayed

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.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.RuntimeException: Failed to construct instance from factory method DataflowRunner#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:52)
at org.apache.beam.sdk.Pipeline.create(Pipeline.java:142)
at com.trackers.exlon.ExlonApplication.main(ExlonApplication.java:69)
... 8 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.apache.beam.sdk.util.InstanceBuilder.buildFromMethod(InstanceBuilder.java:222)
... 12 more
Caused by: java.lang.IllegalArgumentException: Unable to convert url (jar:file:/app.jar!/BOOT-INF/classes!/) to file.
at org.apache.beam.runners.dataflow.DataflowRunner.detectClassPathResourcesToStage(DataflowRunner.java:1375)
at org.apache.beam.runners.dataflow.DataflowRunner.fromOptions(DataflowRunner.java:244)
... 17 more
Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.<init>(File.java:418)
at org.apache.beam.runners.dataflow.DataflowRunner.detectClassPathResourcesToStage(DataflowRunner.java:1371)
... 18 more

This is plugins i use

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <version>${appengine.maven.plugin}</version>
        </plugin>
    </plugins>
</build>

The Problem

It seems the java application cannot be found by dataflow runner DataflowRunner.detectClassPathResourcesToStage. What is wrong with my code or rather how am i required to build this application for it to be found by dataflow runner?

0条回答
登录 后发表回答