Problems with running Payara Server 192

Answered

So I'm having the strangest of issues here.

I'm developing a Maven project of a Rest API with Jersey that I run on Payara Server, currently version 192.

Building the project with Maven, starting the server via cli and deploying the artifact manually on the admin console works just fine, so next step is to configure IDEA to work with Payara to start some debugging sessions. I then proceeded to configure Payara as an application server and all, import my project on IDEA and create a configuration to run Payara locally and deploy the maven artifact. But then a wild bug appears:

Everytime I try to run or debug my configuration the server startup fails, and not only that, but I can't even run payara via cli anymore!

Seems like IDEA has messed up with the Payara startup script and I can only go back to running it via cli if I get a fresh install. What is that extra option that is unrecognized? I can't seem to find anything anywhere about what is that or why is that error happening after I try to start Payara via IDEA.

Need help, send the eagles.

7 comments
Comment actions Permalink

What JDK version is used to start the server? Does it work with JDK11?

https://youtrack.jetbrains.com/issue/IDEA-216528 could be related.

0
Comment actions Permalink

Well, I started the server using JDK 8 (openjdk), which I also used to build my app (my whole project is setup to use JDK 8).

Also yeah, I've come across that issue, but I don't think its related for 2 reasons:

1- I'm using JDK 8.

2- I developed my app since the beginning using Payara + IDEA + JDK 8, complete with debugging sessions, without issues.

I really have no idea why this is happening, especially why even the asadmin command from Payara is bugging.

0
Comment actions Permalink

--add-opens option is Java 9+ specific and will not work with Java 8. Not sure where it comes from. There is no code in IntelliJ IDEA that would add this option.

0
Comment actions Permalink

Thats why its bothering me, because I've configured the project to use JDK 8, then why is this option showing up? And why now?

0
Comment actions Permalink

I've asked the responsible developer to help, but he's on the vacation till July 27.

0
Comment actions Permalink

I had the same problem. My first workaround was to switch the IntelliJ boot JDK to 8:

  1. Click on Help->Find action...
  2. Type “Switch”
  3. Select “Switch Boot JDK...”
  4. Select your JDK 8 Home Directory.

While this worked, it was not ideal.

 My second workaround was to add the JAVA_HOME environment variable to the Startup/Connection tab of the Run Configuration for GlassFish.

  1. Edit your run configuration
  2. Click on the Startup/Configuration tab
  3. Check “Pass environment variables”
  4. Add JAVA_HOME with a value of the Home directory of your JDK 8.

 

0

Please sign in to leave a comment.