Story
I introduced a new feature in my framework which allows to generate all configuration files using
native-graalvm-agent. It works quite nice and I removed the majority of errors, but still I cannot
find a way to remove error provided below.
GraalVM version used:
graalvm-ce:19.0.2
Error message:
Exception in thread "main" javax.xml.stream.FactoryConfigurationError: Provider com.sun.xml.internal.stream.XMLInputFactoryImpl not found
at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:201)
at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:152)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:329)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:227)
at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:154)
at com.amazonaws.util.XmlUtils.createXmlInputFactory(XmlUtils.java:63)
at com.amazonaws.util.XmlUtils.access$000(XmlUtils.java:27)
at com.amazonaws.util.XmlUtils$1.initialValue(XmlUtils.java:36)
at com.amazonaws.util.XmlUtils$1.initialValue(XmlUtils.java:33)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
at java.lang.ThreadLocal.get(ThreadLocal.java:170)
at com.amazonaws.util.XmlUtils.getXmlInputFactory(XmlUtils.java:54)
at com.amazonaws.http.StaxResponseHandler.handle(StaxResponseHandler.java:94)
at com.amazonaws.http.StaxResponseHandler.handle(StaxResponseHandler.java:42)
at com.amazonaws.http.response.AwsResponseHandlerAdapter.handle(AwsResponseHandlerAdapter.java:70)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleResponse(AmazonHttpClient.java:1627)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1336)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1113)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:770)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:744)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:726)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:686)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:668)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:532)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:512)
at com.amazonaws.services.sqs.AmazonSQSClient.doInvoke(AmazonSQSClient.java:2235)
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2202)
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2191)
at com.amazonaws.services.sqs.AmazonSQSClient.executeSendMessage(AmazonSQSClient.java:1758)
at com.amazonaws.services.sqs.AmazonSQSClient.sendMessage(AmazonSQSClient.java:1730)
at sqs_example.core$LOCAL_NEVER_CALL_DIRECTLY_ReceiveStringLambda__handleRequest$fn__177.invoke(core.clj:13)
at sqs_example.core$LOCAL_NEVER_CALL_DIRECTLY_ReceiveStringLambda__handleRequest.invokeStatic(core.clj:9)
at sqs_example.core$LOCAL_NEVER_CALL_DIRECTLY_ReceiveStringLambda__handleRequest.invoke(core.clj:9)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.core$apply.invoke(core.clj:660)
at fierycod.holy_lambda.impl.util$call.invokeStatic(util.clj:54)
at fierycod.holy_lambda.impl.util$call.doInvoke(util.clj:45)
at clojure.lang.RestFn.invoke(RestFn.java:439)
at clojure.core$partial$fn__5839.invoke(core.clj:2625)
at fierycod.holy_lambda.core$process_event.invokeStatic(core.clj:222)
at fierycod.holy_lambda.core$process_event.invoke(core.clj:217)
at fierycod.holy_lambda.core$next_iter.invokeStatic(core.clj:238)
at fierycod.holy_lambda.core$next_iter.invoke(core.clj:226)
at clojure.lang.Var.invoke(Var.java:388)
at sqs_example.core$_main.invokeStatic(core.clj:26)
at sqs_example.core$_main.invoke(core.clj:26)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at sqs_example.core.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.stream.XMLInputFactoryImpl
at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:51)
at java.lang.Class.forName(DynamicHub.java:1143)
at javax.xml.stream.FactoryFinder.getProviderClass(FactoryFinder.java:125)
at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:189)
... 51 more
How to reproduce? (you will need: aws-cli, aws-sam, leiningen)
- Clone the repository and checkout
git clone git@github.com:FieryCod/holy-lambda.git && git checkout bug/javax-xml-stream && cd holy-lambda
- Build the graalvm image and install fnative util:
make build-docker install-fnative
- Go to
sqs-example and run
cd examples/sqs-example && make install-holy-lambda compile native-compile native-sqs-invoke
I think that the error might be connected with the warnings I receive from native-graalvm-agent:
WARNING: Error processing trace entry: java.lang.NullPointerException: {caller_class=com.fasterxml.jackson.databind.util.ClassUtil, result=null, args=[], function=getEnclosingMethod, tracer=reflect}
WARNING: Error processing trace entry: java.lang.NullPointerException: {caller_class=com.fasterxml.jackson.databind.util.ClassUtil, result=null, args=[], function=getEnclosingMethod, tracer=reflect}
WARNING: Error processing trace entry: java.lang.NullPointerException: {caller_class=com.fasterxml.jackson.databind.util.ClassUtil, result=null, args=[], function=getEnclosingMethod, tracer=reflect}
WARNING: Error processing trace entry: java.lang.NullPointerException: {caller_class=com.fasterxml.jackson.databind.util.ClassUtil, result=null, args=[], function=getEnclosingMethod, tracer=reflect}
WARNING: Error processing trace entry: java.lang.NullPointerException: {caller_class=com.fasterxml.jackson.databind.util.ClassUtil, result=null, args=[], function=getEnclosingMethod, tracer=reflect}
WARNING: Error processing trace entry: java.lang.NullPointerException: {caller_class=com.fasterxml.jackson.databind.util.ClassUtil, result=null, args=[], function=getEnclosingMethod, tracer=reflect}
Steps to reproduce the warnings:
- Go to
sqs-example
- Create a new SQS using Amazon UI
- On line 12 at
src/sqs_example/core.clj put your url to sqs
- Create
resources/envs.list file and populate the configuration
AWS_ACCESS_KEY=PUT_YOUR_ACCESS_KEY_HERE
AWS_SECRET_KEY=PUT_YOUR_SECRET_KEY_HERE
- Compile and run
make install-holy-lambda compile gen-native-configuration
Story
I introduced a new feature in my framework which allows to generate all configuration files using
native-graalvm-agent. It works quite nice and I removed the majority of errors, but still I cannotfind a way to remove error provided below.
GraalVM version used:
graalvm-ce:19.0.2
Error message:
How to reproduce? (you will need: aws-cli, aws-sam, leiningen)
sqs-exampleand runI think that the error might be connected with the warnings I receive from
native-graalvm-agent:Steps to reproduce the warnings:
sqs-examplesrc/sqs_example/core.cljput your url to sqsresources/envs.listfile and populate the configuration