Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jersey-dev] [External] : Jakarta 9 code throws exception at runtime

Hi Jan,

I use version 3.1.3

Thanks,
Jim

<dependency>
    <groupId>org.glassfish.jersey.media</groupId>
    <artifactId>jersey-media-moxy</artifactId>
    <version>3.1.3</version>
</dependency>


On Tue, Dec 5, 2023 at 1:16 PM Jan Supol <jan.supol@xxxxxxxxxx> wrote:
Hi, 
My guess is that some injection did not take place. Some dependencies might not be the one Jersey expects (jakarta), I assume. Have you updated the Moxy version, too?
Jan


From: jersey-dev <jersey-dev-bounces@xxxxxxxxxxx> on behalf of J Dadashev via jersey-dev <jersey-dev@xxxxxxxxxxx>
Sent: Tuesday, December 5, 2023 7:02 PM
To: jersey-dev@xxxxxxxxxxx <jersey-dev@xxxxxxxxxxx>
Cc: J Dadashev <jim.dadashev@xxxxxxxxx>
Subject: [External] : [jersey-dev] Jakarta 9 code throws exception at runtime
 
I converted my code from JavaEE to Jakarta 9 and tried to run it on Jetty11.0.16.
I am getting intermittent exception below.
I was wondering if there was any information regarding that.

Thanks,
Jim
java.lang.NullPointerException: Cannot invoke "org.glassfish.jersey.message.filtering.spi.ObjectProvider.getFilteringObject(java.lang.reflect.Type, boolean, java.lang.annotation.Annotation[])" because the return value of "jakarta.inject.Provider.get()" is null
        at org.glassfish.jersey.moxy.json.internal.FilteringMoxyJsonProvider.preWriteTo(FilteringMoxyJsonProvider.java:65)
        at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:982)


Back to the top