Wildfly and auto reconnect to the database

This working on Wildfly 8.1: <datasource jta=”true” jndi-name=”java:jboss/datasources/xxxdb” pool-name=”xxxxDB” enabled=”true” use-ccm=”false”> <connection-url>jdbc:mysql://localhost:3306/xxxdb?autoReconnect=true&amp;amp;useUnicode=true&amp;amp;characterEncoding=UTF-8</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <driver>mysql-connector-java-5.1.26-bin.jar</driver> <security> <user-name>xxxuser</user-name> <password>xxxpassword</password> </security> <validation> <check-valid-connection-sql>select 1</check-valid-connection-sql> <validate-on-match>false</validate-on-match> <background-validation>true</background-validation> <background-validation-millis>10000</background-validation-millis> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource>

Upgrade JSF / Mojarra in JBoss AS / EAP / WildFly

The below procedure applies to JBoss AS 7.2+, JBoss EAP 6.1+, and JBoss WildFly 8+ and assumes that you’ve full control over the server installation and configuration. This upgrades the server-wide default JSF version: Download the individual Mojarra API and impl files (and thus not the single javax.faces.jar file). Current latest 2.1.x version is 2.1.29 … Read more

How to configure Wildfly to serve static content (like images)?

Add another file handler and another location to the undertow subsystem in standalone.xml: <server name=”default-server”> <http-listener name=”default” socket-binding=”http”/> <host name=”default-host” alias=”localhost”> <location name=”https://stackoverflow.com/” handler=”welcome-content”/> <location name=”/img” handler=”images”/> </host> </server> <handlers> <file name=”welcome-content” path=”${jboss.home.dir}/welcome-content” directory-listing=”true”/> <file name=”images” path=”/var/images” directory-listing=”true”/> </handlers>

JBoss WildFly: Starts but can’t connect?

By default jboss/wildfly binding to localhost, if you want change this, you can execute: standalone.sh -b 0.0.0.0 listen on all IP addresses of the machine (if multihomed) Another alternative is configure in standalone.xml the interfaces section. Change: <interfaces> <interface name=”management”> <inet-address value=”127.0.0.1″/> </interface> <interface name=”public”> <inet-address value=”127.0.0.1″/> </interface> </interfaces> to: <interfaces> <interface name=”management”> <!– Use … Read more

How do I Install JBoss AS / WildFly Server in Eclipse for Java EE

Install the most recent JBoss Tools. Go to Help > Install New Software. Set Work with to the following URL depending on Eclipse version: 4.8+ (Photon): https://download.jboss.org/jbosstools/photon/stable/updates/ 4.7 (Oxygen): http://download.jboss.org/jbosstools/oxygen/stable/updates/ 4.6 (Neon): https://download.jboss.org/jbosstools/neon/stable/updates/ 4.5 (Mars): http://download.jboss.org/jbosstools/mars/stable/updates/ 4.4 (Luna): http://download.jboss.org/jbosstools/updates/stable/luna/ 4.3 (Kepler): http://download.jboss.org/jbosstools/updates/stable/kepler/ 4.2 (Juno): http://download.jboss.org/jbosstools/updates/stable/juno/ 3.7 (Indigo): http://download.jboss.org/jbosstools/updates/stable/indigo/ 3.6 (Helios): http://download.jboss.org/jbosstools/updates/stable/helios/ Press Enter In the … Read more

Jboss AS7 Deployment warning : does not point to a valid jar for a Class-Path reference

This is just a warning that you can in most cases safely ignore. What it tells you is that in your struts-1.2.9.jar has in META-INF/MANIFEST.MF in Class-Path reference to “commons-beanutils.jar” and that this file/jar cannot be referenced. But given that you have commons-beanutils-1.7.0.jar there everything will work fine. To get rid of the warning you … Read more

How to change default port 8080 in WildFly

In your standalone.xml file, look for this element: <socket-binding-group name=”standard-sockets” default-interface=”public” port-offset=”${jboss.socket.binding.port-offset:0}”> The port-offset attribute lets you modify all the ports wildfly uses, by adding the number you specify. For example, the default value is 0, which means that http port will be 8080, remoting 4447, etc. If you use ${jboss.socket.binding.port-offset:100}, http port will be … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)