Skip to main content

Welcome to Geoff Hayward's Weblog

Commenting on Java, JavaFX, Java EE, Joomla, and IoT.

I have been struggling to configure the Java EE WildFly application server's Logging subsystem. I was finding that any changes to the configuration within domain.xml where not making any difference to what was or was not actually being logged. I finally got to the bottom of the issue.

The project, I am working on, used to run with embedded Jetty. This means some old configuration files have hung around erroneously. The old configuration files should have been deleted - but never was.

What I have learnt: WildFly's Logging subsystem uses deployment level configuration over container level configuration by default. That means old Log4j configuration files were being read by WildFly. Once I removed the old Log4j configuration files WildFly began logging as expected.

I have found out that any of the file names in the following list documented by Ritchie (2014) will be read as deployment level configuration by WildFly.

  • logging.properties
  • jboss-logging.properties
  • log4j.properties
  • log4j.xml
  • jboss-log4j.xml

Hope this helps.


Ritchie, C. 2014. WildFly Configuration, Deployment, and Administration (Second Edition), Packt Publishing, p 56.



Read

I have been trying to put an older embedded Jetty served application onto Java 8. The application's JSP files where, however, not compiling. This delayed having the benefits Java 8 brings to development.

After a lot of digging I discovered that the Mavan 'org.mortbay.jetty' namespace (a.k.a. groupid) had been superseded by 'org.eclipse.jetty'. The newer development and fixes by the Jetty project are in the later namespace. Therefore, by replacing the old 'org.mortbay.jetty' dependency:

<dependency>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>jsp-2.1-glassfish</artifactId>
  <version>9.1.02.B04.p0</version>
</dependency>

with the new 'org.eclipse.jetty'. dependency:

<dependency>
  <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-jsp</artifactId>
  <version>9.3.0.M1</version>
</dependency>

the JSP's compile and the older project now works with Java 8.



Read

Mailing List

Responsive Media

With the ResponsiveMedia plugin for Joomla it is easy to add 3rd party content from YouTube, Vimeo, and Instagram right in to any Joomla! article.

ResponsiveMedia