errors running samples...
I'm getting 2 errors starting your functions walkthrough, (well 3, I fixed one by adding the "FUNCTIONS_WORKER_RUNTIME": "java" to local.settings.json). I also get a 404 error calling the http://127.0.0.1:7071/api/hello function, even though it says it's deployed. Am I doing something wrong?
[11/23/18 3:15:35 PM] Starting language worker process:/usr/lib/jvm/java-8-oracle/bin/java -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -noverify -Djava.net.preferIPV4Stack=true -jar "/usr/lib/azure-functions-core-tools/workers/java/azure-functions-java-worker.jar" --host 127.0.0.1 --port 44221 --workerId 29349324-3499-406d-9636-a7895a035879 --requestId a1e09ada-d659-4938-85e7-7c2b802e4b9c --grpcMaxMessageLength 134217728 [11/23/18 3:15:35 PM] /usr/lib/jvm/java-8-oracle/bin/java process with Id=1944 started [11/23/18 3:15:35 PM] Generating 1 job function(s) [11/23/18 3:15:35 PM] Found the following functions: [11/23/18 3:15:35 PM] Host.Functions.hello [11/23/18 3:15:35 PM] [11/23/18 3:15:35 PM] [INFO] {Application.main}: Azure Functions Java Worker version [ 1.2.0-beta01-SNAPSHOT] [11/23/18 3:15:35 PM] Host initialized (278ms) [11/23/18 3:15:35 PM] Host started (288ms) [11/23/18 3:15:35 PM] Job host started [11/23/18 3:15:35 PM] The following 2 functions are in error: [11/23/18 3:15:35 PM] Queue: The binding type(s) 'queueTrigger' are not registered. Please ensure the type is correct and the binding extension is installed. [11/23/18 3:15:35 PM] Timer: The binding type(s) 'queue' are not registered. Please ensure the type is correct and the binding extension is installed. [11/23/18 3:15:35 PM] Hosting environment: Production Content root path: /home/rvanderwerf/github/azure-gradle-plugins/samples/walkthrough/build/azurefunctions/lenaFunctionApp112233445 Now listening on: http://0.0.0.0:7071 Application started. Press Ctrl+C to shut down.
Http Functions:
hello: [POST] http://localhost:7071/api/hello
[11/23/18 3:15:35 PM] [INFO] {MessageHandler.handle}: Message generated by "StartStream.Builder" [11/23/18 3:15:35 PM] Worker initialized [11/23/18 3:15:36 PM] "hello" loaded (ID: d6d457a2-2614-4481-89e0-1470302b728a, Reflection: "/home/rvanderwerf/github/azure-gradle-plugins/samples/walkthrough/build/azurefunctions/lenaFunctionApp112233445/walkthrough-v0.15.jar"::"com.microsoft.azure.functions.Http.hello") [11/23/18 3:15:45 PM] Executing HTTP request: { [11/23/18 3:15:45 PM] "requestId": "619644ec-2025-4e88-8f22-444cb073a70b", [11/23/18 3:15:45 PM] "method": "GET", [11/23/18 3:15:45 PM] "uri": "/api/hello" [11/23/18 3:15:45 PM] }
update.. if I use the syntax from your README.md on the /api/hello call, I get the following exception on the walkthrough: 'curl -X POST -d "Azure World" http://127.0.0.1:7071/api/hello'
System.Private.CoreLib: Exception while executing function: Functions.hello. System.Private.CoreLib: Result: Failure [11/23/18 4:40:45 PM] Exception: ClassCastException: com.microsoft.azure.functions.worker.binding.RpcHttpRequestDataSource cannot be cast to java.lang.String [11/23/18 4:40:45 PM] Stack: java.lang.ClassCastException: com.microsoft.azure.functions.worker.binding.RpcHttpRequestDataSource cannot be cast to java.lang.String [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.binding.DataOperations.convertFromJson(DataOperations.java:149) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.binding.DataOperations.apply(DataOperations.java:108) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.binding.DataSource.computeByType(DataSource.java:61) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.binding.RpcHttpRequestDataSource.computeByType(RpcHttpRequestDataSource.java:20) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.binding.DataSource.computeByName(DataSource.java:47) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.binding.RpcHttpRequestDataSource.computeByName(RpcHttpRequestDataSource.java:20) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.binding.BindingDataStore.getDataByName(BindingDataStore.java:52) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.broker.ParameterResolver.resolve(ParameterResolver.java:59) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.broker.ParameterResolver.resolve(ParameterResolver.java:42) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.broker.JavaMethodExecutor.execute(JavaMethodExecutor.java:52) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.broker.JavaFunctionBroker.invokeMethod(JavaFunctionBroker.java:51) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.handler.InvocationRequestHandler.execute(InvocationRequestHandler.java:33) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.handler.InvocationRequestHandler.execute(InvocationRequestHandler.java:10) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.handler.MessageHandler.handle(MessageHandler.java:45) [11/23/18 4:40:45 PM] at com.microsoft.azure.functions.worker.JavaWorkerClient$StreamingMessagePeer.lambda$onNext$0(JavaWorkerClient.java:91) [11/23/18 4:40:45 PM] at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386) [11/23/18 4:40:45 PM] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [11/23/18 4:40:45 PM] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [11/23/18 4:40:45 PM] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [11/23/18 4:40:45 PM] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [11/23/18 4:40:45 PM] . [11/23/18 4:40:45 PM] Executed HTTP request: { [11/23/18 4:40:45 PM] "requestId": "9bfebe6f-0bf6-4ad4-9e0c-7106bd1e21a2", [11/23/18 4:40:45 PM] "method": "POST", [11/23/18 4:40:45 PM] "uri": "/api/hello", [11/23/18 4:40:45 PM] "identities": [ [11/23/18 4:40:45 PM] { [11/23/18 4:40:45 PM] "type": "WebJobsAuthLevel", [11/23/18 4:40:45 PM] "level": "Admin" [11/23/18 4:40:45 PM] } [11/23/18 4:40:45 PM] ], [11/23/18 4:40:45 PM] "status": 500, [11/23/18 4:40:45 PM] "duration": 449 [11/23/18 4:40:45 PM] }