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

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.

Related

Oracle, GlassFish Tools in Eclipse Enterprise

Trying to setup eclipse following Definitive Guide to JSF in Java EE 8. Choosing 'No servers are available' does not list the required 'Oracle, GlassFish Tools'. I am using Eclipse version: 2021-06, on Windows 10 64-bit, Java JDK 15.0.2. I've trying installing GlassFish Tools from the eclipse market place without success. For some reason, on the Define New Server page, Tomcat v9.0 Server at localhost in listed as the Server name, Apache tomcat v9.0 is listed as the Server runtime environment.
Should I be re-installing eclipse for the enterprise?
You can use Payara Tools instead. I forked that initially from GlassFish Tools and added many improvements to it. It supports GlassFish as well.
The original GlassFish Tools hasn't been updated for a long time and is probably not compatible with the more recent Eclipse releases.

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

Issue with deploying applications on Tomcat 7 and 8 from Eclipse Mars EE

I am trying to deploy my Spring application to Tomcat 7 or 8 server (I have both versions installed). Both Tomcat 7 and 8 are installed correctly and are accessible on localhost:8080.
In Eclipse Mars EE I added Tomcat 7 and 8 as servers (see the picture below).
Then I built the project (Maven), opened the Servers tab in Eclipse and clicked on No servers are available. When I want to specify Tomcat 7 (or 8), the field server name is empty (see the picture). The strange thing is that before installing Tomcat 7, this field was filled out and the button Next was available, however in that case there was a message Unknown server...
What am I doing wrong and how to solve this issue?
UPDATE:
I created a new project and refreshed all the settings. Now I am able to see Tomcat 8 in the Servers tab, however when I click Start the following message appears:
It finally worked. I had to add *jar file when deploying on Server.

JBoss server 7.1 not starting in Eclipse Luna

I have Eclipse Luna 4.4.1, and JBoss Server 7.1. The problem is when I start the Server, it never starts and after a long time it says Time Out Error. "JBoss is unable to start within 450 seconds".
How to resolve this issue?
The Console shows the following output and just hangs here for much time:
12:47:54,100 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
12:47:54,438 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
12:47:54,552 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
The Server never starts. I have changed the time settings but it never helps.
I solved that issue, I was using JDK version 1.8 and JBOSS 7.1, The JBOSS server always stuck on "Starting Brontes".... I have tried changing the server startup time, and settings but nothing helped.
I then unistalled JDK 1.8, and installed JDK 1.7, and this solves my issue. JBOSS 7.1 works with JDK 1.7.. :)
And one thing more, JDK 1.8 can work with JBOSS WildFly 8...
Compare the Java Build Path properties in your projects, maybe you mixed up the JDK versions.
I faced the same problem..using different java runtime environments in server an project configuration seems not to be the best way for starting the JBoss :)
If someone hit this problem in the future...
JBoss 7.1 need Runtime JRE 1.7. Edit this under Preferences > Server > Runtime Environments > JBoss 7.1 > edit > Runtime JRE (Change to 7.1)
You can increase the timeout associated with server starting time as part of the server settings in Eclipse. You might also want to check if you need all the modules that JBOSS starts up as part of the startup process. 6 minutes is a long time in a development environment. Do you have lot of apps being deployed? Would you need all of them for a development environment?
I didn't know that I can't run JBoss As 7.1 on JDK 1.8 and I had the same problem as Madhya Rehman. I've checked if jdk in project properties and jboss runtime is the same, then I set checkbox in project properties/project facets/ runtimes page/ jboss 7.1 runtime ant it seems to work.
For eclipse:
Double click on server
Go to General information
Change Run environment to Java 1.8
And it will work fine... ;)
Same problem and changing the java version helped me.
I was trying to start the Jboss bundled with liferay server on jboss as 7.1.I also had similar issue. I changed jre from 1.8 version to 1.7 that solved my issue and server started successfully.
Another posible fix is to change the hostname, from 'localhost' to '127.0.0.1' in eclipse jboss server configuration pane, in the 'General Information' section

Wildfly 8.1.0 Final and Netbeans 8.0: WildFly Application Server Start Failed. HTTP Connector port 8080 is already in use

U have updated Wildfly from 8.0.0 FINAL to 8.1.0 FINAL. When I am trying to run the application in Netbeans 8.0, it fails starting and the following message is shown:
WildFly Application Server Start Failed. HTTP Connector port 8080 is already in use.
When I am trying to manage the server from Netbeans menu, stop is disabled and killing hangs. I can kill the server from the system, but nothing changes. Still I cannot deploy/run the application from the environment anyhow.
It seems Netbeans starts the server twice.
All right, I just found the problem. The previous problem happened when I have used "Update Existing 8.0.0.Final Install" from Wildfly downloads over the existing 8.0.0 installation.
When I desperately installed a fresh 8.1.0 installation, everything seems to work. So the problem is probably in the update package.

Categories

Resources