Azure-Samples / hello-spring-function-azure

Example "Hello, world" Spring Boot application that runs on Azure Functions
MIT License
68 stars 87 forks source link

Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.apply(Object)" because "function" is null #32

Closed decifris closed 3 years ago

decifris commented 3 years ago

I'm getting this error:

Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.apply(Object)" because "function" is null

I didn't modify anything, just ran the code from the repo Console log: https://pastebin.com/W2EbkDV4

Video

jdubois commented 3 years ago

The video is a bit blurry, but from my understanding you're not deploying to Azure, but running the code on your laptop, is this correct? If that's running on your machine, it can be caused by different configuration issues, typically how Azure Functions is installed. How do you run your application, are you using "mvn azure-functions:run"? And are you on a Mac? How did you install Azure Functions, did you use Homebrew?

decifris commented 3 years ago

I use Azure Toolkit for Intellij IDEA; I just run the function from its context menu

function

jdubois commented 3 years ago

Oh I have no idea if that works. Did you try ./mvnw azure-functions:run like in the quickstart?

jdubois commented 3 years ago

I just tested and I have the same issue - I'm not sure this plugin correctly supports Java. Anyway that's a bug in the plugin, I'll contact the team about this.

Closing this as it's a bug in the Intellij plugin, not in this repo.