Quick Install of WildFly 13 for Development

This is a quick revisit of a topic I covered earlier at this site with a couple up updates to address WildfFly 13.


I just started playing with WildFly 13. The WildFly project is well into the process of incorporating Java/Jakarta EE features. I believe at this time that WildFly will be EE 8 compliant when the project releases WildFly 14. But, I’d like to play with these features now so it is really nice that WildFly 13 has a startup mode to let one use EE 8.

Roadmap information on any application server is best read directly from the project so check out the release page for WildFly 13 from May:

Below is a quick recipe for getting WildFly onto your development machine quickly. So, here we go.

Open a terminal, get WildFly and fire it up…

$ mkdir ~/bin
$ cd ~/bin
$ wget --tries=0 --continue http://download.jboss.org/wildfly/13.0.0.Final/wildfly-13.0.0.Final.tar.gz
$ tar -xvzf wildfly-13.0.0.Final.tar.gz
$ ln -s wildfly-13.0.0.Final wildfly
$ ~/bin/wildfly/bin/standalone.sh -c standalone-ee8.xml

(The standalone-ee8.xml configuration fire turns on all the new EE 8 stuff)

Leave WildFly running and fire up a new terminal window…

$ cd ~/bin/wildfly/bin
$ ./add-user.sh -u wildfly -p wildfly -r ManagementRealm

(Please use a WAY better username and password even in development.)

At this point WildFly is running, you have established a management user and can connect to the web console at

I use PostgreSQL most often so let’s add a driver for that. It will also be handy to have this driver installed later If I need to add a jdbc realm for authentication and of course PostgreSQL data sources for the WildFly application server to use in conjunction with your application.

$ cd /tmp
$ wget --tries=0 --continue https://jdbc.postgresql.org/download/postgresql-42.2.4.jar
$ cd ~/bin/wildfly/bin
$ ./jboss-cli.sh --connect
[ standalone@ ] module add --name=org.postgresql --resources=/tmp/postgresql-42.2.4.jar --dependencies=javax.api,javax.transaction.api
[ standalone@ ] /subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgresql",driver-class-name=org.postgresql.Driver)
[ standalone@ ] \q
When you are ready to setup a datasource later on using the posgresql jdbc driver the command you issue will be similar to:
[ standalone@ ] data-source add --jndi-name=java:jboss/datasources/YourSourceDS --name=YourDataSourceDS --connection-url=jdbc:postgresql://localhost:5432/yourdatabasename --driver-name=postgres --user-name=yourPostgresqlUsername --password=yourPostgresqlPassword

Also, most of my projects have a GIS component or require some GIS functionality so let’s add that why we are setting up WildFly in our dev environment. BTW, with a little luck this next step will be easier in the future. I’ve put in a feature request with the folks on the WildFly team who work closely with the folks on the Hibernate ORM team.

These requests are at:

In the mean time switch back to the terminal where WildFly is running and enter Ctrl-C to stop the server. We’ll add the spatial component to Hibernate in WildFly manually.

$ cd ~/bin/wildfly/modules/system/layers/base/org/hibernate/main
$ mvn dependency:copy -Dartifact=org.hibernate:hibernate-spatial:5.3.1.Final:jar -DoutputDirectory=.
$ mvn dependency:copy -Dartifact=org.geolatte:geolatte-geom:1.3.0:jar -DoutputDirectory=.
$ mvn dependency:copy -Dartifact=org.hibernate:hibernate-spatial:5.1.14.Final:jar -DoutputDirectory=.
$ mvn dependency:copy -Dartifact=org.geolatte:geolatte-geom:1.0.6:jar -DoutputDirectory=.

Now, edit the module.xml file found in this same directory (~/bin/wildfly/modules/system/layers/base/org/hibernate/main)

Add the following snippet to the bottom of the <resources> section of the file:

<resource-root path="hibernate-spatial-5.3.1.Final.jar"> <!-- ${version.org.hibernate53} -->
<property-equal name="ee8.preview.mode" value="true"/>
<resource-root path="hibernate-spatial-5.1.14.Final.jar">
<property-not-equal name="ee8.preview.mode" value="true"/>

<resource-root path="geolatte-geom-1.3.0.jar"> <!-- ${version.org.hibernate53} -->
<property-equal name="ee8.preview.mode" value="true"/>
<resource-root path="geolatte-geom-1.0.6.jar">
<property-not-equal name="ee8.preview.mode" value="true"/>

Add the following snippet to the <dependencies> section of the file:

<module name="org.slf4j"/>
<module name="org.postgresql"/>

Finally, fire WildfFly back up…

$ cd ~/bin
$ ~/bin/wildfly/bin/standalone.sh -c standalone-ee8.xml

At this point you should be all set to use the new EE 8 stuff on your development machine.
Below are a few links to pages on my own blog you may find helpful as you get to know WildFly or see warnings. They reference older versions of WildFly but should still be useful:
Of, course hit https://WildFly.org for other specific tips and tricks.

And, I recommend joining the mailing lists for WildFly. The folks on this project seem really nice and I pick up a lot of tips and tricks just following along on various threads. Watching the commits to the project on GitHub is also a plus for anyone new to WildFly as you can watch the project evolve in real time.

Good luck with your project!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s