XeroAPI / Xero-Java

Official Java client for use with Xero API
MIT License
78 stars 88 forks source link

v8.3.0 Unable to run with spring cloud 2022.0.5 and JDK17 #393

Open sevendark opened 1 week ago

sevendark commented 1 week ago

SDK you're using (please complete the following information):

Describe the bug

Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.cloud.netflix.eureka.CloudEurekaClient.getApplications()" because the return value of "org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration.getEurekaClient()" is null
    at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.maybeInitializeClient(EurekaServiceRegistry.java:54)
    at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.register(EurekaServiceRegistry.java:38)
    at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaAutoServiceRegistration.start(EurekaAutoServiceRegistration.java:83)
    at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaAutoServiceRegistration.onApplicationEvent(EurekaAutoServiceRegistration.java:146)
    at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaAutoServiceRegistration.onApplicationEvent(EurekaAutoServiceRegistration.java:131)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:174)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:145)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:445)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
    at org.springframework.boot.web.servlet.context.WebServerStartStopLifecycle.start(WebServerStartStopLifecycle.java:47)
    at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:183)
    ... 13 common frames omitted

To Reproduce

<xero-sdk.version>8.3.0</xero-sdk.version>
<spring-cloud.version>2022.0.5</spring-cloud.version>
<spring-boot.version>3.1.12</spring-boot.version>
        <!--for xero start -->
        <dependency>
            <groupId>com.github.xeroapi</groupId>
            <artifactId>xero-java</artifactId>
            <version>${xero-sdk.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.http-client</groupId>
            <artifactId>google-http-client-jackson2</artifactId>
            <version>1.31.0</version>
        </dependency>
        <!--for xero end -->
github-actions[bot] commented 1 week ago

PETOSS-657

github-actions[bot] commented 1 week ago

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