Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-28739

Java 17 and WildFly24+ adapter using WildFly 26: Faceted Project problem

XMLWordPrintable

    • Hide

      1. Create new workspace
      2. Configure Eclipse to compile/run on Java 17:
       - Window -> Preferences -> Java -> Compiler -> JDK Compliance -> 17 (can use project specific of global settings for this)
       - Window -> Preferences -> Java -> Installed JRE -> Execution Environment -> JavaSE-17
      3. Configure WildFly 24+ runtime:
       - Window -> Preferences -> Server -> Runtime Environment -> Add (make sure you add WildFly 24+ runtime with JavaSE-17 as execution environment)
      4. Optional: Add new Server (via "Server" tab in Eclipse) based on that newly created runtime.
      5. Import/create JSF project(s). Optional: If creating new select JSF version 2.3. And use the runtime created in step 3. Assumption is that Maven is already configured.
      6. Make sure the project will use Java 17:
       - Right click on the project -> Properties -> Java Compiler -> JDK compliance -> 17 (or uncheck "Use project specific settings" and use the Java 17 based global settings).
      7. Check "Project Facets" -> Java (it will be set to a Java version that is lower than 17, max that can be selected is 16).
      8. Navigate to <project_workspace_location>/<project_name>/.settings and edit file "org.eclipse.wst.common.project.facet.core.xml". Replace "<installed facet="java" version="16"/>" with "<installed facet="java" version="17"/>".
      9. Restart Eclipse and open the same workspace/project. Error is displayed.
      (Note changing anything in the UI [Project properties] for the Facets version will wipe the runtime from that options for that facet if Java 17 is used for a version)

      Show
      1. Create new workspace 2. Configure Eclipse to compile/run on Java 17:  - Window -> Preferences -> Java -> Compiler -> JDK Compliance -> 17 (can use project specific of global settings for this)  - Window -> Preferences -> Java -> Installed JRE -> Execution Environment -> JavaSE-17 3. Configure WildFly 24+ runtime:  - Window -> Preferences -> Server -> Runtime Environment -> Add (make sure you add WildFly 24+ runtime with JavaSE-17 as execution environment) 4. Optional: Add new Server (via "Server" tab in Eclipse) based on that newly created runtime. 5. Import/create JSF project(s). Optional: If creating new select JSF version 2.3. And use the runtime created in step 3. Assumption is that Maven is already configured. 6. Make sure the project will use Java 17:  - Right click on the project -> Properties -> Java Compiler -> JDK compliance -> 17 (or uncheck "Use project specific settings" and use the Java 17 based global settings). 7. Check "Project Facets" -> Java (it will be set to a Java version that is lower than 17, max that can be selected is 16). 8. Navigate to <project_workspace_location>/<project_name>/.settings and edit file "org.eclipse.wst.common.project.facet.core.xml". Replace "<installed facet="java" version="16"/>" with "<installed facet="java" version="17"/>". 9. Restart Eclipse and open the same workspace/project. Error is displayed. (Note changing anything in the UI [Project properties] for the Facets version will wipe the runtime from that options for that facet if Java 17 is used for a version)
    • Other

      Eclipse version: JEE, 2022-09
      JBoss plugin version: 4.25.0

      JEE JSF Projects in Eclipse configured to compile and use Java 17.
      Actual server to which the projects will run on is WildFly 26.
      For runtime configuration in Eclipse only available option is to use WildFly 24+ as runtime (runtime environment) - and that is used.

      But Eclipse gives the following errors for every project:

      Faceted Project problem:
      Project facet Java 17 is not supported by target runtime WildFly 24.0 Runtime.

       

      The projects can be compiled and run successfully via the WildFly 24+ adapter [running WildFly 26] but this error is confusing/bad.
      If scaling back to Java 16 is made then no complains from Eclipse/JBoss.

      Is Java 17 support coming for this adapter (WildFly 24+)?
      Will newer adapter support for WildFly 26/27 will be introduced in future?

      JBoss 4.25 already requires Java 17 according to: https://tools.jboss.org/documentation/whatsnew/jbosstools/4.25.0.Final.html

              rh-ee-olkornii Oleksii Korniienko
              bg_redhat Bojan Gruevski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: