Miles to go 2.0 …

Arun Gupta is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, Devoxx4Kids-er, and a Red Hatter.

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!
  • Tweet

Tags: , ,

23 Responses to “NetBeans 8 and WildFly 8 (Tech Tip #6)”

  1. Steven Van Impe says:

    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. ehsavoie says:

    Hi,
    Some people have encountered this issue. I didn’t meet it during the whole development phase.
    Could you please open a bug and upload the Wildfly and Netbeans log to it :
    there is a category for Wildfly in serverplugins.
    https://netbeans.org/bugzilla/enter_bug.cgi?product=serverplugins

  3. […] ← NetBeans 8 and WildFly 8 (Tech Tip #6) […]

  4. pecador says:

    Hi,

    I coluld not found Wildfly plugin for NB 7.4 on plugin center. Is it just available for NB 8?

  5. arungupta says:

    You need to explicitly add Dev Update Center in NetBeans, the URL for the same is:

    http://deadlock.netbeans.org/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz

    More details on the process at:

    http://wiki.netbeans.org/FaqAddingNewUpdateCenter

  6. netbeans8-plug-in_WildFly | mauroprogram's Blog says:

    […] http://blog.arungupta.me/2013/12/netbeans8-and-wildfly8-techtip-6/ […]

  7. Se viene el NetBeans 8 | says:

    […]  Lo había ya mencionado Arun Gupta en su blog. La integración de NetBeans 8 con Wildfly es posible. […]

  8. Kay Wrobel says:

    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.

  9. arungupta says:

    Kay,

    Seems like deadlock.netbeans.org is down. Even http://www.downforeveryoneorjustme.com/deadlock.netbeans.org reports the same.

    Try in a few hours ?

  10. Joe says:

    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.

  11. arungupta says:

    Joe,

    Make sure you are using the latest WildFly plugin. What version are you using ?

  12. omar says:

    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?????????????

    :|

  13. Joe says:

    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.

  14. Florian Brunner says:

    The plugin doesn’t show up in the final release of NetBeans 8.

  15. Florian Brunner says:

    Another user mentioned the plugin is still available in the nightly version:

    http://stackoverflow.com/questions/23081092/add-plugin-for-wildfly-application-server-to-netbeans?noredirect=1#comment35285357_23081092

    Could you add it to the final version as well?

  16. arungupta says:

    I was hoping it would be resolved by now. Sent another reminder email to the involved folks and will keep you updated.

  17. Bilal Soidik says:

    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)

  18. Bilal Soidik says:

    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)

  19. Bikram says:

    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.

  20. arungupta says:

    Bikram,

    What happens when you try to stop it ?

  21. Jake says:

    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.

  22. Kristof Neirynck says:

    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

Leave a Reply

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


× 2 = ten

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>