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

Error when trying to use the Xero java API on Spring Boot / Java 17 #357

Open
oss-linux-etc opened this issue Dec 31, 2023 · 5 comments
Open

Comments

@oss-linux-etc
Copy link

Here is what I'm seeing:

screen

Calling code:

List<Connection> connection = idApi.getConnections(tokenResponse.getAccessToken(), null);

Copy link

PETOSS-377

Copy link

Thanks for raising an issue, a ticket has been created to track your request

@oss-linux-etc
Copy link
Author

There's a PR relating to a fix for this to update to Java 17.

@dalli98
Copy link

dalli98 commented Feb 8, 2024

@oss-linux-etc I solved this issue by using the following dependency in pom.xml

<dependency>
	<groupId>com.github.xeroapi</groupId>
	<artifactId>xero-java</artifactId>
	<version>4.29.1</version>
	<exclusions>
		<exclusion>
			<groupId>org.glassfish.jersey.core</groupId>
			<artifactId>jersey-client</artifactId>
		</exclusion>
		<exclusion>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-multipart</artifactId>
		</exclusion>
		<exclusion>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-json-jackson</artifactId>
		</exclusion>

		<exclusion>
			<groupId>org.glassfish.jersey.core</groupId>
			<artifactId>jersey-common</artifactId>
		</exclusion>
		<exclusion>
			<groupId>org.glassfish.jersey.ext</groupId>
			<artifactId>jersey-entity-filtering</artifactId>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupId>org.glassfish.jersey.core</groupId>
	<artifactId>jersey-client</artifactId>
	<version>2.27</version>
</dependency>
<dependency>
	<groupId>org.glassfish.jersey.media</groupId>
	<artifactId>jersey-media-multipart</artifactId>
	<version>2.27</version>
</dependency>
<dependency>
	<groupId>org.glassfish.jersey.media</groupId>
	<artifactId>jersey-media-json-jackson</artifactId>
	<version>2.27</version>
</dependency>
<dependency>
	<groupId>org.glassfish.jersey.core</groupId>
	<artifactId>jersey-common</artifactId>
	<version>2.27</version>
</dependency>
<dependency>
	<groupId>org.glassfish.jersey.ext</groupId>
	<artifactId>jersey-entity-filtering</artifactId>
	<version>2.27</version>
</dependency>

@dalli98
Copy link

dalli98 commented Feb 8, 2024

It looks like xeroapi wants to use jersey 2.27. However, the property is overridden and it uses a newer version which is not compatible

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

No branches or pull requests

2 participants