You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have successfully deployed the newest commit in the deploy branch of Knix on my local machine with ansible.
In my deployment, I tried several simple Java functions and found them works fine. However, when I try to execute some Java functions with maven dependency as described in the java tutorials, I found things not that simple.
I created a function named Test with the code and pom.xml mentioned above with the web interface, and use the Test function for testing.
I successfully passed the preparing function phase, found the microfn/sandbox_java container running.
However, when I tried execute the function, I got the following exception in the execution log:
[2023-04-05 13:28:34.675] [INFO] [0l] [Test] [FunctionWorker] Started:Test, user: xxxxxxx, workflow: 833a372ca348a098b47d2562a46e591b, sandbox: 833a372ca348a098b47d2562a46e591b, pid: 151
[2023-04-05 13:29:07.352] [ERROR] [d752c5f1d3b511edaa890242ac110003] [Test] Child exception: com/google/gson/JsonParser
Traceback (most recent call last):
File "/opt/mfn/FunctionWorker/python/FunctionWorker.py", line 460, in _fork_and_handle_message
function_output = self._state_utils.exec_function_catch_retry(self._function_runtime, exec_arguments, self._sapi)
File "/opt/mfn/FunctionWorker/python/StateUtils.py", line 389, in exec_function_catch_retry
ret_value = self._exec_function(runtime, exec_arguments, sapi)
File "/opt/mfn/FunctionWorker/python/StateUtils.py", line 310, in _exec_function
raise Exception(error_type)
Exception: com/google/gson/JsonParser
It seems that the java executor cannot find the classes of the gson package.
The text was updated successfully, but these errors were encountered:
dumplingsMing
changed the title
Error when executing java function with maven dependency
Error when executing java function with maven dependency of Gson
Apr 6, 2023
I have successfully deployed the newest commit in the deploy branch of Knix on my local machine with ansible.
In my deployment, I tried several simple Java functions and found them works fine. However, when I try to execute some Java functions with maven dependency as described in the java tutorials, I found things not that simple.
This is my Java Function's source code:
And this is the associated pom.xml
I created a function named Test with the code and pom.xml mentioned above with the web interface, and use the Test function for testing.
I successfully passed the preparing function phase, found the
microfn/sandbox_java
container running.However, when I tried execute the function, I got the following exception in the execution log:
It seems that the java executor cannot find the classes of the gson package.
The text was updated successfully, but these errors were encountered: