Skip to content
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

make bytebuddy available at runtime as well #685

Merged
merged 1 commit into from
Sep 22, 2023
Merged

Conversation

vthacker
Copy link
Contributor

@vthacker vthacker commented Sep 22, 2023

Summary

Should have caught this locally but with the java 21 change we made bytebuddy scope to test only. That means it wasn't available at runtime leading to us failing with the following error on startup

Exception in thread "main" java.lang.NoClassDefFoundError: net/bytebuddy/description/type/TypeDefinition
	at org.curioswitch.common.protobuf.json.MessageMarshaller$Builder.build(MessageMarshaller.java:437)
	at com.linecorp.armeria.server.grpc.UnframedGrpcErrorHandlers.<clinit>(UnframedGrpcErrorHandlers.java:85)
	at com.linecorp.armeria.server.grpc.UnframedGrpcErrorHandler.ofJson(UnframedGrpcErrorHandler.java:57)
	at com.linecorp.armeria.server.grpc.HttpJsonTranscodingOptionsBuilder.<init>(HttpJsonTranscodingOptionsBuilder.java:44)
	at com.linecorp.armeria.server.grpc.HttpJsonTranscodingOptions.builder(HttpJsonTranscodingOptions.java:35)
	at com.linecorp.armeria.server.grpc.DefaultHttpJsonTranscodingOptions.<clinit>(DefaultHttpJsonTranscodingOptions.java:26)
	at com.linecorp.armeria.server.grpc.HttpJsonTranscodingOptions.of(HttpJsonTranscodingOptions.java:42)
	at com.linecorp.armeria.server.grpc.GrpcServiceBuilder.<init>(GrpcServiceBuilder.java:133)
	at com.linecorp.armeria.server.grpc.GrpcService.builder(GrpcService.java:56)
	at com.slack.kaldb.server.ArmeriaService$Builder.withGrpcService(ArmeriaService.java:135)
	at com.slack.kaldb.server.Kaldb.getServices(Kaldb.java:293)
	at com.slack.kaldb.server.Kaldb.start(Kaldb.java:139)
	at com.slack.kaldb.server.Kaldb.main(Kaldb.java:99)
Caused by: java.lang.ClassNotFoundException: net.bytebuddy.description.type.TypeDefinition
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 13 more

@vthacker vthacker marked this pull request as ready for review September 22, 2023 22:17
@vthacker vthacker merged commit 314a4b0 into master Sep 22, 2023
@vthacker vthacker deleted the fix_bytebuddy branch September 22, 2023 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants