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
[BUG] NoClassDefFoundError: io/netty/handler/codec/http/HttpDecoderConfig #40070
Comments
Hi @FranciscoMMMicrosoft, thank you for reporting this. Could you include the dependencies being used in your application as this is likely a dependency conflict resulting in This guide can help work through getting the dependencies being used: https://learn.microsoft.com/azure/developer/java/sdk/troubleshooting-dependency-version-conflict |
Hi @FranciscoMMMicrosoft. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hello! I have passed the suggestions to my customer, and she gave me the feedback that everything is working great now :) |
Closing as resolved given your feedback @FranciscoMMMicrosoft |
Describe the bug
The bug is appearing when trying to use the template for Azure OpenAI AudioTranscriptionSample.java
The problem is that it is showing the following error log: java.lang.NoClassDefFoundError:
Exception or Stack Trace
java.lang.NoClassDefFoundError: io/netty/handler/codec/http/HttpDecoderConfig
at reactor.netty.http.client.HttpClientConfig.configureHttp11Pipeline(HttpClientConfig.java:684)
at reactor.netty.http.client.HttpClientConfig$HttpClientChannelInitializer.onChannelInit(HttpClientConfig.java:956)
at reactor.netty.transport.TransportConfig$TransportChannelInitializer.initChannel(TransportConfig.java:418)
at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:938)
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:181)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:358)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:339)
To Reproduce
Steps to reproduce the behavior: Following the template but without using the configuration function (adding the credentials instead)
Code Snippet
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.ai.openai.usage;
import com.azure.ai.openai.OpenAIClient;
import com.azure.ai.openai.OpenAIClientBuilder;
import com.azure.ai.openai.models.AudioTranscription;
import com.azure.ai.openai.models.AudioTranscriptionFormat;
import com.azure.ai.openai.models.AudioTranscriptionOptions;
import com.azure.core.credential.AzureKeyCredential;
import com.azure.core.util.BinaryData;
import com.azure.core.util.Configuration;
import java.nio.file.Path;
import java.nio.file.Paths;
/**
/
public class AudioTranscriptionSample {
/*
Runs the sample algorithm and demonstrates how to get the images for a given prompt.
@param args Unused. Arguments to the program.
*/
public static void main(String[] args) {
String azureOpenaiKey = Configuration.getGlobalConfiguration().get("AZURE_OPENAI_KEY");
String endpoint = Configuration.getGlobalConfiguration().get("AZURE_OPENAI_ENDPOINT");
String deploymentOrModelId = "{azure-open-ai-deployment-model-id}";
String fileName = "batman.wav";
Path filePath = Paths.get("src/samples/java/com/azure/ai/openai/resources/" + fileName);
OpenAIClient client = new OpenAIClientBuilder()
.endpoint(endpoint)
.credential(new AzureKeyCredential(azureOpenaiKey))
.buildClient();
byte[] file = BinaryData.fromFile(filePath).toBytes();
// To request timestamps for 'segments' and/or 'words', specific the desired response format as
// 'AudioTranscriptionFormat.VERBOSE_JSON' and provide the desired combination of enum flags for the available
// timestamp granularities. If not otherwise specified, 'segments' will be provided. Note that 'words', unlike 'segments',
// will introduce additional processing latency to compute.
AudioTranscriptionOptions transcriptionOptions = new AudioTranscriptionOptions(file)
.setResponseFormat(AudioTranscriptionFormat.JSON);
AudioTranscription transcription = client.getAudioTranscription(deploymentOrModelId, fileName, transcriptionOptions);
System.out.println("Transcription: " + transcription.getText());
}
}
Expected behavior
Expected the code to answer with the Transcription given by whispers model.
Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:java.lang.NoClassDefFoundError: io/netty/handler/codec/http/HttpDecoderConfig
at reactor.netty.http.client.HttpClientConfig.configureHttp11Pipeline(HttpClientConfig.java:684)
at reactor.netty.http.client.HttpClientConfig$HttpClientChannelInitializer.onChannelInit(HttpClientConfig.java:956)
at reactor.netty.transport.TransportConfig$TransportChannelInitializer.initChannel(TransportConfig.java:418)
at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:938)
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:181)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:358)
at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:339)
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: