openfaas / templates

OpenFaaS Classic templates
https://www.openfaas.com
MIT License
278 stars 227 forks source link

Currently only Build and Deploy and Create Function on Docker works with Handler extends AbstractHandler #280

Closed hosseinmanafi closed 2 years ago

hosseinmanafi commented 2 years ago

Currently only deploy works with "Handler extends AbstractHandler". When I build and deploy with "Handler implements IHandler ", it gives an error when creating Docker.

Exception in thread "main" java.util.ServiceConfigurationError: com.openfaas.model.AbstractHandler: com.openfaas.function.Handler not a subtype

Also when I use "Handler extends AbstractHandler". If in the program, for example, I have used "com.fasterxml.jackson.core" in Gradle. implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.1'

Gives the following error on Runtime Service :

java.lang.NoClassDefFoundError: com / fasterxml / jackson / databind / ObjectMapper

alexellis commented 2 years ago

Hi @hosseinmanafi please edit this issue and fill out the whole template. We will need a GitHub repo or sample so we can try to reproduce it for you.

If we don't hear from you in the next 7 days we'll close this issue and assume you're no longer interested.

Generally, the Java and Gradle template are working as expected, so I'm unaware of any issues. I could be wrong, but this is likely a support issue with the way you're using the template.

The code sample will confirm whether that's the case.

Alex

welteki commented 2 years ago

I will close this since we have not heard back from you.

Feel free to open a new issue if this is still of interest to you.

welteki commented 2 years ago

/close