Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #2187 (closed)

Opened 14 years ago

Closed 12 years ago

Bug: fix log4j.xml usage in build

Reported by: jamoore Owned by:
Priority: minor Milestone: OMERO-4.4
Component: General Version: n.a.
Keywords: n.a. Cc: jburel
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-12-13 (4)

Description (last modified by jmoore)

log4j.xml gets found on the classpath and then prints nasty stack traces (see below). This is caused by the fact that the log4j.xml used in the server is file based as opposed to console based.

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: (No such file or directory)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:177)
at java.io.FileOutputStream.(FileOutputStream.java:102)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:167)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:220)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)
at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)
at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:394)
at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:829)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
at org.apache.log4j.LogManager.(LogManager.java:122)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:349)
at org.openmicroscopy.shoola.env.log.LoggerImpl.(LoggerImpl.java:81)

Attachments (1)

build.log (227.6 KB) - added by drussell-x 12 years ago.
Build-log with log4j error

Download all attachments as: .zip

Change History (10)

comment:1 Changed 13 years ago by jmoore

  • Milestone changed from Unscheduled to OMERO-Beta4.4

comment:2 Changed 12 years ago by jburel

  • Cc jburel added

comment:3 Changed 12 years ago by jmoore

  • Description modified (diff)

comment:4 Changed 12 years ago by jmoore

  • Remaining Time set to 0.0
  • Resolution set to fixed
  • Sprint set to 2011-12-13 (4)
  • Status changed from new to closed

Fixed as a part of my insight-build branch (pushed) by copying lib/log4j-build.xml to target/classes as log4j.xml rather than copying etc/log4j.xml. If the insight component would rather not have anything copied, we can do that to. The log4j-build.xml may need to be tweaked for all of our uses.

comment:5 Changed 12 years ago by jmoore <josh@…>

  • Remaining Time changed from 0.0 to 0

(In [5861c580593fb6d4123a439931085fbfb334139a/ome.git]) Use log4j-build.xml for all components (Fix #2187)

comment:6 Changed 12 years ago by jmoore <josh@…>

(In [3d9c13da270714afc08b2fabce754abf920ff88c/ome.git]) Fix testng log warning (See #2187)

comment:7 Changed 12 years ago by jmoore

  • Resolution fixed deleted
  • Status changed from closed to reopened

Seen again by Douglas.

Changed 12 years ago by drussell-x

Build-log with log4j error

comment:8 Changed 12 years ago by drussell-x

build.log demonstrates reoccurrence of this problem. Simply running "ant" on omero root.

comment:9 Changed 12 years ago by jmoore

  • Resolution set to fixed
  • Status changed from reopened to closed

My guess is that this is due to your building 4.3 (which is not a bad thing). It just means that my commits are present to clean up the output. I'm re-closing, but feel free to re-open if I'm wrong.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.77614 sec.)

We're Hiring!