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 6700263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:47:37+00:00 2026-05-26T06:47:37+00:00

Im already running morphia over mongDb in eclipse win7 64bit. reading about the log4mongo

  • 0

Im already running morphia over mongDb in eclipse win7 64bit.
reading about the log4mongo here:
http://log4mongo.org/display/PUB/Log4mongo+for+Java
following the steps but get this:

log4j:ERROR Could not instantiate class [com.google.code.log4mongo.MongoDbAppender].
    java.lang.ClassNotFoundException: com.google.code.log4mongo.MongoDbAppender
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
        at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:326)
        at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)
        at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:752)
        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
        at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
        at org.apache.log4j.Logger.getLogger(Logger.java:117)
        at LogTest.main(LogTest.java:6)
    log4j:ERROR Could not instantiate appender named "MongoDB".
    log4j:WARN No appenders could be found for logger (LogTest).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

I have the log4j.properties in my eclipse bin folder(maybe wrong but get no response elsewhere).

This files are importet:
log4mongo-java-0.7.0.jar
log4j-1.2.16.jar
mongo-2.6.5.jar

This is the log4j.properties:

log4j.rootLogger=error, MongoDB
log4j.appender.MongoDB=com.google.code.log4mongo.MongoDbAppender
log4j.appender.MongoDB.databaseName=appname   
log4j.appender.MongoDB.collectionName=log

Im also startet a mongo shell that’s waiting for connections

here’s the starter:

import org.apache.log4j.Logger;

public class LogTest {
    public static void main(String[] args) {
        Logger logger = Logger.getLogger(LogTest.class);
        logger.error("Don't panic");
    }
}

this is working as expected

log4j.rootLogger=error, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
  • 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-05-26T06:47:37+00:00Added an answer on May 26, 2026 at 6:47 am

    Try change appender name.

    “com.google.code.log4mongo.MongoDbAppender” -> “org.log4mongo.MongoDbAppender”.

    log4mongo-java-0.7.0.jar used this package.

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

Sidebar

Related Questions

Here's my issue: I need to close a process, already running, from a C#
How do I detect if a process is already running under the Windows Task
I need to either bring front browser window if it is already running or
Is there an easy way to tell if a ruby script is already running
I am running into this issue of releasing an already released object but can't
I know I have already answered a similar question ( Running Batch File in
How can I make my already running C# Windows Form Application be able to
I'm trying to check if a process is already running by using a temporal
I need to check whether or not an administrative script is already running on
1/I don't want to notify user if this one is already running my app

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.