Problems with glassfish 4 Debug in IDEA 12.1 - java

I'm trying to debug glassfish 4 application in IntelliJ IDEA12.1 and am getting the following:
D:\tools\glassfish4\glassfish\bin\asadmin.bat start-domain --debug domain1
[2013-06-28 03:58:34,480] Artifact exchange-web:war: Server is not connected. Deploy is not available.
Detected server admin port: 4848
Detected server http port: 8080
Attempting to start domain1.... Please look at the server log for more details.....
But nothing started. And there is no error in log.
So what should I do to resolve this?

Had also trouble with that after upgrading to GF 4.1. Problem was, that IntelliJ itself was running under 1.6 VM. GF 4.1 comes with 1.7 compiled classes. Switching IntelliJ JDK to 1.7 solved that deployment trouble.

It is a tricky one. When you add an artifact in the deployment tab, you see a warning message in the bottom (If you not, just resize the window enough):
Debug settings are invalid or not suitable for local debugging
Then just click to the button fix.

There is similar error (Server is not connected. Deploy is not available.) with IDEA 13.1.* and Glassfish 4.1. Upgrading intellij JDK to 1.7 or 1.8 solved this problem.
Go Intellij.App/Contents modify Info.plist upgrade JVMVersion 1.6* to 1.7*

As banterCZ explained. If the button fix does not react, It can also be a permission problem. You can also start IntelliJ as Administrator, and click to the button fix If it does not work.

FIX for Mac:
1) Open Terminal (make sure IDEA is closed)
2) type: vi "/Applications/IntelliJ IDEA 13.app/Contents/Info.plist"
3) Find Line with JWMVersion
4) on your keyboard click key "i" and change the value from 1.6* to 1.8*
5) Press ESC
6) Press Command + key ":"
7) input "wq"
8) Start IDEA

Actually the situation was same here for IntelliJ 15.0.2 and Glassfish 4.1.1. But it was not a problem of JDK incompatibility here, because I used JDK 1.8. Instead, it was the invalid details of server configuration. This kind of situation can occur with an invalid password, VM and other details.

I had this problem with the Payara server and the fix button did not worked.
The solution was to add the same server using the GlassFish plugin and click on the fix button. This also fixed the Payara server configuration.

I had the same problem with glassfish 6.0.0 and intellij idea with java jdk 14. Solved it by installing the jdk 1.8 and changing the settings of the project.

Related

Payara 5.2020.4 didn't start

I've jdk1.8.0_171 installed on my windows 10, 64bit OS , yesterday I've downloaded Payara Micro Community 5.2020.4 and added the server on Netbeans 8.2 , but when I try to start the sever NetBeans Payara server log shows following error
Error: Could not find or load main class [9|]--add-opens=java.logging.java.util.logging=ALL-UNNAMED
Need clues to resolve this error
Thanks in advance
This is due to a change in Payara Server configuration that's not compatible with how the older version of the Netbeans Payara (GlassFish) plugin launches Payara Server. The plugin uses a hacky mechanism that reads the domain configuration and launches the Java process of Payara Server directly instead of using the asadmin launcher.
You can easily fix this by editing the domain.xml file in glassfish/domains/domain1/config/domain.xml. Just remove all jvm-option elements where you find [ and ] brackets. These define the Java version for which the JVM option is applicable. Usually this is for running on JDK 9+, so it's safe to remove those options if you run on Java 8.
So, remove this option and all similar options:
<jvm-option>[9|]--add-opens=java.logging.java.util.logging=ALL-UNNAMED</jvm-option>
Upgrading Netbeans to the latest version 12.1 also fixes this problem as Netbeans has been updated to understand this change in the configuration.
I have got a similar problem with jdk1.8.0_311 , payara-5.2021.10 on netbeans 8.2 . payara start successfully in a terminal with command :
glassfish/bin/asadmin start-domain
, but when I start the server inside netbeans, i have some errors :
Unrecognized VM option 'UseOpenJSSE'
Unrecognized VM option 'HotswapAgent=core'
Unrecognized option: -Xlog:redefine+class*=info
The solution by OndroMih works fine.
I have removed this lines in domain.xml. "glassfish/domains/domain1/config/domain.xml"
<jvm-options>[Azul-1.8.0u222|1.8.0u260]-XX:+UseOpenJSSE</jvm-options>
<jvm-options>[Dynamic Code Evolution-11.0.10|]-XX:HotswapAgent=core</jvm-options>
<jvm-options>[Dynamic Code Evolution-11.0.10|]-Xlog:redefine+class*=info</jvm-options>
now its ok
Solution to Payara 5.184 / Netbeans 8.2 / Java 8 Not launching Payara:
in file:
\payara5\glassfish\domains\domain1\config\domain.xml
Search for the unrecognized option UseOpenJSSE and comment that tag.
Repeat for each occurrence.
Repeat as well for subsequent errors might appear.
Good Luck!

Intellij 2019.2: GlassFish requires Java SE version 6. Your JDK is version 0

I'm working with IntelliJ 2019.2 and cannot start the Glassfish Server 4.1.2 (Full Platform). I've found some solution proposals for this error, but none of them worked for me, e.g. this post or this article.
Output
C:\workspace\resources\server\glassfish4\glassfish\bin\asadmin.bat start-domain domain1
GlassFish requires Java SE version 6. Your JDK is version 0
"C:\Program Files\Java\jdk1.8.0_221\bin\java.exe" -Dfile.encoding=windows-1252 -classpath "C:\workspace\resources\server\glassfish4\glassfish\modules\javax.ejb-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.servlet-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.servlet.jsp-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules;C:\workspace\resources\server\glassfish4\glassfish\modules\acc-config.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\admin-cli.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\admin-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\admin-util.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\amx-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\amx-javaee.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\annotation-framework.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ant.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\antlr-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\aopalliance-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\api-exporter.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\appclient-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\appclient-server-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\appclient.security.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\asm-all-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\asm-all.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\org.apache.felix.configadmin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\org.apache.felix.eventadmin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\org.apache.felix.fileinstall.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\org.apache.felix.gogo.command.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\org.apache.felix.gogo.runtime.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\org.apache.felix.gogo.shell.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\org.apache.felix.scr.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\osgi-cdi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\osgi-ee-resources.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\osgi-ejb-container.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\osgi-http.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\osgi-javaee-base.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\osgi-jdbc.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\osgi-jpa.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\osgi-jta.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\autostart\osgi-web-container.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\backup.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\bean-validator-cdi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\bean-validator.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cdi-api-fragment.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cdi-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\class-model.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cluster-admin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cluster-common.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cluster-ssh.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cmp-ejb-mapping.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cmp-enhancer.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cmp-generator-database.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cmp-internal-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cmp-model.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cmp-support-ejb.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cmp-support-sqlstore.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\cmp-utility.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\com.ibm.jbatch.container.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\com.ibm.jbatch.spi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\common-util.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\concurrent-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\concurrent-impl.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\config-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\config-types.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\connectors-admin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\connectors-inbound-runtime.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\connectors-internal-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\connectors-runtime.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-cluster-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-common-full-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-common.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-community-branding-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-concurrent-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-corba-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-ejb-lite-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-ejb-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-jca-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-jdbc-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-jms-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-jts-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-plugin-service.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-updatecenter-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\console-web-plugin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\container-common.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\dataprovider.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\dbschema-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\deployment-admin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\deployment-autodeploy.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\deployment-client.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\deployment-common.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\deployment-javaee-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\deployment-javaee-full.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\dol.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ejb-client.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ejb-container.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ejb-full-container.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ejb-internal-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ejb.security.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\endorsed\javax.annotation-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\endorsed\jaxb-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\endorsed\webservices-api-osgi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\entitybean-container.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\flashlight-extra-jdk-packages.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\flashlight-framework.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-admingui-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-client-module.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-connectors-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-ejb-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-jms-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-jms-injection.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-jpa-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-load-balancer-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-restadmin-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-web-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gf-weld-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-batch-commands.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-batch-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-corba-csiv2-idl.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-corba-internal-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-corba-omgapi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-corba-orb.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-ee-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-extra-jre-packages.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-grizzly-extra-all.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-mbeanserver.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-naming.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-oracle-jdbc-driver-packages.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish-registration.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\glassfish.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gmbal.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gms-adapter.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\gms-bootstrap.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\guava.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ha-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ha-file-store.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ha-shoal-cache-bootstrap.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ha-shoal-cache-store.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\hk2-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\hk2-config.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\hk2-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\hk2-locator.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\hk2-runlevel.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\hk2-utils.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\hk2.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\inmemory.jacc.provider.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\internal-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\j-interop-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jackson-annotations.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jackson-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jackson-databind.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jackson-jaxrs-base.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jackson-jaxrs-json-provider.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jaspic.provider.framework.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javaee-kernel.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javamail-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javamail-runtime.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javassist.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.batch-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.el.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.enterprise.concurrent-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.enterprise.concurrent.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.enterprise.deploy-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.faces.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.inject.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.interceptor-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.jms-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.json.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.mail.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.management.j2ee-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.persistence.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.resource-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.security.auth.message-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.security.jacc-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.servlet.jsp.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.servlet.jsp.jstl-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.servlet.jsp.jstl.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.transaction-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.websocket-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.ws.rs-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.xml.registry-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\javax.xml.rpc-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jaxb-extra-osgi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jaxb-osgi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jboss-logging.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jdbc-admin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jdbc-config.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jdbc-runtime.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-bean-validation.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-cdi1x-servlet.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-cdi1x-transaction.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-cdi1x.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-client.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-common.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-container-grizzly2-http.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-container-servlet-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-container-servlet.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-entity-filtering.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-gf-ejb.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-guava.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-media-jaxb.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-media-json-jackson.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-media-json-jettison.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-media-json-processing.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-media-moxy.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-media-multipart.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-media-sse.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-mvc-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-mvc-jsp.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-mvc.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jersey-server.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jettison.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jms-admin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jms-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jmxremote_optional-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jpa-container.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jsf-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jsftemplating.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jsonp-jaxrs.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jspcaching-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jsr109-impl.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jstl-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jta.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\jts.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\kernel.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\launcher.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ldapbp-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\libpam4j-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\load-balancer-admin.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\logging.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\management-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\metro-glue.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\mimepull.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\monitoring-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\nucleus-grizzly-all.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\nucleus-resources.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\orb-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\orb-enabler.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\orb-iiop.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.apache.felix.bundlerepository.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.eclipse.persistence.antlr.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.eclipse.persistence.asm.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.eclipse.persistence.core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.eclipse.persistence.dbws.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.eclipse.persistence.jpa.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.eclipse.persistence.jpa.jpql.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.eclipse.persistence.jpa.modelgen.processor.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.eclipse.persistence.moxy.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\org.eclipse.persistence.oracle.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\osgi-adapter.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\osgi-cli-remote.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\osgi-container.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\osgi-jpa-extension.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\osgi-resource-locator.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\persistence-common.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\pfl-asm.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\pfl-basic-tools.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\pfl-basic.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\pfl-dynamic.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\pfl-tf-tools.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\pfl-tf.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\pkg-client.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\registration-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\registration-impl.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\resources-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\resources-runtime.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\rest-client.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\rest-service.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\scattered-archive-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\schema2beans-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\security-ee.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\security-services.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\security.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\shoal-cache.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\shoal-gms-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\shoal-gms-impl.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\simple-glassfish-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\soap-tcp.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\ssl-impl.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\stats77.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\stax2-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\transaction-internal-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\trilead-ssh2-repackaged.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\tyrus-client.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\tyrus-container-glassfish-cdi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\tyrus-container-glassfish-ejb.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\tyrus-container-grizzly-client.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\tyrus-container-servlet.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\tyrus-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\tyrus-server.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\tyrus-spi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\war-util.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\web-cli.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\web-core.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\web-embed-api.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\web-glue.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\web-gui-plugin-common.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\web-ha.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\web-naming.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\web-sse.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\websecurity.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\webservices-connector.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\webservices-extra-jdk-packages.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\webservices-osgi.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\webservices.security.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\weld-integration-fragment.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\weld-integration.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\weld-osgi-bundle.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\woodstox-core-asl.jar;C:\workspace\resources\server\glassfish4\glassfish\modules\work-management.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\plugins\JavaEE\lib\javaee-impl.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\lib\platform-api.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\lib\util.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\plugins\Glassfish\lib\specifics\glassfish3.1-specifics.jar" com.intellij.javaee.oss.process.JavaeeProcess 58993 com.intellij.javaee.oss.glassfish.agent.Glassfish31Agent
Detected server admin port: 4848
Detected server http port: 8080
It already worked once, but I had to change my workstation and reinstall IntelliJ
I also updated my JDK, it is still version 8, but now another u number (8u221, I don't know which version I used before)
The Application Server settings in IntelliJ are correct
The Glassfish logs are empty
My JAVA_HOME is set correctly (C:\Program Files\Java\jdk1.8.0_221)
I added %JAVA_HOME%\bin to the PATH variable.
I'm able to start the server over the cmd (asadmin.bat start-domain domain1)
Ensured that correct SDK is set in IntelliJ (Project Structure -> Platform Settings)
Tried different Java Compiler Settings (IntelliJ Settings), e.g. changed Project Byte Code version to 6 instead of 8.
Adding the line AS_JAVA=MY_JDK_DIRECTORY did not help
Reinstalling Glassfish did not help
Glassfish Plugin in IntelliJ is enabled (default)
java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
I don't know what to do anymore, can someone help me please?
Inside of your Injellij double shift (press shift twice) to open the search and type in JDK. Under actions click on switch boot JDK and make sure you have one there if not select one and then click save and restart. hope this works and helps.
The root case of the issue is logged here.
Windows launcher prepends PATH with JetBrains Runtime bin directory in order to load certain DLLs without issues. It turned out to be not the best solution and we are working to address it in a different way.
asadmin.bat uses the first java.exe from PATH. It doesn't try to detect it via JAVA_HOME. Therefore the workaround for now is to switch IntelliJ IDEA boot JDK to JBR8 per this document or start IntelliJ IDEA using idea.bat instead of idea64.exe.
I tried changing the IntelliJ configuration but no luck.
I tried starting the server from the command line using: "C:\Program Files (x86)\glassfish4\glassfish\bin\asadmin.bat" start-domain --debug domain1.
I still got the error from the command line.
I had to edit the following file:
PATH_TO_YOUR_GLASSFISH/glassfish/config/asenv.bat
Literally: C:\Program Files (x86)\glassfish4\glassfish\config\asenv.bat
I added the following to the end: set AS_JAVA=PATH_TO_YOUR_JDK
Literally: set AS_JAVA=../../../../Program Files/Java/jdk1.8.0_261
I finally tracked the answer down from this question:
How do I specify the JDK for a GlassFish domain?
I have the same problem on linux host installed with Java 10.
Settings JAVA_HOME, AS_JAVA or updating asenv.conf does not solve the problem. Event checking current active JDK .
It seems that Glassfish supports JDK6 only. It does not work with JDK10 or JDK8.
I tried every suggestion her but it did not work. For me problem was that my Glassfish configration was not pointing to correct directory. It was pointing to C:\payara5\glassfish. I changes it to C:\payara5 and it worked.

Glassfish 5 not working with Intellij 2017 2.4

I am new to Intellij ide and i'm having issues running Glassfish 5 or any previous version on Intellij 2017 2.4.
After selecting New Project > Java Enterprise > Web Application i had to specify the application server, to which i selected the folder of glassfish 5, jdk is set to 1.8 and java ee to 7. So far so good, no errors and the project gets created. Then i have a greyed "play" icon next to GlassFish 5.0.0 in the upper right of the corner that says that i have to configure it, i click Edit Configurations and the Run/Debug Configurations opens up
Everything seems fine and when i click the "play" green button to start the server and run the project i have projectName:war exploded under Deployment and
[2017-09-26 08:47:57,836] Artifact testfornew:war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)
Under output. Coming from Netbeans setting glassfish up was pretty straightforward, i've checked a couple of solutions online including this but they don't seem to work for me.
I was having the same problem and I found that it is caused by an issue with the JDK software. So the NullPointerException thrown at AsadminMain.java:57 can be solved by checking your system variables (PATH, JAVA_HOME). Be sure that they reference to an acceptable JDK supported by your GlassFish version. GlassFish 5.0 is certified to work with java sdk 8u144 as mentioned HERE: https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf.
Be aware, the path may also contain a reference to an old SDK directory.
If you need more help, please post the results of calling echo %PATH% on your cmd.
In my case JDK 1.8.0_152 must be installed, path and java_home variables have to be configured AND JDK 9.X must be uninstalled. Without uninstall, the error persist.
Uninstall Java 9, stay with the version 8 update 162 and the jdk8. When you unistall the Java 9 your system variables (PATH, JAVA_HOME=C:\ProgramData\Oracle\Java\javapath) will update the 3 jar (java, javaw, javaws) in this path to Java version 8.
war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
....
Assuming that you are certain that JDK has set well in your environment variables and you are using jdk 8 or lower-Well I read somewhere that java9 has issues with such configurations, maybe the issue has been solve but for my case I chose to avoid for now.
Download and extract GlassFish of your version. For my case I'm
using GlassFish 5.181.O on Intellij 2018.1 ultimate version
Start Intellij, and before opening any project, or rather close all projects that are open.
Click on configure, then settings. A new window will appear as shown below. I have marked the steps you need to follow in the image. I will also add some explanation here.
Under Application Servers, click on the + shown as step 2 on the image, here you need to specify you glassfish server, the folder where you extracted to.
Next, click on + shown in step 3 on the image to add the server modules.
Assuming all is a success upto this point, select all choices of as shown in step 4 on the image, apply changes and Ok.
I will explain about creating a new project because I'm not sure how you would handle an existing project but I guess you can use concepts here to figure out what you need to tweak.Create your new java ee or whatever application you are working on,
As shown on figure 2, assuming you are creating a Java EE app, Click on Java Enterprise, then check/tick Web Application and JSF
Under libraries, use library from Glassfish ... Installation didn't help much because I got null pointer exceptions., so I used Download as shown in figure 2. Click next and finish.
Automatically you will see GlassFish added to the project, run it from the IDE.
Edit
If you had done all of the above and still get some error like Null Pointer Exceptions. Do what #Jailson Evora says: Clear your systems from java 9 and install java 8 and make sure when you issue java -version on command line, the output is java 8
I had to uninstall both jdk9 and jdk10 and set my java_home back to jdk8_181

Tomcat 7.0.73 doesn't work with java 9

Unable to start tomcat based app with java 9 because of default "java.endorsed.dirs" option in catalina.sh.
-Djava.endorsed.dirs=/usr/local/share/tomcat/endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Is there a work around for this?
You'll have to hack the script bin/catalina.sh to get this to work.
There are a bunch of lines like this in bin/catalina.sh:
exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
...
Just remove the second of those lines (the one with -Djava.endorsed.dirs) in each case and you should be back in business.
I'm looking at improving those scripts so that -Djava.endorsed.dirs is not provided to the JVM when the value is empty (which should be the case if you are using Java 9).
UPDATE 2017-11-06
Looks like r1810284 should fix the endorsed.dirs problem. Expect this fix to be included in Tomcat 7.0.83 (or whatever the next 7.0.x version passes voting).
UPDATE 2018-03-07
The first official release of Apache tomcat 7.0.x that includes this fix is Apache Tomcat 7.0.84, voted stable on 2018-01-24.
The above issue was fixed with the later releases of Eclipse but Unfortunately, it appeared again with the release of Java 10. Here is my research :
Initially, I installed Java 10 and Eclipse Oxygen 3 which gave me the same error you mentioned in your question. But, at the moment I installed Java 9 and pointed my Apache tomcat runtime server to it, the error was gone.
In my case, what I did to answer the problem of Tomcat not running was to set Tomcat (version 7) with a lower Java version (e.g. Java 8).
Then, in startup.sh, shutdown.sh and catalina.sh I added the following:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`;
This symptom can come about if you have a Tomcat Runtime using a JRE earlier than Java 9 and create and run a server with that runtime. Then edit the Tomcat Runtime to use Java 9 and try to start the server. What happens is that a "-Djava.endorsed.dirs" argument gets added to the launch configuration when the server was run with the earlier JRE. When running the server after the switch to Java 9, the "-Djava.endorsed.dirs" argument is seen as a user added VM argument and kept, resulting in the error.
The simplest way to fix is to recreate the server. You can also right click on the server in the servers view and select Open. In the window that opens, click the "Open launch configuration" link at the bottom of the General section. In the dialog that opens, switch to the Arguments tab and in the "VM arguments" section, edit out the "-Djava.endorsed.dirs" argument and click OK. You should be able to start the server now.
To fix this bug, you need to install/update the Eclipse Web Tools Platform (WTP) to version 3.9.4 or later.
Select Help > Install new Software...
Select or add following URL: http://download.eclipse.org/webtools/repository/oxygen
Check Web Tools Platform (WTP) 3.9.4
Select "Next" and follow instructions
Reconfigure the tomcat in eclipse.
In Run configurations -> Arguments -> VM arguments
try removing
-Djava.endorsed.dirs="C:\Program Files\Apache Software Foundation\Tomcat 8.5\endorsed"
You have to remove -
"-Djava.endorsed.dirs="/home/ttlaptop/Downloads/apache-tomcat-7.0.105/endorsed"
from run configurations, and then tomcat will start
I can't be sure but ..
Step 1 -- >
it worked for me, I just remove servers from eclipse
Step 2 -->
restarted and add server again (tomcat 7)
Tomcat v7.0 Server at localhost

NetBeans (8.0.2) can't communicate with Wildfly 9 (Final)

If i start a Wildfly 9 Server with NetBeans, it does not detect that it is started. If i start again, i get the error message "WildFly 9.0.0 Start Failed. HTTP Connector port 8080 is already in use."
The port is used by Wildfly. Wildfly is started by NetBeans but not detected.
(If i stop Wildfly manually, i can start it again with no error message, but NetBeans does not detect it. If i try to start again, i get the error message "... port 8080 is already in use.")
Why can't NetBeans detect the running Wildfly instance?
Netbeans support for WildFly 9 and 10 that is in the workings, it was added to latest builds that will be part of 8.1 Netbeans release.
For time being best thing to do is to try the nightly builds where it works.
you can grab nightly builds from http://bits.netbeans.org/download/trunk/nightly/latest/
"NetBeans 8.1 beta" was released and includes support for Wildfly 9 and 10: https://netbeans.org/community/releases/81/
I can confirm this behavior, I tried it too. AFAIK Wildfly support in Netbeans was maintained by plugin created directly by JBoss community. This changed in Netbeans 8.0.2 and now it is part of Netbeans installation package. Problems with support of newly released versions of Wildfly is occurring quite often.
Here for Wildfly 8: https://netbeans.org/bugzilla/show_bug.cgi?id=241805
Here for Wildfly 8.1: https://netbeans.org/bugzilla/show_bug.cgi?id=245297
I would suggest to wait until they add support for version 9, or you can try proactively raise the bug in Netbeans bugzilla.
I came across the same issue on a windows 7 machine with netbeans 8.2 (8.1 as well) and wildfly 9.0.2.
Actually the issue came from an entry in my hosts file configured to map localhost to the actual machine ip address. The issue was fixed as soon I removed that entry.
Hope this will help.

Categories

Resources