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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:08:27+00:00 2026-05-29T06:08:27+00:00

Out of a sudden in a formerly working application, I am getting a NoClassDefFoundError

  • 0

Out of a sudden in a formerly working application, I am getting a NoClassDefFoundError (wrong name) which has puzzled me. I am using an XML binding framework which tries to resolve bound classes at request time by calling ClassLoader.loadClass() with the configured class name. (Why does it behave like that is beyond me in this case.) Now I get the exception just mentioned at java.lang.ClassLoader.defineClass(). The documentation on the method says that it will throw a NoClassDefFoundError if the parameter name is not equal to the binary name of the class specified. I am aware that in that case one expects to get an exception of the form

java.lang.NoClassDefFoundError: A (wrong name: B)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:786)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:144)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:382)
    ....

and this is the outcome I actually see, but the weird thing is that in my case the reported A and B are exactly the same! I tried to debug the app. The line in the JDK source reads:

        c = defineClass1(name, b, off, len, protectionDomain, source);

the value of source is OK. I saved the byte array b to a class file and inspected it with a decompiler and it’s OK again. Of course Class.forName() reports the same error throughout, but the really funny thing is that if I set name = null in debug mode I get this beast:

java.lang.LinkageError: loader (instance of  com/google/gwt/dev/shell/jetty/JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension): attempted  duplicate class definition for name: "A"
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:786)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:144)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:382)

Now I feel completely clueless on this 🙁 I appreciate your help.

The class loader in question is com.google.gwt.dev.shell.jetty.JettyLauncher.WebAppContextWithReload.WebAppClassLoaderExtension in case that matters.

  • 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-29T06:08:28+00:00Added an answer on May 29, 2026 at 6:08 am

    Solved. Just an embarrassing capitalization issue. The names A and B in NoClassDefFoundError: A (wrong name: B) actually did differ by a capitalization.

    This happens on Windows, because of its case-insensitive file system. If you look for a class named FooBar and the folder contains a file Foobar.class, the classloader opens the class file, but discovers that internally it has a different name. Hence the exception.

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

Sidebar

Related Questions

All of a sudden my app is handing this out in the application event
I have an application that has been working with session variables no problem. I
Til yesterday, jstack was working fine. Today, all out of sudden it gives me
The application in question has already been deployed. I have found out about ACRA
Out of the following queries, which method would you consider the better one? What
Just writing out my own blog in ColdFusion and all of a sudden, I
Out of blue moon, all of sudden, 1 of my database is crashed. This
I set up a crontab to send an email out. All of a sudden
I'm using a debug macro as defined in this post: How to print out
All of the sudden, i have no clue what i did, my application started

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.