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

Use non-shared netty dependency for Spring Boot integration #1135

Open
salaboy opened this issue Sep 24, 2024 · 4 comments
Open

Use non-shared netty dependency for Spring Boot integration #1135

salaboy opened this issue Sep 24, 2024 · 4 comments
Labels
kind/bug Something isn't working

Comments

@salaboy
Copy link
Contributor

salaboy commented Sep 24, 2024

Expected Behavior

Users should be able to use native compilation (with GraalVM) for applications using the Dapr Java Spring Boot integration.

Actual Behavior

The netty-shaded library doesn't work with native compilation.

Steps to Reproduce the Problem

Create a Spring Boot application, add the Spring Boot Dapr integration and try to compile a native image:

<dependency>
	<groupId>io.dapr.spring</groupId>
	<artifactId>dapr-spring-boot-starter</artifactId>
	<version>${dapr-java-sdk.alpha-version}</version>
</dependency>

Workaround

<dependency>
	<groupId>io.dapr.spring</groupId>
	<artifactId>dapr-spring-boot-starter</artifactId>
	<version>${dapr-java-sdk.alpha-version}</version>
	<exclusions>
	       <exclusion>
          	        <groupId>io.grpc</groupId>
			<artifactId>grpc-netty-shaded</artifactId>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupId>io.grpc</groupId>
	<artifactId>grpc-netty</artifactId>
	<version>${grpc.version}</version>
</dependency>

You need to make sure that ${grpc.version} matches with the one included by the Java Dapr SDK.

@artursouza can you give me some background about why we need the shaded version? Do you have anything against using the non-shaded version when integrating with Spring Boot?

Release Note

RELEASE NOTE:

@salaboy salaboy added the kind/bug Something isn't working label Sep 24, 2024
@artur-ciocanu
Copy link
Contributor

@salaboy here is a tiny PR: #1137 that should at least make things a little bit more consistent.

@salaboy
Copy link
Contributor Author

salaboy commented Sep 25, 2024

@artur-ciocanu do you think we can now add this exclusion to the Spring Boot integration?

@artur-ciocanu
Copy link
Contributor

@salaboy sorry for the delays, I am little bit busy, I will try to look into this by EOW.

@salaboy
Copy link
Contributor Author

salaboy commented Sep 27, 2024

@salaboy sorry for the delays, I am little bit busy, I will try to look into this by EOW.

No hurry.. async communications is all good.. don't feel the pressure to answer this on the same day I write a comment :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants