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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:22:37+00:00 2026-06-05T03:22:37+00:00

Below is the ear structure ex.ear | |_lib-util.jar–CommonUtil.class,CommonException.class etc. | | | ejb.jar web.war

  • 0

Below is the ear structure

ex.ear
|
|_lib-util.jar--CommonUtil.class,CommonException.class etc.
|
|
|
ejb.jar
web.war

When I call this specific class like this (CommonUtil.map(empDto)) in WEB and EJB layer classes then we are getting a NoClassDefFoundError. Remaining all classes which are in Util.jar are all getting called normally. Why are we getting this error only for this class?

EmployeeDTO empDto = new EmployeeDTO();
empDto.setId(1);
empDto.setName("john");
CommonUtil.map(empDto);
public class CommonUtil {

    private static Mapper mapper = new BeanMapper();
    private static CommonUtil instance = new CommonUtil();

    private CommonUtil() {
        super();
    }

    public static <T> T map(Object source) {
        T target = mapper.map(source);
        return target;
    }

    public static <T> T map(Object source) {
        mapper.map(source);
        return target;
    }
}
  • 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-05T03:22:39+00:00Added an answer on June 5, 2026 at 3:22 am

    Generally speaking the NoClassDefFoundError happens if an Exception occurs during the static initialization. Please check the log prior NoClassDefFoundError carefully if any exception happened during instantiating BeanMapper or CommonUtil.

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

Sidebar

Related Questions

I have a EAR package that contains a web module and EJB. The EJB
Our current working Maven structure builds one EAR and is as below workspace >parent
Below is simple code, I got java.util.IllegalFormatConversionException whenever i == 0 . java.util.Random r
Below is my code. class Program { static void Main(string[] args) { Console.WriteLine(Main thread
In J2EE 6 you can expose your EJB session bean as a REST web
I have a web application which I am exporting as EAR and trying to
Below is my $.ajax call, how do I put a selects (multiple) selected values
When i use class-path attribute in spring XML file as below, <bean class=com.fritolay.suppliernet.common.lastresorthandler.impl.SingletonPropertiesRepository> <property
As shown in the above pic, I have a EJB-3 Enterprise application (EAR file),
Below am posting my jsp page. home.jsp <%@taglib uri=/WEB-INF/struts-bean.tld prefix=bean%> <%@taglib uri=/WEB-INF/struts-html.tld prefix=html %>

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.