netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Payara Issues in NB25 - Starting Server / Specifying JDK

Open hink084 opened this issue 10 months ago • 6 comments

Apache NetBeans version

Apache NetBeans 25

What happened

I am not able to start Payara in NetBeans 25 nor am I able to swap JDK's. See recreation steps below.

Language / Project Type / NetBeans Component

Java / Jakarta EE / Servers

How to reproduce

  1. Download and extract the NetBeans binary zip file.
  2. Modify the JDK home in the netbeans.conf to JDK 21.0.5+11 (exact version doesn't really matter). netbeans_jdkhome="C:\Development\Java\jdk-21.0.5+11"
  3. Execute netbeans64.exe.
  4. Install Plugins: Base IDE, HTML5, JavaSE, Java Web and EE, Service Registry, Tools
  5. Add Payara Server v6.2025.2 (Tools --> Servers)
  6. Window --> Services --> Servers --> Right Click --> Unable to Start Payara

Image

  1. Add JDK 17 (Tools --> Java Platforms) (could also be JDK 17.x or 21.x)
  2. Unable to swap Java Platforms for Payara Server; DDL is disabled. (Tools --> Servers --> Java)

Image

Did this work correctly in an earlier version?

Apache NetBeans 24

Operating System

Windows 11 Enterprise 23H2

JDK

Eclipse Adoptium OpenJDK 21.0.5+11

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

messages.log

Are you willing to submit a pull request?

No

hink084 avatar Mar 11 '25 20:03 hink084

i dont know if it will help, same issue with jdk11 and payara 5. Also had 17 on netbeans. removed the 11 and worked

mpizeli avatar Mar 27 '25 10:03 mpizeli

Any version of the JDK or Payara breaks in the bug description above. This bug was introduced with PR #8144 via e43e28ca5bd90703f21933c97b0b3efa830e121c. @jGauravGupta

hink084 avatar May 18 '25 03:05 hink084

I have the same problem in both NB25 and NB26. The Java version cannot be changed but differs between Payara versions. For Payara 6.2023.10 - 6.2025.4 It is static on JDK 17. For Payara 7.2025.1 Alpha 1 is static on JDK 21 . All on Windows 11 I do not have this problem in NB24.

PeterHolt46 avatar May 22 '25 17:05 PeterHolt46

Also getting hit with this using NB 26 and JDK 7.0.15+6, can't start payara server.

bradvido avatar May 23 '25 16:05 bradvido

Hi everyone,

I believe I've found a "temporary" workaround for this issue. I tested this on Windows 11 with NetBeans 26 across multiple Payara versions (e.g., Payara 4.1.2.17 , Payara 5.2022.3, Payara 6 - ml-6.2025.5). It seems the root cause is that NetBeans 25 (and later versions) remove the domainsfolder setting from the Services configuration.


Workaround:

Here's how to apply it:

  1. First, locate your NetBeans User Directory. You can find this by going to Help --> About in NetBeans.

  2. Navigate to config/PayaraEE6/Instances within that directory and find the .nbattrs file (this is an XML-formatted file).

  3. Each <fileobject> corresponds to a Service you've configured. Identify the one you are currently using.

  4. Add the following line inside the relevant <fileobject>:

    <attr name="domainsfolder" stringvalue="[Your Domains Folder]"/>
    
  5. Restart NetBeans for the changes to take effect.


When it occurs:

This issue seems to occur specifically after right-clicking on the affected Service and opening its Properties for editing.

I hope this helps others who are facing the same problem! Let me know if you have any questions or if this workaround works for you.

TomoakiChenSinica avatar May 28 '25 02:05 TomoakiChenSinica

Have tested the workaround, and it works for me. Just had to change the: <attr name="java.platform" stringvalue="C:\Program Files\Zulu\zulu-21"/> to point to the Java version I needed.

Thanks!

PeterHolt46 avatar May 28 '25 04:05 PeterHolt46