tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Bounds <>
Subject Re: log4j 2 : JDBC Appender
Date Wed, 23 Sep 2015 05:50:58 GMT
Hi Romain,

many thx for the help, I appreciate that!

I am going for tomee.xml and openejb:Resource/jdbc/LoggingDB, just as you
Using the Resource node as it was, resulted in a failure (listed at the very

After moving some of the attributes to the node body (all these
configuration properties) and renaming the node attribute 'factory' to
'factory-name' it ... wow! ... it worked just fine.
The jndi name is "openejb:Resource/jdbc/LoggingDB".

Here comes a short listing of my working log4j2 pooled JDBC appender example
for sake of completeness and interested fellow TomEE users (and yes, I am
using Maven now):

<Resource id="jdbc/LoggingDB"
      auth      Container
      maxActive 100
      maxIdle   30
      maxWait   10000
      username  valid-user-name
      password  valid-pwd
      driverClassName com.mysql.jdbc.Driver
      url jdbc:mysql://localhost/Logging

<JDBC name="databaseAppender" tableName="logging">
            <DataSource jndiName="openejb:Resource/jdbc/LoggingDB" />
            <Column name="EVENT_DATE" isEventTimestamp="true" />
            <Column name="LEVEL" pattern="%level" />
            <Column name="LOGGER" pattern="%logger" />
            <Column name="MSG" pattern="%message" />
            <Column name="THROWABLE" pattern="%ex{full}" />


initial tomcat output:
org.apache.openejb.OpenEJBException: Unable to read OpenEJB configuration
file at
Unsupported Attribute(s): name, auth, factory, maxActive, maxIdle, maxWait,
username, password, driverClassName, url.
Supported Attributes are: type, jar, provider, id, class-name, constructor,
factory-name, classpath, jndi, aliases, properties-provider.  If the setting
is a configuration property it must be placed inside the element body.

View this message in context:
Sent from the TomEE Users mailing list archive at

View raw message