Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarkus-amazon-lambda @Inject doesn't work in JVM mode #9962

Closed
JalajChawla opened this issue Jun 12, 2020 · 2 comments
Closed

quarkus-amazon-lambda @Inject doesn't work in JVM mode #9962

JalajChawla opened this issue Jun 12, 2020 · 2 comments
Labels
area/amazon-lambda kind/question Further information is requested

Comments

@JalajChawla
Copy link

JalajChawla commented Jun 12, 2020

Describe the bug
In Reference to below Bug
(#3354)
I am still getting null pointer exception below is the code which is showing the same ...
https://github.com/JalajChawla/quarkusDemo
Expected behavior
It should run fine

To Reproduce
Steps to reproduce the behavior:

  1. Create Lambda using Java 8 runtime
  2. Specify the handler Name as quarkus.TestLambda::handleRequest and test on the aws console ui

Configuration

# Note it using java 8 runtime.

LOGS
java.lang.NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
at quarkus.TestLambda.handleRequest(TestLambda.java:18)
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)

uname -a
L
inux ubuntu-GL63-8RE 5.4.0-37-generic #41-Ubuntu SMP Wed Jun 3 18:57:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1ubuntu1-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

  • Quarkus version 1.5.0.Final

Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 1.8.0_252, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-37-generic", arch: "amd64", family: "unix"

@JalajChawla JalajChawla added the kind/bug Something isn't working label Jun 12, 2020
@quarkusbot
Copy link

/cc @patriot1burke

@patriot1burke
Copy link
Contributor

The handler must be specified as:
io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler::handleRequest

This Quarkus handler wraps your handler to bootstrap quarkus components and to wrap creation of your actual handler class so that injection will work.

Our docs aren't that great, apologies.

@gsmet gsmet added kind/question Further information is requested and removed kind/bug Something isn't working labels Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/amazon-lambda kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants