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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:39:21+00:00 2026-06-07T20:39:21+00:00

I want to enable the following scenario: my web application (WAR file) is deployed

  • 0

I want to enable the following scenario:

  • my web application (WAR file) is deployed on Tomcat on its own

  • my web application provides an API for extensions in the form of an IFace interface and AbstractIFace abstract base implementation, whose class files are deployed within the WAR file

  • extensions to the applications are delivered as JAR files to be placed somewhere in the classpath (i.e. external to the WAR)

I compiled a ConcreteIFace class which extends AbstractIFace and packaged it into a JAR. I put the JAR in $TOMCAT_HOME/lib and deployed the WAR in webapps. When I try the following from a servlet in the WAR:

Class clazz = Class.forName("ConcreteIFace");

I get the following stack trace:

java.lang.NoClassDefFoundError: AbstractIFace
    java.lang.ClassLoader.defineClass1(Native Method)
    java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    java.security.AccessController.doPrivileged(Native Method)
    java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    java.lang.Class.forName0(Native Method)
    java.lang.Class.forName(Class.java:247)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1698)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
    java.lang.Class.forName0(Native Method)
    java.lang.Class.forName(Class.java:169)
    com.backbase.sample.DummyServlet.service(DummyServlet.java:14)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

A similar stack trace is presented if ConcreteIFace directly implements IFace instead of going through AbstractIFace

My questions are:

  • as all the required classes are in the application classpath, why do I have NoClassDefFound?

  • is it even possible to achieve the scenario I presented at the beginning? If so, how?

  • 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-07T20:39:22+00:00Added an answer on June 7, 2026 at 8:39 pm

    In web applications, the classpath is segregated. The web applications cannot see each-other’s classes, Tomcat cannot see the apps’ classes, the apps cannot see Tomcat’s internal classes (only the exposed interfaces like the Servlet API).

    Web applications are supposed to be self-contained, and container-independent.

    The easiest way would be to re-package the war file to also include the plugins.

    Other options include going up to enterprise archives, which can have interdependencies, or embedding the web server in the application (as opposed to the other way around).

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

Sidebar

Related Questions

I want to enable Directory Browsing for the for the following virtual web directory
I want to enable the user to select a video file from the on-device
I have the following scenario: User X logs in to the application from location
Wordpress' documentation suggests adding the following to functions.php to enable what I want to
I want to enable Check-out feature of git local repository. As shown in following
I want to enable public caching with google app engine. I've got the following
I have these following code in which I want to enable 2nd hover state
I want to enable Lua-Scripting (Lua 5.1) in my Delphi application. For this purpose
My application uses the following NSApplicationDelegate function. - (void)application:(NSApplication*)sender openFiles:(NSArray*)filenames; I want to use
I want to enable/disable the data connection programmatically. I've used the following code: void

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.