You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "ahinc711 (via GitHub)" <gi...@apache.org> on 2025/01/07 21:04:44 UTC

[I] Migration of defaultNamespaceRemap / com.sun.xml.bind references [tomcat-jakartaee-migration]

ahinc711 opened a new issue, #62:
URL: https://github.com/apache/tomcat-jakartaee-migration/issues/62

   I'm using this tool with the `EE` profile to try converting some applications to Jakarta EE in the short term without uplifting all dependencies. I'm seeing runtime errors like the following, which suggest some properties aren't getting transformed:
   ```
   jakarta.xml.bind.JAXBException: property "com.sun.xml.bind.defaultNamespaceRemap" is not supported
   jakarta.xml.bind.JAXBException: property "com.sun.xml.internal.bind.defaultNamespaceRemap" is not supported
   ```
   
   The release notes of jaxb-ri indicate that the `com.sun.xml.bind` namespace was changed to `org.glassfish.jaxb`: https://eclipse-ee4j.github.io/jaxb-ri/4.0.5/docs/ch02.html#a-3-0-0
   
   So the `defaultNamespaceRemap` property name was changed:
   - 2.x: https://github.com/eclipse-ee4j/jaxb-ri/blob/2.3.9-RI/jaxb-ri/runtime/impl/src/main/java/com/sun/xml/bind/api/JAXBRIContext.java#L417
   - 4.x: https://github.com/eclipse-ee4j/jaxb-ri/blob/4.0.5-RI/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/JAXBRIContext.java#L388
   
   Could the transformer be modified to transform references to that property?
   ```
   com.sun.xml.bind.defaultNamespaceRemap => org.glassfish.jaxb.defaultNamespaceRemap
   com.sun.xml.internal.bind.defaultNamespaceRemap => org.glassfish.jaxb.defaultNamespaceRemap
   ```
   
   And would it also make sense to account for other references in the `com.sun.xml.bind` namespace, such as `com.sun.xml.bind.v2.runtime.JAXBContextImpl`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [I] Migration of defaultNamespaceRemap / com.sun.xml.bind references [tomcat-jakartaee-migration]

Posted by "ahinc711 (via GitHub)" <gi...@apache.org>.
ahinc711 commented on issue #62:
URL: https://github.com/apache/tomcat-jakartaee-migration/issues/62#issuecomment-2767405443

   Thanks for the response, I didn't realize the intent was to cover only javax packages. To avoid expanding the scope by too much, I think this can be closed as "won't do".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [I] Migration of defaultNamespaceRemap / com.sun.xml.bind references [tomcat-jakartaee-migration]

Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf closed issue #62: Migration of defaultNamespaceRemap / com.sun.xml.bind references
URL: https://github.com/apache/tomcat-jakartaee-migration/issues/62


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [I] Migration of defaultNamespaceRemap / com.sun.xml.bind references [tomcat-jakartaee-migration]

Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf commented on issue #62:
URL: https://github.com/apache/tomcat-jakartaee-migration/issues/62#issuecomment-2577142902

   Hmm. The migration tool is designed on the basis that it "just" needs to rename some packages from `javax. ...` to `jakarta. ...`. What you are trying to do looks a little more complicated than that.
   
   If you can express your requirements in terms of package renames i.e. rename `<package>.<regular expression capture group>` to `<new package>.$1` then you could do this with a profile (or maybe several profiles). Something like (untested):
   ```
   JAXB("com.sun.xml.bind","org.glassfish.jaxb","com[/\\.]sun[/\\.]xml[/\\.]bind([/\\.].*")
   ```
   although that is almost certainly be too broad. You'll likely need something more specific than `.*`. Then run the EE followed by JAXB profiles.
   
   The migration tool should be easy to build from source. I suspect experimenting along the lines I suggest above and when you have a new profile that works, create a PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org