Project

General

Profile

Actions

Bug #2422

open

Changing Logging Options Prevent Metadata Downloads

Added by David Sledge almost 18 years ago. Updated almost 18 years ago.

Status:
New
Priority:
Low
Assignee:
Category:
ecogrid
Target version:
Start date:
04/20/2006
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2422

Description

In the file log4j.properties in kepler's base directory, changing the line that reads:

log4j.rootLogger=WARN, CONSOLE, R

to:

log4j.rootLogger=DEBUG, CONSOLE, R

prevents Metadata from being downloaded from Metacat. With the ecogrid webapp--which uses the same API that kepler uses to access data on the ecogrid--the lack of a log4j.properties file prevented the metadata from being downloaded.

In both cases, org.ecoinformatics.ecogrid.queryservice.stub.EcoGridQueryLevelOneServiceStub.get() threw a ClassCastException.

Kepler:

java.lang.ClassCastException: java.lang.String
at
org.ecoinformatics.ecogrid.queryservice.stub.EcoGridQueryLevelOneServiceStub.get(EcoGridQueryLevelOneServiceStub.java:310)
at
org.ecoinformatics.ecogrid.queryservice.EcogridGetToStreamClient.get(EcogridGetToStreamClient.java:81)
...

Webapp:

java.lang.ClassCastException: java.lang.String
at org.ecoinformatics.ecogrid.queryservice.stub.EcoGridQueryLevelOneServiceStub.get(Unknown Source)
at org.ecoinformatics.ecogrid.queryservice.EcogridGetToStreamClient.get(Unknown Source)
...

Actions #1

Updated by David Sledge almost 18 years ago

I'm changing the severity of this bug, due to that I'm now getting the exception again in the webapp, but I haven't changed the logging settings in log4j.properties since the file's inclusion to the webapp.

Actions #2

Updated by David Sledge almost 18 years ago

As best as I can tell it's a bug in the axis 1.3 library. I removed all the logging code from EcogridGetToStreamClient in the ecogrid API, and I put together some simple test code:

import java.io.ByteArrayOutputStream;
import java.net.URL;

import org.ecoinformatics.ecogrid.queryservice.EcogridGetToStreamClient;

public class test {
public static void main(String[] args) {
try {
URL endPoint = new URL;
EcogridGetToStreamClient client = new EcogridGetToStreamClient(endPoint);
ByteArrayOutputStream baos = new ByteArrayOutputStream();

client.get("knb.182.1", baos);
System.out.println(baos.toString());
}
catch (Exception e) {
e.printStackTrace();
}
}
}

The results were predictably the same as in kepler.

The workaround for this in a servlet container is to make sure the Commons Logging and log4j jar files are included in the webapp's WEB-INF/lib directory (versus $CATALINA_HOME/shared/lib or $CATALINA_HOME/common/lib), the files commons.properties and log4j.properties are put in WEB-INF/classes, and that the logging is set to INFO or something coarser.

Actions #3

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 2422

Actions

Also available in: Atom PDF