[Thread Prev][Thread Next][Index]

Re: [las_users] addXML giving an error


On Wed, Jan 18, 2012 at 4:47 PM, John Relph <john.relph@xxxxxxxx> wrote:
On Wed, Jan 18, 2012 at 5:16 PM, Roland Schweitzer <roland.schweitzer@xxxxxxxx> wrote:

The location of the log is determined by the log4j.xml file that is in the class path of the addXML.jar.  The build process should be one in there that logs to standard out, but for some reason there seems to be one in there that is logging to the LAS logs.

Try this:
jar -tvf addXML.jar | grep log4j.xml to see where they are, jar -xvf addXML.jar log4j.xml (the default location is in the top level).

Once you pull it out of the jar you can see what it says. Then you'll have to replace it with one that does not reference the LAS logs.  You can find one in LAS_HOME/JavaSource/gov/noaa/pmel/tmap/addxml in the distribution.

The jar file is in LAS_HOME/dist/lib.  

In the end, the easiest thing to do is just rebuild it. From LAS_HOME

ant addxml-clean
ant addxml-build

But won't this break my LAS? Since LAS uses content from LAS_HOME? Or has that changed in recent LAS releases?

No it won't break your LAS.  The addxml-clean and addxml-build targets only affect things related to the addXML code and the addXML script that lives and runs from your LAS_HOME.

And yes, in the current release LAS reads from TOMCAT_HOME/content/las instead of LAS_HOME for files that it wishes to preserve across installations of war files. 


        -- John



On Wed, Jan 18, 2012 at 3:37 PM, Upendra Dadi <upendra.dadi@xxxxxxxx> wrote:
Hi All,
  I am getting the following error when running addXML to create a configuration file. This error occurs even when executed as root.:

  log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /var/lib/tomcat5/content/las/logs/las.log (Permission denied)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:192)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
        at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:215)
        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.parseCategory(DOMConfigurator.java:345)
        at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:827)
        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:468)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
        at gov.noaa.pmel.tmap.addxml.addXML.<clinit>(addXML.java:130)
log4j:ERROR Either File or DatePattern options are not set for appender [las].

Any help is appreciated. Thank you!


John Relph <John.Relph@xxxxxxxx>
Technical Development Team Lead
NOAA/NESDIS/National Oceanographic Data Center

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement