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
  • From: Jan Supol <jan.supol@xxxxxxxxxx>
  • Date: Tue, 5 Dec 2023 19:38:03 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NrxDb+JefqeBuV8Dp8QwVY/7kLTQaRXvfauCVIjDli8=; b=FZ61vfMj8QgjHp3VKQCciDII6CI8mKAfwOJDq0M+F0vAN+zhwOXM9OMPsPO+DTSGDo6SmCjLJ8OEmYkDNUJ/Cfkq2HlTEvKPNIX+ayXvSL9RuTdBgvFtOSAxBRbK3oNVDRx4PHJxrbNeFJQrhEsO7fKPHwAqbaXqOWdBdN4E0vY5xhl8RNDjJLMX4wiO9Q1hDQ5LvzFHifHXJGQUkFFjXbV9/VFHey8/ErbN+rQlKZm72HV64c5AS52YSExOU/nV5bfhY/QKGy3JfdoscEAvKNKfkAhq3lYrUDGJonhIhTweFvQk+E0feLGLC1HZA+3bi40Zb5pgA/I59m5ynEwljw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dxZEEfg19c93nSy95UdmT56Zqct0nrcBbAZwVwsFtzrV0LBw4Ss+J7EUkX59vdMsqhFb8cZtT7IPwEiAED+3NrO2WZpj7pcJkdaJ9RnJB7eGwhMsQeUlaB1aoTVAlx8aqFcT4sqqs82z+n+69EgoXuC9dCF2z4YFTyU/VZlBvhHN15LRKM/doEw1yqvS0rOEO/CXdAsKFQ86XXfnS4hzQOfMiTcNNWozkNaMJi7udy+q3B/NalSDYOcfG78w/sQFijHly/Mjiyb2ujw2+dQExrRZVG/ASyLvLdUFS34WeWA7xjJ/r7gfckWzcWG1/vroMKfsHXcSEtE+FZMao/OS3Q==
  • Delivered-to: jersey-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jersey-dev/>
  • List-help: <mailto:jersey-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jersey-dev>, <mailto:jersey-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jersey-dev>, <mailto:jersey-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHaJ6VOJH7Y6rIuKE2dYAbrGOmgoLCa/k14gAALv4CAAApEbQ==
  • Thread-topic: [External] : [jersey-dev] Jakarta 9 code throws exception at runtime

Not Jersey Moxy integration module. 

For Jersey 3.1 (Jakarta EE 10 Jersey, not EE 9 as want) you need the actual org.eclipse.persistence.moxy 4.0.x Moxy. For EE 9 Jersey (3.0.x) you need org.eclipse.persistence.moxy 3.0.x Moxy.

--Jan

From: J Dadashev <jim.dadashev@xxxxxxxxx>
Sent: Tuesday, December 5, 2023 7:55 PM
To: Jan Supol <jan.supol@xxxxxxxxxx>
Cc: jersey-dev@xxxxxxxxxxx <jersey-dev@xxxxxxxxxxx>
Subject: Re: [External] : [jersey-dev] 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