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.

Configuration not applied after upgrading to 1.5.7

See original GitHub issue

Hello,

I’m using jersey-core 1.5.5 and I need to upgrade to >= 1.5.7 in order to fix ObjectMapper issue #1604 (my JSON date formatting is incorrect).

It works fine but now I have a problem with the swagger.json, my configuration is not applied :

{"swagger":"2.0","info":{"version":"Swagger Server","title":""},"tags": ...

The rest of the document is correct, I can use it in Swagger-UI but I can’t call my API because host / basePath are not set in the document. My configuration is defined like in this post (to define contextPath as basePath) : http://stackoverflow.com/a/35905415/1001248

I’m using swagger-jersey-jaxrs in a Glassfish 3.1.2.2 environnement.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fdelsertcommented, Aug 18, 2016

I understand.

I pushed a sample maven project to reproduce the issue : https://github.com/fdelsert/swagger-issue-1886

I excluded Jersey dependencies 1.13 of swagger-jersey-jaxrs because I use Jersey 1.11 provided by Glassfish server. Maybe the problem comes from an incompatibility with the Jersey version.

Direct links :

0reactions
fehguycommented, Dec 24, 2016

OK, the BeanConfig is used for programmatic configuration without needing web.xml. The web.xml configuration will not trigger scanning in BeanConfig. So you have two choices:

  1. Use web.xml through the DefaultJaxrsConfig. You don’t need to subclass it, and doing so the way you did isn’t going to work. Use the fields that are supported in that class, including host and basepath.

  2. Use a programmatic configuration. You can follow a pattern like this:

https://github.com/swagger-api/swagger-samples/tree/master/java/java-jaxrs

Where a web.xml configures most of the application, and a custom servlet does the rest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

org.springframework.boot Configuration with name 'runtime ...
Failed to apply plugin 'org.springframework.boot' Configuration with name 'runtime' not found. The following is my build.gradle
Read more >
Questions on 1.5.7 upgrade - Zen Cart Support
2) When upgrading from an older version of Zen to 1.5.7 it states to copy your existing files into the test directory (done...
Read more >
Upgrading your build from Gradle 6.x to the latest
Run gradle wrapper --gradle-version 7.0 to update the project to 7.0. Try to run the project and debug any errors using the Troubleshooting...
Read more >
K84554955: Overview of BIG-IP system software upgrades
Using the Configuration utility, you can change the import options by going to System > Software Management > Boot Locations > <boot location ......
Read more >
Release Notes for Cisco UCS C-Series Software, Release 1.5(7)
Do not upgrade individual components (only BIOS or only CIMC), since this could lead to unexpected behavior. If you choose to upgrade BIOS ......
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