Home > Mobile >  Migrate existing IntelliJ Java EE 8 to Jakarta 9.1
Migrate existing IntelliJ Java EE 8 to Jakarta 9.1

Time:09-06

I want to Migrate my existing Java EE 8 application to Jakarta 9.1.

I used IntelliJ IDEA 2022.2.1 (Ultimate Edition) to migrate:

Refactor | Migrate Packages and Classes | Java EE to Jakarta EE | Whole project | Run

When I recompile:

Build | Rebuild Project 

When I get follow errors with each EJBs:

cannot find symbol symbol: class Stateless
cannot find symbol symbol: class LocalBean
cannot find symbol symbol: class TransactionManagement
cannot find symbol symbol: variable TransactionManagementType

I'm using:

Gradle 7.5.1
WildFly 26.1.2.Final - Jakarta EE 8 Full & Web Distribution
WildFly Preview EE 9.1 Distribution
openjdk version "18.0.2.1" 2022-08-18 OpenJDK Runtime Environment (build 18.0.2.1 1-1)
IntelliJ IDEA 2022.2 & macOS Monterey 12.5.1

Can't seem to add the Jarkata 8 or 9.1 Classes/JARs to IntelliJ ?

CodePudding user response:

Added new bean.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd"
       version="3.0"
       bean-discovery-mode="all">
</beans>

Run:

rm -rf $HOME/.gradle/

Re-run x times:

Refactor | Migrate Packages and Classes | Java EE to Jakarta EE | Whole project | Run

Applied all post etc. and EAR'd again.

CodePudding user response:

  • Related