TomEE 8 Server being limited to Java EE7 Web apps in Netbeans 15
Asked Answered
E

1

0

So I've installed the latest Apache TomEE 8 Server from here: https://tomee.apache.org/download.html

The TomEE server is running fine and I can successfully add it to Netbeans as a server.

However from there, I am trying to create a new "Java with Ant"->"Java Web"->"Web Application", and after selecting my TomEE 8 server I am presented with only the following Java EE Version options:

  • Java EE 7 Web
  • Java EE 6 Web
  • Java EE 5

How is it possible that TomEE 8 cannot support EE 8? What am I missing here?

Screenshot of Java EE Version selection drop-down

Essence answered 19/10, 2022 at 23:36 Comment(2)
Why Ant? Maven or Gradle is the common choice nowadays.Tenderfoot
What JDK is NetBeans using?Maffei
M
0

I can reproduce your problem using NetBeans 15 + JDK 17.0.2 + TomEE 8.0.12.

Adding the TomEE 8.0.12 server works fine (Services > Servers > Add Server...), and it can be started and stopped within NetBeans, but there is no corresponding Java EE 8 Web option available in the Java EE Version drop list when creating an Ant Web Application, as shown in your screen shot.

This issue has already been reported as a NetBeans bug (see issue #4027: No Java EE 8 Web Server option for TomEE 8.0.11 and TomEE 9.0.0 M7), but unfortunately it doesn't look like the issue has even been assigned to anyone yet.

The obvious workaround, as suggested by Basil Bourque in the comments to the OP, is to create your web application with Maven or Gradle instead. A messier alternative would be to create the Ant project as a Java EE 7 Web project, and then edit that project's configuration files to upgrade it to use Java EE 8. That approach sounds straightforward, but I suspect in practice it might prove to be tricky.

Maffei answered 20/10, 2022 at 22:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.