Opened 4 years ago

Closed 4 years ago

#18396 closed defect (fixed)

onionoo fails at ant compile

Reported by: cypherpunks Owned by:
Priority: Medium Milestone:
Component: Metrics/Onionoo Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Following the instructions at onionoo.git, cannot pass "ant compile" step.

Found prior ticket to update git submodules init and git update, problem persists.

ant compile
Buildfile: /home/metrics/onionoo/build.xml

metrics-lib:

init:

compile:

jar:

init:

compile:
    [javac] Compiling 63 source files to /home/metrics/onionoo/classes
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/cron/Main.java:11: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/cron/Main.java:12: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/cron/Main.java:27: error: cannot find symbol
    [javac]   private Logger log = LoggerFactory.getLogger(Main.class);
    [javac]           ^
    [javac]   symbol:   class Logger
    [javac]   location: class Main
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/util/LockFile.java:10: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/util/LockFile.java:11: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
[javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java:13: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java:14: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/DocumentStore.java:24: error: package org.apache.commons.lang3 does not exist
    [javac] import org.apache.commons.lang3.StringUtils;
    [javac]                                ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/DocumentStore.java:25: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/DocumentStore.java:26: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/DocumentStore.java:31: error: package com.google.gson does not exist
    [javac] import com.google.gson.Gson;
    [javac]                       ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/DocumentStore.java:32: error: package com.google.gson does not exist
    [javac] import com.google.gson.GsonBuilder;
    [javac]                       ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/DocumentStore.java:33: error: package com.google.gson does not exist
    [javac] import com.google.gson.JsonParseException;
    [javac]                       ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/StatusUpdateRunner.java:7: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/StatusUpdateRunner.java:8: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/writer/DocumentWriterRunner.java:5: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/writer/DocumentWriterRunner.java:6: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;[javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/util/LockFile.java:15: error: cannot find symbol
    [javac]   private final static Logger log = LoggerFactory.getLogger(
    [javac]                        ^
    [javac]   symbol:   class Logger
    [javac]   location: class LockFile
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java:20: error: cannot find symbol
    [javac]   private static final Logger log = LoggerFactory.getLogger(
    [javac]                        ^
    [javac]   symbol:   class Logger
    [javac]   location: class DescriptorSource
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java:15: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java:16: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/DocumentStore.java:42: error: cannot find symbol
    [javac]   private static Logger log = LoggerFactory.getLogger(
    [javac]                  ^
    [javac]   symbol:   class Logger
    [javac]   location: class DocumentStore
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/NodeStatus.java:18: error: package org.apache.commons.lang3 does not exist
    [javac] import org.apache.commons.lang3.StringUtils;
    [javac]                                ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/NodeStatus.java:19: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/NodeStatus.java:20: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
[javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/SummaryDocument.java:13: error: package org.apache.commons.codec does not exist
    [javac] import org.apache.commons.codec.DecoderException;
    [javac]                                ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/SummaryDocument.java:14: error: package org.apache.commons.codec.binary does not exist
    [javac] import org.apache.commons.codec.binary.Base64;
    [javac]                                       ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/SummaryDocument.java:15: error: package org.apache.commons.codec.binary does not exist
    [javac] import org.apache.commons.codec.binary.Hex;
    [javac]                                       ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/SummaryDocument.java:16: error: package org.apache.commons.codec.digest does not exist
    [javac] import org.apache.commons.codec.digest.DigestUtils;
    [javac]                                       ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/StatusUpdateRunner.java:12: error: cannot find symbol
    [javac]   private static final Logger log = LoggerFactory.getLogger(
    [javac]                        ^
    [javac]   symbol:   class Logger
    [javac]   location: class StatusUpdateRunner
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/LookupService.java:25: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;[javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/LookupService.java:26: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/writer/DocumentWriterRunner.java:10: error: cannot find symbol
    [javac]   private final static Logger log = LoggerFactory.getLogger(
    [javac]                        ^
    [javac]   symbol:   class Logger
    [javac]   location: class DocumentWriterRunner
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java:24: error: cannot find symbol
    [javac]   private final static Logger log = LoggerFactory.getLogger(
    [javac]                        ^
    [javac]   symbol:   class Logger
    [javac]   location: class DescriptorQueue
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/NodeStatus.java:24: error: cannot find symbol
    [javac]   private final static Logger log = LoggerFactory.getLogger(
    [javac]                        ^
    [javac]   symbol:   class Logger
    [javac]   location: class NodeStatus
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/updater/LookupService.java:31: error: cannot find symbol
    [javac]   private final static Logger log = LoggerFactory.getLogger(
    [javac]                        ^
    [javac]   symbol:   class Logger
    [javac]   location: class LookupService
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/BandwidthStatus.java:10: error: package org.slf4j does not exist[javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/BandwidthStatus.java:11: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/BandwidthStatus.java:17: error: cannot find symbol
    [javac]   private static Logger log = LoggerFactory.getLogger(
    [javac]                  ^
    [javac]   symbol:   class Logger
    [javac]   location: class BandwidthStatus
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/ClientsHistory.java:9: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/ClientsHistory.java:10: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/ClientsHistory.java:14: error: cannot find symbol
    [javac]   private final static Logger log = LoggerFactory.getLogger(
    [javac]                        ^
    [javac]   symbol:   class Logger
    [javac]   location: class ClientsHistory
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/ClientsStatus.java:9: error: package org.slf4j does not exist
    [javac] import org.slf4j.Logger;
    [javac]                 ^
    [javac] /home/metrics/onionoo/src/main/java/org/torproject/onionoo/docs/ClientsStatus.java:10: error: package org.slf4j does not exist
    [javac] import org.slf4j.LoggerFactory;
[javac] 100 errors

BUILD FAILED
/home/metrics/onionoo/build.xml:83: Compile failed; see the compiler error output for details.
dpkg -l | grep slf4j
ii  libslf4j-java                      1.7.12-2                         all          Simple Logging Facade for Java
apt-get install libslf4j-java
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libslf4j-java is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ls /usr/share/java/*slf4j* | cat
gossip-bootstrap-slf4j-1.8.jar
gossip-bootstrap-slf4j.jar
gossip-slf4j-1.8.jar
gossip-slf4j.jar
jcl-over-slf4j-1.7.12.jar
jcl-over-slf4j.jar
jul-to-slf4j-1.7.12.jar
jul-to-slf4j.jar
log4j-over-slf4j-1.7.12.jar
log4j-over-slf4j.jar
log4j-to-slf4j-2.2.jar
log4j-to-slf4j.jar
slf4j-api-1.7.12.jar
slf4j-api.jar
slf4j-jcl-1.7.12.jar
slf4j-jcl.jar
slf4j-jdk14-1.7.12.jar
slf4j-jdk14.jar
slf4j-log4j12-1.7.12.jar
slf4j-log4j12.jar
slf4j-migrator-1.7.12.jar
slf4j-migrator.jar
slf4j-nop-1.7.12.jar
slf4j-nop.jar
slf4j-simple-1.7.12.jar
slf4j-simple.jar

Any hints?

Child Tickets

Change History (2)

comment:1 Changed 4 years ago by cypherpunks

Here's an update:

In build.xml, replace the specific versions with the generic name for the jar files and onionoo compiles and works as expected.

  <fileset dir="/usr/share/java">
      <include name="commons-codec.jar"/>
      <include name="commons-compress.jar"/>
      <include name="commons-lang3.jar"/>
      <include name="gson.jar"/>
      <include name="junit4.jar"/>
      <include name="servlet-api-3.0.jar"/>
      <include name="logback-classic.jar"/>
      <include name="logback-core.jar"/>
      <include name="slf4j-api.jar"/>
      <include name="jetty8-server.jar"/>
      <include name="jetty8-servlets.jar"/>
      <include name="jetty8-servlet.jar"/>
      <include name="jetty8-util.jar"/>
      <include name="jetty8-http.jar"/>
      <include name="jetty8-io.jar"/>
      <include name="jetty8-xml.jar"/>
      <include name="jetty8-webapp.jar"/>
      <include name="jetty8-continuation.jar"/>
      <include name="jetty8-security.jar"/>
    </fileset>

comment:2 Changed 4 years ago by cypherpunks

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.