openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Lee" <>
Subject openjpa.Configuration Logging Channel Problem
Date Fri, 27 Jul 2007 16:48:43 GMT
Is OpenJpa supporting "openjpa.Configuration" log channel?  According to the
1.  Logging Channels

Logging is done over a number of *logging channels*, each of which has
a *logging
level* which controls the verbosity of log messages recorded for the
channel. OpenJPA uses the following logging channels:


    openjpa.Configuration: Messages issued by the configuration

it is supported feature, however when it is specified, e.g.

     <property name="openjpa.Log" value="Configuration=TRACE"/>

the following exception is thrown at runtime:

Exception in thread "main" <0.0.0 fatal general error>
org.apache.openjpa.persistence.PersistenceException: There was an error when
invoking the static newInstance method on the named factory class "
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory".  See the nested exception
for details.
    at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(
    at javax.persistence.Persistence.createEntityManagerFactory(
    at javax.persistence.Persistence.createEntityManagerFactory(
    at suite.r70.jse.EntityTest.main(
Caused by: org.apache.openjpa.lib.util.ParseException:
org.apache.openjpa.lib.log.LogFactoryImpl@6ac66ac6.Configuration = TRACE
    at org.apache.openjpa.lib.util.Options.setInto(
    at org.apache.openjpa.lib.util.Options.setInto(
    at org.apache.openjpa.lib.conf.Configurations.configureInstance(
    at org.apache.openjpa.lib.conf.Configurations.configureInstance(
    at org.apache.openjpa.lib.conf.PluginValue.instantiate(
    at org.apache.openjpa.lib.conf.ObjectValue.instantiate(
    at org.apache.openjpa.lib.conf.ConfigurationImpl.getLogFactory(
    at org.apache.openjpa.lib.conf.ConfigurationImpl.getLog(
    at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getConfigurationLog(
    at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newInstance(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.apache.openjpa.kernel.Bootstrap.invokeFactory(
    at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(
    ... 6 more
Caused by: java.lang.NoSuchMethodException:
    at java.lang.Class.throwNoSuchMethodException(
    at java.lang.Class.getConstructor(
    at org.apache.openjpa.lib.util.Options.stringToObject(
    at org.apache.openjpa.lib.util.Options.setInto(
    ... 22 more

One can work around the problem by using "openjpa.Configuration" instead of

A few other observations:
1) I grep for "openjpa.Configuration" from all the java files and nowhere
this string is found. I can found the other log channel names (e.g.
openjpa.Runtime, openjpa.Enhance) in either or
2) When I debug the problem and stop in LogFactoryImpl.getLog() method and
no one is calling this method with "openjpa.Configuration" channel. So it
seems no "configuration" information is being logged.
3) The exception is caused by the Options class trying to reflect and find
the constructor from the interface with a String
argument. The reason it gets to this path is because
Options.matchOpetionToMember() found a setConfiguration() method in
4) There is a "openjpa.jdbc.Schema" log channel defined in but not document in the manual.
5) The same scenario works in the 0.9.7 level, so something was changed
since then.

>From the investigation:
1) It looks like "openjpa.Configuration" is not being used at all. If so,
the manual need to remove the openjpa.Configuration in the Logging Channels
2) If it is still supported, then there is a bug somewhere.
3) The logging channels section in the manual needs to add the "
openjpa.jdbc.Schema" log channel.
4) If user uses the incorrect logging channel name, a warning/error message
should be posted instead of the observed exception.

Are these valid observations and interpretations?

Albert Lee.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message