Java worker fails to start if dependencies are missing in the class path
Need to handle dependency load errors and report to the user instead of killing java process. Here is an example
Microsoft.Azure.WebJobs.Script.Rpc.LanguageWorkerProcessExitException : D:\Program Files\FunctionsJava\zulu8.30.0.1-jdk8.0.172-win_x64\bin\java exited with code -1
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".,[SEVERE] {Application.main}: Unexpected Exception causes system to exit
D:\Program Files\FunctionsJava\zulu8.30.0.1-jdk8.0.172-win_x64\bin\java exited with code -1
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".,[SEVERE] {Application.main}: Unexpected Exception causes system to exit
Notes from @FinVamp1
https://www.slf4j.org/codes.html#StaticLoggerBinder to avoid this error to begin with.
This warning message is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.
This ended up being resolved by removing the logging section from the customer Host.json.
{ "version": "2.0", "functionTimeout": "00:10:00", "logging": { "photo": "Debug", "default": "Debug" } }
They are also running with an older Library in their Pom.xml
<dependency>
<groupId>com.microsoft.azure.functions</groupId>
<artifactId>azure-functions-java-library</artifactId>
<version>1.0.0-beta-5</version>
</dependency>
Checking if they can reproduce on the latest library.
@amamounelsayed - can you verify if this is fixed? Thanks!
Never see similar issue again, will have this one closed.