Issue Details (XML | Word | Printable)

Key: NUCACCESS-105
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Testcase Required Testcase Required
Assignee: Unassigned
Reporter: Andrew Bourgeois
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus AccessPlatform

logging.properties loaded before Maven dependencies are loaded

Created: 21/Oct/12 02:07 AM   Updated: 15/Nov/12 03:38 PM   Resolved: 31/Oct/12 09:01 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Severity: Development


 Description  « Hide
Try pointing towards a logging.properties file with the following content:

"# register SLF4JBridgeHandler as handler for the j.u.l. root logger
handlers = org.slf4j.bridge.SLF4JBridgeHandler

.level = ALL

DataNucleus.General.level=fine
DataNucleus.JDO.level=fine"

The dependency containing that handler is this one:

<!-- DataNucleus uses java.util.Logging, this is needed to forward the calls to SLF4J -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>1.7.2</version>
</dependency>

What you'll get when your JVM starts:

Bad level value for property: DataNucleus.JDO.level
Bad level value for property: DataNucleus.General.level
Can't load log handler "org.slf4j.bridge.SLF4JBridgeHandler"
java.lang.ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler
java.lang.ClassNotFoundException: org.slf4j.bridge.SLF4JBridgeHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.util.logging.LogManager$3.run(LogManager.java:418)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:405)
at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1076)
at java.util.logging.LogManager.access$1100(LogManager.java:148)
at java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:1157)
at java.util.logging.Logger.log(Logger.java:521)
at java.util.logging.Logger.doLog(Logger.java:543)
at java.util.logging.Logger.log(Logger.java:566)
at java.util.logging.Logger.fine(Logger.java:1117)
at com.google.inject.internal.util.$Stopwatch.resetAndLog(Stopwatch.java:47)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:149)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:450)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:186)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:153)
at org.apache.maven.cli.MavenCli.container(MavenCli.java:375)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:191)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Andy Jefferson added a comment - 21/Oct/12 02:05 PM
I have no problem with logging. Loggers are created statically and only when the NucleusLogger is utilised, with what is in the CLASSPATH. A testcase demonstrating any "problem" is required with all issues marked as "Bug" since being unable to see something precludes it from any consideration

Andy Jefferson made changes - 21/Oct/12 02:05 PM
Field Original Value New Value
Priority Major [ 3 ] Incomplete [ 6 ]
Andy Jefferson added a comment - 31/Oct/12 09:01 AM
Repost here if you have a way of reproducing this

Andy Jefferson made changes - 31/Oct/12 09:01 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Cannot Reproduce [ 5 ]
Andy Jefferson made changes - 15/Nov/12 03:38 PM
Status Resolved [ 5 ] Closed [ 6 ]