NetBeans 8 and WildFly 8 (Tech Tip #6)

Announcing the availability of WildFly support in NetBeans 8 nightly builds!

Wildfly_logo

netbeans-dev-techtip6

Disclaimer: WildFly plugin provides very basic functionality as of now and is evolving rapidly to support broader feature set. It is purely for testing purpose at this time.

Many thanks to Emmanuel Hugonnet for contributing the plugin and constant support from NetBeans team, especially Geertjan Wielenga in making this possible.

How to get started ?

  1. Download NetBeans 8 nightly. Worked on existing NetBeans 7.4 as well, see instructions below.
  2. Go to “Tools”, “Plugins”, “Available Plugins”, search on “wildfly” to see the updated screen:wildfly-plugin--netbeans-techtip6click on “Install”. Follow the prompts to complete the installation.
  3. In NetBeans, go to “Services”, right click on “Servers”, select “Add Server…” to see:wildfly-server-configure-techtip6Click on “Next>”.
  4. Install or build WildFly following Tech Tip #1. Click on “Browse…” next to “Server Location…” and select the location of WildFly. For example, I used “/Users/arungupta/workspaces/wildfly/build/target/wildfly-8.0.0.Beta2-SNAPSHOT” on my machine.wildfly-server-instance-techtip6

    Click on “Next>”.
  5. Take the defaults as shown:wildfly-instance-props-techtip6and click on “Finish”. Now you can see WildFly configured in NetBeans:

    wildfly-server-techtip6

  6. Right-click on the newly added server and select “Start”:wildfly-start-techtip6to see an output something like:

    “09:51:29,191 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.0.0.Beta2-SNAPSHOT “WildFly” started in 2039ms – Started 184 of 232 services (78 services are lazy, passive or on-demand)”

    in the output console.

That’s all it takes to configure WildFly 8 in NetBeans 8!

Trying to run a simple sample showed the following window:

netbeans-server-one-time-techtip6

I particularly like this feature as it does not “corrupt” my Maven files or generate any IDE-specific files.

Do you want to try running Java EE 7 samples/tests and hands-on lab on WildFly from NetBeans ? File plugin bugs at NetBeans Bugzilla and use “WildFly” component.

Note, although this plugin can be installed in NetBeans 8 out-of-the-box, but you can configure an additional Update Center in earlier versions of NetBeans and use “http://deadlock.netbeans.org/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz” URL. This is how I hacked my NetBeans 7.4 installation and added support for WildFly there.

Get your wheels churning and try your WildFly applications running from NetBeans 8.

Be Sociable, Share!

27 thoughts on “NetBeans 8 and WildFly 8 (Tech Tip #6)

  1. Hi Arun,

    Unfortunately, this does not seem to working for me. I can install the plugin and start/stop WildFly, as well as manually deploy applications, but deploying from NetBeans gives me the following error:

    /Users/Steven/Desktop/WFTest/nbproject/build-impl.xml:1071: Deployment error.
    See the server log for details.
    BUILD FAILED (total time: 0 seconds)

    where line 1071 is the second line below:

    This was using NetBeans’ default Java Web Application. When using a Maven Web Application, I get the following:

    NetBeans: Deploying on WildFly 8
    profile mode: false
    debug mode: false
    force redeploy: true
    (hangs here)

    The “Select depolyment server” window you mentioned never appears.

    I am running NetBeans 8 (201312190002) on JDK 8 b120 and WildFly 8 Beta 1 on JDK 7u45.

  2. Hi Arun.

    I’m trying to add the Dev Update Center to my NetBeans 8.0 RC1, but I’m getting a timeout. Checked our company Firewall and *.netbeans.org is white-listed. Is this server still up? Any other way to get the plugin? Like manually downloading and adding it to NetBeans?

    Thanks.

  3. Hello
    I tried with 8.0 RC1 but is not working. It said Calling “H:\Java\Jboss-Wildfly\wildfly-8.0.0.Final\bin\standalone.conf.bat” not useable.

  4. i ran in a cpuple issues trying to make a little web app, first one:

    i followed a couple totorials on configuring datasources and mysql driver in wildfly8, and my datasources were visible on the servers section tab on netbeans BUT when i tried to create a persistence unit, my newly created datasource did not show up on the combobox.
    after several minutes looking around i figured out that netbeans (i dont know why) uses the standalone-ha.xml configuration file, instead of the standalone.xml… this one was not an issue anymore.

    BUT… here comes the second (unresolved) issue:

    if i try the “new entity classes from database” wizard in netbeans, it just keeps asking me to select a datasource, i cant select any of the previously configured ones, just lets me create a new one… buf after creating one, ift just get forgotten and netbeans asks again for a datasource… is this netbeans problem? or has this something to do with the wildfly plugin?????????????

    😐

  5. My problem solved with uncheck browser proxy settings. I have the same problem with datasources like Omar. I made datasource for postgresql when I tested connection in wildfly web management program wildfly says connection successfull. Netbeans says insert driver for databases. I do , but it is not working.

  6. I have this Exception when I Start server

    java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
    at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:119)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:338)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:291)
    at org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:300)
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:542)
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:97)
    at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:300)
    at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:262)
    at java.util.logging.LogManager$3.run(LogManager.java:399)
    at java.util.logging.LogManager$3.run(LogManager.java:396)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
    at java.util.logging.LogManager.access$800(LogManager.java:145)
    at java.util.logging.LogManager$2.run(LogManager.java:345)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
    at java.util.logging.LogManager.getLogManager(LogManager.java:378)
    at org.jboss.modules.Main.main(Main.java:443)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:117)
    ... 17 more
    Caused by: java.io.FileNotFoundException: /opt/wildfly-8.1.0.Final/standalone/log/server.log (Aucun fichier ou dossier de ce type)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.(FileOutputStream.java:206)
    at org.jboss.logmanager.handlers.FileHandler.setFile(FileHandler.java:154)
    at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setFile(PeriodicRotatingFileHandler.java:105)
    at org.jboss.logmanager.handlers.FileHandler.setFileName(FileHandler.java:192)
    at org.jboss.logmanager.handlers.FileHandler.(FileHandler.java:122)
    at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.(PeriodicRotatingFileHandler.java:73)
    ... 22 more
    java.lang.IllegalStateException: JBAS018704: Could not create server data directory: /opt/wildfly-8.1.0.Final/standalone/data
    at org.jboss.as.server.ServerEnvironment.(ServerEnvironment.java:411)
    at org.jboss.as.server.Main.determineEnvironment(Main.java:262)
    at org.jboss.as.server.Main.main(Main.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.jboss.modules.Module.run(Module.java:312)
    at org.jboss.modules.Main.main(Main.java:460)

  7. Used versions
    Ubuntu 14.04
    Wildfly-8.1.0.Final
    java version “1.8.0_05”
    Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
    Java HotSpot(TM) Server VM (build 25.5-b02, mixed mode)

  8. I am able to install Wildfly 8 server on Netbeans 8. I can start it without any problem from within IDE. But, could not stop it.

  9. When you try to stop it, it just hangs and timeout message is displayed.
    Could only stop running: jboss-cli.bat
    Then: connect
    Finally: shutdown

    In the Netbeans 8, it doesn’t stop by the right click and stop option.

  10. Bilal,

    I’ve had the same problem.
    This fixed it for me:

    cd /opt/wildfly-8.1.0.Final/standalone/
    mkdir log
    mkdir data
    chmod a+w log
    chmod a+w data
    chmod a+w deployments
    </pre

  11. We’re currently developing our in-house Java EE application under JDeveloper 10 with oc4j and TopLink native, but deplopy the production version with JBoss. We use a “fat” Swing client application. It’s not a satisfying combination and I’m trying to move on, possibly to NetBeans, Jboss/Wildfly and EclipseLink.
    One thing I really like about JDeveloper and oc4j is that I can re-compile a single class on the fly in a debugging session, in a split-second, as long as method signatures don’t change. Can anything like that be achieved in Netbeans with WildFly (or any other J2EE server)?

Leave a Reply

Your email address will not be published. Required fields are marked *