Duplicate logback.xml files in checklistbank-search-ws due to dependency on checklistbank-index-builder
11487
Reporter: lfrancke
Type: Bug
Summary: Duplicate logback.xml files in checklistbank-search-ws due to dependency on checklistbank-index-builder
Priority: Minor
Resolution: Fixed
Status: Closed
Created: 2012-06-25 16:32:00.267
Updated: 2017-10-06 15:29:24.024
Resolved: 2017-10-06 15:29:24.002
Description: checklistbank-index-builder is a "stand alone tool (?) yet checklistbank-search-ws depends on it and thus gets a conflicting logback.xml file.
Perhaps move common classes somewhere else if needed?]]>
Author: mdoering@gbif.org
Created: 2012-06-26 10:48:10.311
Updated: 2012-06-26 10:48:10.311
I can't find any reference to index builder from either checklistbank-ws and not even checklistbank-search-ws.
checklistbank-search depends on it only as far as I can see.
Author: lfrancke@gbif.org
Created: 2012-06-26 10:52:00.253
Updated: 2012-06-26 10:52:00.253
Sorry I misread: It seems as if checklistbank-search-ws somehow depends on it not checklistbank-ws.
{noformat}
16:09:23,945 |-WARN in ch.qos.logback.classic.LoggerContext[ChecklistBank Search WS] - Resource [logback.xml] occurs multiple times on the classpath.
16:09:23,945 |-WARN in ch.qos.logback.classic.LoggerContext[ChecklistBank Search WS] - Resource [logback.xml] occurs at [jar:file:/var/lib/tomcat6/webapps/checklistbank-search-ws/WEB-INF/lib/checklistbank-index-builder-0.1-SNAPSHOT.jar!/logback.xml]
16:09:23,945 |-WARN in ch.qos.logback.classic.LoggerContext[ChecklistBank Search WS] - Resource [logback.xml] occurs at [file:/var/lib/tomcat6/webapps/checklistbank-search-ws/WEB-INF/classes/logback.xml]
{noformat}
Author: mdoering@gbif.org
Created: 2012-06-26 10:58:22.288
Updated: 2012-06-26 10:58:22.288
the logbackfile only enters clb-search-ws via a transitive dependency on clb-search -> index-builder
So the only option would be to put the annotated model class into a new project search-api.
The registry project should have a similar issue
Author: mdoering@gbif.org
Comment: If it remains a problem on deployment we should create a new checklist bank-search-api project with just the annotated model class in it
Created: 2012-06-26 15:08:40.264
Updated: 2012-06-26 15:08:40.264
Author: trobertson@gbif.org
Created: 2014-08-27 16:18:31.976
Updated: 2014-08-27 16:18:40.676
Sorry - a bit confused by the commentary on this issue. What have annotated model classes got to do with the request to remove a logback.xml from the library?
[~mdoering@gbif.org] given that checklistbank-index-builder no longer exists and checklistbank-search-ws has no dependencies on any index building anyway, should this be closed as no longer valid?
Author: mdoering@gbif.org
Comment: Needs to be verified, but checklistbank-index-builder was just renamed to module clb-solr
Created: 2014-08-27 16:36:44.359
Updated: 2014-08-27 16:36:44.359
Author: trobertson@gbif.org
Created: 2014-08-27 16:45:04.478
Updated: 2014-08-27 16:45:04.478
https://github.com/gbif/checklistbank/tree/master/checklistbank-solr/src/main/resources still has a logback.xml
The original request is to remove that
Author: mdoering@gbif.org
Comment: Understood. But it's used in the cob-solr module which produces a shaded jar that you execute on the command line. So simply deleting it is not a solution. Can we exclude it in dependent modules? The solution I proposed above was to move the annotated API classes needed in the search-ws to a common module so we do not need to include the logback file. There is already a common module now, so it shouldn't be too drastic of a change
Created: 2014-08-27 17:07:41.611
Updated: 2014-08-27 17:07:41.611
Author: trobertson@gbif.org
Created: 2014-08-27 17:22:25.696
Updated: 2014-08-27 17:22:25.696
bq. But it's used in the cob-solr module which produces a shaded jar that you execute on the command line. So simply deleting it is not a solution.
Why though? Logging config should not be in a Jar and the logback.xml can be provided at runtime:
{code}
java -cp conf/.:clb-solr.jar org.gbif.clb.IndexRunner
{code}
That is how all the crawling stuff runs...