question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

module-info.java references legacy javax.ws.rs.api

See original GitHub issue

I’m using 2.10.0-pr1 in a modular environment. In order to do that successfully, I have to have my module require com.fasterxml.jackson.jaxrs.json. Immediately after I do that, my application refuses to start due to module javax.ws.rs.api missing. This is not surprising, as my project is converted to use the new Jakarta APIs. And in those, the new module name is java.ws.rs.

However, this begs two questions:

  • Is Jackson intentionally dependent on the legacy EE APIs?
  • And if so, what is the proper artifact I should use to get this working properly? To the best of my knowledge, the old JAX-RS APIs are not modularized, so I’m not even sure where the javax.ws.rs.api module should be coming from.

At the very least, I think that this is a bug in release notes which mention modularization, but do not point the user to any sort of solution to this modularization problem.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ooblescommented, Oct 1, 2019

Just found this issue while moving from 2.9.9 to 2.10.0 in a module based application.

Looking at the pom.xml it shows a dependency:

      <groupId>javax.ws.rs</groupId>
      <!-- 05-Apr-2014, tatu: JAX-RS 2.x has different artifact-id, "javax.ws.rs-api"
        -->
      <artifactId>javax.ws.rs-api</artifactId>
      <version>2.0.1</version>
      <scope>provided</scope>
    </dependency>

I think because this is an old version it gets an automatic module name ‘javax.ws.rs.api’. Can I suggest updating this to 2.1.1 which has a module name of ‘java.ws.rs’ that is compatible with the jakarta version.

I don’t think 2.10.0 will be able to be used with anything that is using the ‘java.ws.rs’ module name until this is resolved.

0reactions
jonathanlockecommented, Feb 15, 2021

@oobles You’re a life-saver. I just spent about 4 hours trying to figure this out! Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve module reads package error in java9
The problem is that your module path contains the same package ( javax.annotation ) in different modules (java.xml.ws.annotation and ...
Read more >
Understanding Java 9 Modules - Oracle
In this article, I introduce the Java 9 Platform Module System (JPMS), the most important new software engineering technology in Java since its...
Read more >
Download javax.ws.rs-api-2.1.jar file - Java2s.com
MF META-INF/maven/javax.ws.rs/javax.ws.rs-api/pom.properties ... recompile everything for target VM except the module-info.java --> <configuration> ...
Read more >
Java Agent version 1.x - Elastic
Fix imports (leading to NoClassDefFoundError ) in the AWS SDK instrumentation - #2800 ... Support for user.domain #1756; JAX-RS supports javax.ws.rs.
Read more >
javax.ws.rs-api : 2.1.1 - Maven Central Repository Search
javax.ws.rs-api - Java API for RESTful Web Services.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found