Forum Discussion

josh14's avatar
josh14
Occasional Contributor
12 months ago
Solved

Migrating from javax to jakarta and would like to know how to register a filter

Trying to follow the documentation on github, I still am trying to wrap my head around openapi.  I migrated in gradle some packages over to the jaxrs2 swagger builds, but I've still got an old web.xml file that uses filters for various functionality.  If I swap over to the jakarta namespace, I get an error saying my filter is is not assignable to 'javax.servlet.Filter,javax.servlet.Filter'.  Any suggestions to work around this?

  • Hi josh14  (great name),

     

    So OpenAPI would be the YAML stuff, then there are the Annotations (JAX-RS stuff).

    Unfortunately, it sounds like your environment may have some issues (a bad combination of dependencies,  or something similar). My suggestion is to boil it down to the simplest use-case, and build up from there. If you get a reproducible case, StackOverflow may be able to offer support, or if there appears to be a bug in the code, you're more than welcome to circle back. 

     

    But as it stands, I don't have much more to offer other than the documentation you already linked to.

1 Reply

  • Hi josh14  (great name),

     

    So OpenAPI would be the YAML stuff, then there are the Annotations (JAX-RS stuff).

    Unfortunately, it sounds like your environment may have some issues (a bad combination of dependencies,  or something similar). My suggestion is to boil it down to the simplest use-case, and build up from there. If you get a reproducible case, StackOverflow may be able to offer support, or if there appears to be a bug in the code, you're more than welcome to circle back. 

     

    But as it stands, I don't have much more to offer other than the documentation you already linked to.