Closed mitarcon closed 4 years ago
Thanks @mitarcon ! You have the same issue as https://github.com/microsoft/azure-maven-plugins/issues/912 I'm going to reach my colleagues to push this forward.
Indeed, that was the same issue. It's now an issue in the Java Functions project, see https://github.com/Azure/azure-functions-java-worker/issues/338
I'm closing this as it should be solved there, if you want a temporary workaround there is one here: https://github.com/microsoft/azure-maven-plugins/issues/912#issuecomment-561188815
(and otherwise don't use "run" locally - personally I only test in the cloud, I never do "run", that's why I missed this)
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
[12/2/2019 6:56:59 PM] Executing 'Functions.hello' (Reason='This function was programmatically called via the host APIs.', Id=26b096d4-ba06-440b-9e15-2d9d841ebc7f) [12/2/2019 6:56:59 PM] 13:56:59.580 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifests: [jar:file:/C:/Users/mcontreras/AppData/Roaming/npm/node_modules/azure-functions-core-tools/bin/workers/java/azure-functions-java-worker.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/hello-1.0-SNAPSHOT.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/azure-functions-java-library-1.2.2.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jackson-annotations-2.10.0.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jackson-core-2.10.0.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jackson-databind-2.10.0.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jakarta.annotation-api-1.3.5.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jul-to-slf4j-1.7.29.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/log4j-api-2.12.1.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/log4j-to-slf4j-2.12.1.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/logback-classic-1.2.3.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/logback-core-1.2.3.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/reactive-streams-1.0.3.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/reactor-core-3.3.0.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/slf4j-api-1.7.29.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/snakeyaml-1.25.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-aop-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-beans-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-boot-2.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-boot-autoconfigure-2.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-boot-starter-2.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-boot-starter-logging-2.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-cloud-function-adapter-azure-3.0.0.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-cloud-function-context-3.0.0.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-cloud-function-core-3.0.0.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-context-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-core-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-expression-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-jcl-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF, jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-messaging-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF] [12/2/2019 6:56:59 PM] 13:56:59.580 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/Users/mcontreras/AppData/Roaming/npm/node_modules/azure-functions-core-tools/bin/workers/java/azure-functions-java-worker.jar!/META-INF/MANIFEST.MF [12/2/2019 6:56:59 PM] 13:56:59.581 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/hello-1.0-SNAPSHOT.jar!/META-INF/MANIFEST.MF [12/2/2019 6:56:59 PM] 13:56:59.582 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/azure-functions-java-library-1.2.2.jar!/META-INF/MANIFEST.MF [12/2/2019 6:56:59 PM] 13:56:59.584 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jackson-annotations-2.10.0.jar!/META-INF/MANIFEST.MF [12/2/2019 6:56:59 PM] 13:56:59.585 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jackson-core-2.10.0.jar!/META-INF/MANIFEST.MF [12/2/2019 6:56:59 PM] Executed 'Functions.hello' (Failed, Id=26b096d4-ba06-440b-9e15-2d9d841ebc7f) [12/2/2019 6:56:59 PM] System.Private.CoreLib: Exception while executing function: Functions.hello. System.Private.CoreLib: Result: Failure Exception: IllegalArgumentException: Failed to locate main class Stack: java.lang.IllegalStateException: Failed to discover main class. An attempt was made to discover main class as 'MAIN_CLASS' environment variable, system property as well as entry in META-INF/MANIFEST.MF (in that order). [12/2/2019 6:56:59 PM] 13:56:59.586 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jackson-databind-2.10.0.jar!/META-INF/MANIFEST.MF [12/2/2019 6:56:59 PM] at org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer.getStartClass(AbstractSpringFunctionAdapterInitializer.java:288) [12/2/2019 6:56:59 PM] 13:56:59.588 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jakarta.annotation-api-1.3.5.jar!/META-INF/MANIFEST.MF [12/2/2019 6:56:59 PM] at org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer.(AbstractSpringFunctionAdapterInitializer.java:100)
[12/2/2019 6:56:59 PM] 13:56:59.589 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/jul-to-slf4j-1.7.29.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at org.springframework.cloud.function.adapter.azure.AzureSpringBootRequestHandler.(AzureSpringBootRequestHandler.java:44)
[12/2/2019 6:56:59 PM] 13:56:59.590 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/log4j-api-2.12.1.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at com.example.HelloHandler.(HelloHandler.java:15)
[12/2/2019 6:56:59 PM] 13:56:59.590 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/log4j-to-slf4j-2.12.1.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[12/2/2019 6:56:59 PM] 13:56:59.591 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/logback-classic-1.2.3.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[12/2/2019 6:56:59 PM] 13:56:59.591 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/logback-core-1.2.3.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[12/2/2019 6:56:59 PM] 13:56:59.591 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/reactive-streams-1.0.3.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[12/2/2019 6:56:59 PM] 13:56:59.592 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/reactor-core-3.3.0.RELEASE.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at java.lang.Class.newInstance(Class.java:442)
[12/2/2019 6:56:59 PM] 13:56:59.592 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/slf4j-api-1.7.29.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at com.microsoft.azure.functions.worker.broker.JavaMethodExecutor.lambda$execute$1(JavaMethodExecutor.java:54)
[12/2/2019 6:56:59 PM] at com.microsoft.azure.functions.worker.broker.JavaMethodInvokeInfo.invoke(JavaMethodInvokeInfo.java:20)
[12/2/2019 6:56:59 PM] 13:56:59.592 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/snakeyaml-1.25.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at com.microsoft.azure.functions.worker.broker.JavaMethodExecutor.execute(JavaMethodExecutor.java:54)
[12/2/2019 6:56:59 PM] 13:56:59.592 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-aop-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at com.microsoft.azure.functions.worker.broker.JavaFunctionBroker.invokeMethod(JavaFunctionBroker.java:53)
[12/2/2019 6:56:59 PM] 13:56:59.593 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-beans-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at com.microsoft.azure.functions.worker.handler.InvocationRequestHandler.execute(InvocationRequestHandler.java:33)
[12/2/2019 6:56:59 PM] 13:56:59.593 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-boot-2.2.1.RELEASE.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at com.microsoft.azure.functions.worker.handler.InvocationRequestHandler.execute(InvocationRequestHandler.java:10)
[12/2/2019 6:56:59 PM] 13:56:59.593 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-boot-autoconfigure-2.2.1.RELEASE.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at com.microsoft.azure.functions.worker.handler.MessageHandler.handle(MessageHandler.java:45)
[12/2/2019 6:56:59 PM] 13:56:59.594 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-boot-starter-2.2.1.RELEASE.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at com.microsoft.azure.functions.worker.JavaWorkerClient$StreamingMessagePeer.lambda$onNext$0(JavaWorkerClient.java:92)
[12/2/2019 6:56:59 PM] 13:56:59.594 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-boot-starter-logging-2.2.1.RELEASE.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[12/2/2019 6:56:59 PM] 13:56:59.594 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-cloud-function-adapter-azure-3.0.0.RELEASE.[12/2/2019 6:56:59 PM] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[12/2/2019 6:56:59 PM] 13:56:59.595 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching man
ifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-cloud-function-context-3.0.0.RELEASE.jar!/M
ETA-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[12/2/2019 6:56:59 PM] 13:56:59.595 [pool-2-thread-2
] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching manifest: jar:file:/C:/dev/git-repos/hello-spring-funct
ion-azure/target/azure-functions/my-spring-function/lib/spring-cloud-function-core-3.0.0.RELEASE.jar!/META-INF/MANIFEST.MF
[12/2/2019 6:56:59 PM] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [12/2/2019 6:56:59 PM] at java.lang.Thread.run(Thread.java:748) [12/2/2019 6:56:59 PM] Caused by: java.lang.IllegalArgumentException: Failed to locate main class [12/2/2019 6:56:59 PM] 13:56:59.596 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching man ifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-context-5.2.1.RELEASE.jar!/META-INF/MANIFES T.MF [12/2/2019 6:56:59 PM] at org.springframework.util.Assert.notNull(Assert.java:198) [12/2/2019 6:56:59 PM] 13:56:59.596 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching man ifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-core-5.2.1.RELEASE.jar!/META-INF/MANIFEST.M F [12/2/2019 6:56:59 PM] at org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer.getStartClass(AbstractSpringFunctionAdapterInit ializer.java:284) [12/2/2019 6:56:59 PM] 13:56:59.596 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching man ifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-expression-5.2.1.RELEASE.jar!/META-INF/MANI FEST.MF [12/2/2019 6:56:59 PM] ... 21 more [12/2/2019 6:56:59 PM] 13:56:59.597 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching man ifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-jcl-5.2.1.RELEASE.jar!/META-INF/MANIFEST.MF [12/2/2019 6:56:59 PM] . [12/2/2019 6:56:59 PM] 13:56:59.597 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching man ifest: jar:file:/C:/dev/git-repos/hello-spring-function-azure/target/azure-functions/my-spring-function/lib/spring-messaging-5.2.1.RELEASE.jar!/META-INF/MANIF EST.MF [12/2/2019 6:56:59 PM] 13:56:59.598 [pool-2-thread-2] INFO org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer - Searching man ifests: [] [12/2/2019 6:56:59 PM] Executed HTTP request: { [12/2/2019 6:56:59 PM] "requestId": "9ad570ee-ec9e-4ff5-9a9e-9cdef4b2bed5", [12/2/2019 6:56:59 PM] "method": "GET", [12/2/2019 6:56:59 PM] "uri": "/api/hello", [12/2/2019 6:56:59 PM] "identities": [ [12/2/2019 6:56:59 PM] { [12/2/2019 6:56:59 PM] "type": "WebJobsAuthLevel", [12/2/2019 6:56:59 PM] "level": "Admin" [12/2/2019 6:56:59 PM] } [12/2/2019 6:56:59 PM] ], [12/2/2019 6:56:59 PM] "status": 500, [12/2/2019 6:56:59 PM] "duration": 11242 [12/2/2019 6:56:59 PM] }
OS and Version?
Mention any other details that might be useful