Search code examples
javaspringspring-bootcorretto

Migrating from Spring 5 to Spring 6: unable to find classes in jakarta packages


I am migrating my project from spring 5 to spring 6 and springBoot to 3. Below are some imports of javax package that are not available in jakarta package.

please suggest where in spring 6 these classes are migrated or any alternative that I can use to replace javax classes

    import javax.crypto.SecretKeyFactory;
    import javax.crypto.spec.PBEKeySpec;
    import javax.xml.datatype.*;
    import javax.xml.namespace.*;
    import javax.jms.*;

Solution

  • here is a list of unaffected packages (link). They are still javax also in Spring 6 / Spring Boot 3.

    Oh.. I see your jms package is not included there.. but there is a new jakarta package for that, maybe try to migrate to this one

    If there any more issues, (as M.Deinum already said) let us see your pom

    and as Rohan already said, you will need at least Java 17 for Spring 6 / Spring Boot 3, but I'm pretty sure you're aware of that.