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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:52:55+00:00 2026-05-31T23:52:55+00:00

In my webapp, I am using Spring MVC as my controller layer. However, using

  • 0

In my webapp, I am using Spring MVC as my controller layer. However, using the tags provided by the MVC context:

<mvn:annotation-driven />
<mvc:resources />

causes a log4j exception:

<Mar 26, 2012 1:49:50 PM EDT> <Warning> <HTTP> <BEA-101162> <User defined listener         
org.springframework.web.context.ContextLoaderListener failed:
java.lang.NoClassDefFoundError: org/apache/log4j/spi/ThrowableInformation.
java.lang.NoClassDefFoundError: org/apache/log4j/spi/ThrowableInformation
at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:165)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.log(Category.java:856)
at org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:597)
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.error(SLF4JLocationAwareLog.java:225)
Truncated. see log file for complete stacktrace

(LoggingEvent.java:165)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.log(Category.java:856)
at org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:597)
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.error(SLF4JLocationAwareLog.java:225)
Truncated. see log file for complete stacktrace

Basic stuff:

  1. log4j-1.2.16.jar is defined in the maven POM and is in the application library.

  2. Since it’s a weblogic server, I have the following in the weblogic.xml file to try to prevent conflicts:

    <wls:prefer-application-packages>
        <wls:package-name>org.apache.log4j.*</wls:package-name>
    </wls:prefer-application-packages>
    
  3. (Update) I manually excluded commons-logging in the maven POM for the application.

  4. (Update) I already had the slf4j jars in my Maven POM (removing the jcl-over-slf4j has no effect):

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>1.5.8</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.5.8</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.5.8</version>
        <scope>runtime</scope>
    </dependency>
    

Basically, I need to exclude the basic css and js directories as web as a single directory under WEB-INF/ that contains some jspf files that I do NOT wish to write a controller for (dropdown menus definitions used by jquery superfish).

Any help?

  • 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-31T23:52:56+00:00Added an answer on May 31, 2026 at 11:52 pm

    Add slf4j-log4 connector to the POM:

          <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j-version}</version>
                <scope>runtime</scope>
            </dependency>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have written a small webapp using spring-security and spring-mvc with an annotation based
I'm trying to setup a Spring 3 Web MVC project, using the @Controller, annotation-based
I'm developing webapp using spring 3 mvc and using annotation-based controllers. I want to
I'm using Spring MVC 3 + Tiles for a webapp. I have a slow
I am developing a webapp using Spring MVC 3 and have the DispatcherServlet catching
I am using Spring MVC to develop a Java webapp. I have a setup
I'm building a webapp using spring MVC and am curious as to whether there
How do I browse a jackrabbit repository using a spring-mvc webapp? How do I
I'm writing webapp using Spring 3 MVC with annotations. I use jsp for view
I'm creating an MVC Spring webapp. Using: Jetty (servlet container), DataNucleus (dao platform), DB4O

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.