On 29/04/2007, at 1:13 PM, Curt Arnold wrote:


On Apr 28, 2007, at 4:32 PM, Paul Smith wrote:


On 28/04/2007, at 10:16 PM, Curt Arnold wrote:

Did you svn update, rebuild and install log4j 1.2.15? The fragment of DTD that shines through in the warnings is prior to the recent changes to log4j 1.2.15.

Definitely, several times.


I found a bug in component, but I don't think it affected you. Also the Ant build was out of sync. I'm thinking the likely culprit is an Maven built log4j 1.2.15 triggering chaos due to a missing log4j.dtd resource.

My suggestions:

a) If you built log4j 1.2.15 with Maven, remove it from the repository, build it with Ant and install it using mvn install:install-file (attempt to build the bridge and it will tell you the syntax). The Maven build doesn't include the log4j.dtd, LICENSE, NOTICE and other resources that the Ant build places in the Jar.

I've been doing this in the 1.2 source treee for the last week or so, to keep my local maven repo up2date with the 1.2.15

ant clean jar
mvn install:install-file -DgroupId=log4j -DartifactId=log4j - Dversion=1.2.15 -Dpackaging=jar -Dfile=/workspace/log4j12/dist/lib/ log4j-1.2.15.jar

b) svn update component and mvn install

c) Try to run the tests again on a fresh checkout. If the test fails under Maven, try the ant build.

If eclipse and ant pass and maven fails, then we should take take it to [EMAIL PROTECTED] I would suggest before doing that downloading and installing a Gump built log4j 1.2.15 and trying the process again. It would make it easier for any Maven guru debugging the issue to not have to learn how to build log4j.

Weird, works with ant, but in Eclipse (maven plugin) and with maven I now get a somewhat different error (see results further below). I now get a NoSuchMethodError:

java.lang.NoSuchMethodError: org.apache.log4j.spi.LocationInfo.<init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/ String;)V at org.apache.logging.julbridge.JULLog4jEventConverter.convert (JULLog4jEventConverter.java:124) at org.apache.logging.julbridge.JULBridgeHandler.publish (JULBridgeHandler.java:49)
        at java.util.logging.Logger.log(Logger.java:428)
        at java.util.logging.Logger.doLog(Logger.java:450)
        at java.util.logging.Logger.log(Logger.java:473)
        at java.util.logging.Logger.info(Logger.java:992)
at org.apache.log4j.jul.JULReceiverTest.testJULReceiverPluginConfiguration( JULReceiverTest.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

What's interesting is that if I blow away the log4j section of my local maven repo, then install the 1.2.15 jar into the repo, when I run 'mvn test' inside the JULI bridge, I see this:

Paul-Smiths-Computer:/workspace/juli-log4j-bridge paulsmith$ mvn test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------ ---- [INFO] Building Unnamed - org.apache.logging:apache-juli-log4j- bridge:jar:0.1.0
[INFO]    task-segment: [test]
[INFO] ------------------------------------------------------------------------ ----
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://repo1.maven.org/maven2/log4j/log4j/1.2.15/ log4j-1.2.15.pom Downloading: http://repo1.maven.org/maven2/log4j/log4j/1.2.14/ log4j-1.2.14.pom
2K downloaded
[INFO] [compiler:compile]
.....

It seems to want to download the 1.2.14 stuff, but I can't see why exactly.

How was the build.xml generated? Is the build.xml file generated from maven?

I'm going to commit my local change for now and try the maven list.



[ant test versus mvn test]


Paul-Smiths-Computer:/workspace/juli-log4j-bridge paulsmith$ ant test
Buildfile: build.xml

init:

compile:

test-compile:

test:
    [junit] Running org.apache.log4j.jul.JULReceiverTest
    [junit] Testsuite: org.apache.log4j.jul.JULReceiverTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.641 sec [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.641 sec
    [junit] ------------- Standard Output ---------------
    [junit] log4j: Threshold ="null".
    [junit] log4j: Pushing plugin on to the object stack.
    [junit] log4j: Level value for root is  [debug].
    [junit] log4j: root level set to DEBUG
    [junit] ------------- ---------------- ---------------
    [junit]
    [junit] Testcase: testJULReceiverPluginConfiguration took 0.629 sec
    [junit] Running org.apache.logging.julbridge.JULLog4jBridgeTest
    [junit] Testsuite: org.apache.logging.julbridge.JULLog4jBridgeTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.128 sec [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.128 sec
    [junit]
    [junit] Testcase: testBridgeJULLogger took 0.119 sec
    [junit] Testcase: testLocationInfo took 0.001 sec
    [junit] Testcase: testAbsorbedIntoTheLog4jCollective took 0.002 sec
    [junit] Testcase: testJULLevelConfigurationChanges took 0 sec

BUILD SUCCESSFUL
Total time: 2 seconds
Paul-Smiths-Computer:/workspace/juli-log4j-bridge paulsmith$ mvn test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------ ---- [INFO] Building Unnamed - org.apache.logging:apache-juli-log4j- bridge:jar:0.1.0
[INFO]    task-segment: [test]
[INFO] ------------------------------------------------------------------------ ----
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: /workspace/juli-log4j-bridge/target/ surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.logging.julbridge.JULLog4jBridgeTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.228 sec
Running org.apache.logging.julbridge.TestLogPosting
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec
Running org.apache.log4j.jul.JULReceiverTest
log4j: Threshold ="null".
log4j: Pushing plugin on to the object stack.
log4j: Level value for root is  [debug].
log4j: root level set to DEBUG
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.365 sec <<< FAILURE!

Results :

Failed tests:
testJULReceiverPluginConfiguration (org.apache.log4j.jul.JULReceiverTest)

Tests run: 6, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Sun Apr 29 13:42:01 EST 2007
[INFO] Final Memory: 4M/9M
[INFO] ------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to