azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

WARNING {JavaFunctionBroker.addJavaAnnotationLibrary}: Customer is not providing java annotation files, they may not use the latest version of java library and maven plugin.

Open cicorias opened this issue 3 years ago • 1 comments

this error pops during startup of a basic Java project that is reading an Reading an Event Hub

func tools mvn version

        <java.version>11</java.version>
        <azure.functions.maven.plugin.version>1.19.0</azure.functions.maven.plugin.version>
        <azure.functions.java.library.version>2.0.1</azure.functions.java.library.version>
image

Full repro here: https://github.com/cicorias/azfunct-java-eventhubs

Using "func core tools version: 4.0.4704

java version

openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment Microsoft-25199 (build 11.0.12+7)
OpenJDK 64-Bit Server VM Microsoft-25199 (build 11.0.12+7, mixed mode)

maven version

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: C:\g\bin\apache-maven-3.8.1-bin\apache-maven-3.8.1\bin\..
Java version: 11.0.13, vendor: Microsoft, runtime: C:\Program Files\Microsoft\jdk-11.0.13.8-hotspot
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Log file

For detailed output, run func with --verbose flag.
[2022-08-17T18:25:11.335Z] Host lock lease acquired by instance ID '00000000000000000000000040E3700A'.
[2022-08-17T18:25:11.525Z] Worker process started and initialized.
[2022-08-17T18:25:11.552Z] [WARNING] {JavaFunctionBroker.addJavaAnnotationLibrary}: Customer is not providing java annotation files, they may not use the latest version of java library and maven plugin.
[2022-08-17T18:25:11.555Z] [WARNING] {JavaFunctionBroker.addJavaAnnotationLibrary}: Customer is not providing java annotation files, they may not use the latest version of java library and maven plugin.
[2022-08-17T18:26:39.147Z] Executing 'Functions.EventHubReceiver' (Reason='(null)', Id=4c3e8a26-decc-40cc-9276-96a2b4c48d33)
[2022-08-17T18:26:39.151Z] Trigger Details: PartionId: 1, Offset: 0-0, EnqueueTimeUtc: 2022-08-17T18:26:38.4320000+00:00-2022-08-17T18:26:38.4320000+00:00, SequenceNumber: 0-0, Count: 1
[2022-08-17T18:26:58.351Z] got a message
[2022-08-17T18:27:00.733Z] Function "EventHubReceiver" (Id: 4c3e8a26-decc-40cc-9276-96a2b4c48d33) invoked by Java Worker
[2022-08-17T18:27:00.789Z] Executed 'Functions.EventHubReceiver' (Succeeded, Id=4c3e8a26-decc-40cc-9276-96a2b4c48d33, Duration=21677ms)
[2022-08-17T18:27:04.975Z] Executing 'Functions.EventHubReceiver' (Reason='(null)', Id=60e7b992-39d4-4d58-ac0f-e112df299dbe)
[2022-08-17T18:27:04.981Z] Trigger Details: PartionId: 0, Offset: 0-0, EnqueueTimeUtc: 2022-08-17T18:27:04.3240000+00:00-2022-08-17T18:27:04.3240000+00:00, SequenceNumber: 0-0, Count: 1
[2022-08-17T18:27:09.151Z] got a message
[2022-08-17T18:27:09.157Z] Function "EventHubReceiver" (Id: 60e7b992-39d4-4d58-ac0f-e112df299dbe) invoked by Java Worker
[2022-08-17T18:27:09.160Z] Executed 'Functions.EventHubReceiver' (Succeeded, Id=60e7b992-39d4-4d58-ac0f-e112df299dbe, Duration=4186ms)
[2022-08-17T18:27:23.598Z] Listening for transport dt_socket at address: 5005

cicorias avatar Aug 17 '22 18:08 cicorias

I am running into the same thing. I was transferring my test environment to a new machine. The only difference I can find is the version of Azure Tools: Normal system: Core Tools Version: 3.0.3904 Commit hash: c345f7140a8f968c5dbc621f8a8374d8e3234206 (64-bit) Function Runtime Version: 3.3.1.0

Warning system: Core Tools Version: 3.0.4727 Commit hash: N/A (64-bit) Function Runtime Version: 3.11.0.0

I am running Java 1.8 in both systems: Normal system: openjdk version "1.8.0_302" OpenJDK Runtime Environment (Temurin)(build 1.8.0_302-b08) OpenJDK 64-Bit Server VM (Temurin)(build 25.302-b08, mixed mode)

Warning system: openjdk version "1.8.0_222" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)

I am also getting an Exception in the system giving me the warning: Exception: NoSuchMethodError: io.netty.handler.logging.LoggingHandler.(Ljava/lang/String;Lio/netty/handler/logging/LogLevel;Lio/netty/handler/logging/ByteBufFormat;)V

The netty related versions in each final POM's Dependency Hierarchy are the same, so I am not sure if that is related to the warning at the beginning or not.

ZathrasOne avatar Aug 24 '22 20:08 ZathrasOne