Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8769113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:14:58+00:00 2026-06-13T17:14:58+00:00

I am trying to do centralised logging of a distributed system using Log4J2 and

  • 0

I am trying to do centralised logging of a distributed system using Log4J2 and Flume-ng. One of the servers in the system runs Jetty which I am using to do web services (servlets) for the system. When I include the Maven dependencies for Log4J2 an Flume-ng in this project it breaks Jetty and it will not start up/bind properly. If I remove the dependency in the list below (log4j-flume-ng) then Jetty will run as normal giving me the following output:

2012-10-08 16:36:33.457::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2012-10-08 16:36:34.285 INFO net.spy.memcached.MemcachedConnection:  Added {QA sa=gs-adhoc1-test.jrs-software.co.uk/10.1.1.161:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-10-08 16:36:34.290 INFO net.spy.memcached.MemcachedConnection:  Connection state changed for sun.nio.ch.SelectionKeyImpl@31ac05
2012-10-08 16:36:34.272::INFO:  jetty-7.0.0.pre5
2012-10-08 16:36:34.322::INFO:  Started SelectChannelConnector@0.0.0.0:5000

But with that dependency in, it come up as (just the Memcached output):

2012-10-08 16:36:34.285 INFO net.spy.memcached.MemcachedConnection:  Added {QA sa=gs-adhoc1-test.jrs-software.co.uk/10.1.1.161:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2012-10-08 16:36:34.290 INFO net.spy.memcached.MemcachedConnection:  Connection state changed for sun.nio.ch.SelectionKeyImpl@31ac05

The dependencys in Maven POM are as follows:

<dependencies>
    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty</artifactId>
        <version>3.5.4.Final</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty</artifactId>
        <version>7.0.0.pre5</version>       
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>3.0-alpha-1</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>net.sf.json-lib</groupId>
        <artifactId>json-lib</artifactId>
        <version>2.3</version>
        <classifier>jdk15</classifier>
        <exclusions>
            <exclusion>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>net.sf.ezmorph</groupId>
        <artifactId>ezmorph</artifactId>
        <version>1.0.6</version>
    </dependency>  

    <dependency>
        <groupId>couchdb4j</groupId>
        <artifactId>couchdb4j</artifactId>
        <version>0.5.0-i386-1</version>
    </dependency>

    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20090211</version>
    </dependency>

    <dependency>
        <groupId>com.google.code.simple-spring-memcached</groupId>
        <artifactId>spymemcached</artifactId>
        <version>2.8.1</version>
    </dependency>

    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>2.0-beta1</version>
    </dependency>

    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.0-beta1</version>
    </dependency>

    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-flume-ng</artifactId>
        <version>2.0-alpha2</version>       
    </dependency>
</dependencies>

I don’t know how to begin solving this. I have managed to get Flume working with my other servers no problem but it appears that Jetty will have none of it. Can someone offer any advice to get this working?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:15:00+00:00Added an answer on June 13, 2026 at 5:15 pm

    I’ve recently used jetty-6.1.26 with log4j2 in my project. It seems that you miss log4j2-jcl to bridge commons-logging from other packages, instead of excluding it. I could not start my project without it. You will need to define commons-logging.properties to use Log4j2 implementation and make sure it appears first in your class path.

    org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
    

    log4j2 is still beta2 and has a known bug with commons-logging, I’ve found that it is fixed in beta3 but not sure when it will be released.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run a program, which uses JOGL for its GUI, in Jason.
What I am trying to do: I have hundreds of servers with very large
I'm trying to create a routing system based on annotations (something like on Recess
Trying to write a windows speech recognition macro. Written using XML and scripting language
I'm trying to develop an application that consists of a pool of threads, using
Trying to deploy a Django 1.4 project using mod_wsgi and virtualenv, i'm running into
I am trying to track down an issue in one of my Java projects
I am trying to integrate S3 with one of my content management systems. The
Trying to write dynamic queries using the LINQ provider for NHibernate, but I am
I am trying to access a page method from centralized module. I tried putting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.