Is there any way to have the JBoss connection pool reconnect to Oracle when connections go bad?

Whilst you can use the old “select 1 from dual” trick, the downside with this is that it issues an extra query each and every time you borrow a connection from the pool. For high volumes, this is wasteful. JBoss provides a special connection validator which should be used for Oracle: <valid-connection-checker-class-name> org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker </valid-connection-checker-class-name> This … Read more

Hot deploy on JBoss – how do I make JBoss “see” the change?

I had the same problem in my bundle: (Eclipse IDE + JBoss server adapter) + JBoss AS 7.0.1 (community project). My solution is very simple – you should go to JBoss administrative panel (by default localhost:9990), there in profile settings open Core – Deployment Scanners. Turn on Autodeploy-Exploded (set to true), and by your wishes … Read more

java.lang.AbstractMethodError: org.apache.xerces.dom.ElementImpl.getTextContent()Ljava/lang/String

java.lang.AbstractMethodError: org.apache.xerces.dom.ElementImpl.getTextContent()Ljava/lang/String; This will happen when there are Xerces JAR files in your WAR’s /WEB-INF/lib (or even JRE’s /lib) which is of an older version than the one internally used by the servletcontainer. The older version, which apparently implements JAXP of Java 1.4.2 or older, is missing the mentioned method which was introduced in JAXP … Read more

Override logging in WildFly

You can use logback to configure logging in your application. You can’t use logback to configure logging for the server. To use logback in your configuration you’ll need to change the add-logging-api-dependencies to false or create a jboss-deployment-structure.xml that excludes the subsystem. You’ll also need to include logback and slf4j in your deployment. The first … Read more

PSQLException: current transaction is aborted, commands ignored until end of transaction block

I got this error using Java and PostgreSQL doing an insert on a table. I will illustrate how you can reproduce this error: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block Summary: The reason you get this error is because you have entered a transaction and one of your SQL … 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 debugging in Eclipse

You mean remote debug JBoss from Eclipse ? From Configuring Eclipse for Remote Debugging: Set the JAVA_OPTS variable as follows: set JAVA_OPTS= -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS% or: JAVA_OPTS=”-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS” In the Debug frame, select the Remote Java Application node. In the Connection Properties, specify localhost as the Host and specify the Port as … Read more