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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:18:15+00:00 2026-06-06T06:18:15+00:00

I am using maven to build applications. I have deployed a WAR file containing

  • 0

I am using maven to build applications.

I have deployed a WAR file containing many common jars as shared library in application server.

I have an artifact (say A-EJB) of packaging type EJB. I have built the ejb jar file.

I have an another artifact (say A-EAR) of packaging type EAR.

I have added A-EJB dependency in pom file of A-EAR. I could build the EAR file and for adding shared library reference, I have added library reference in weblogic-application.xml of EAR.

In my final EAR file, I could see A-EJB.jar file, other dependency jar files of A-EAR artifact.

EAR structure:

————–APP-INF\lib\some jars
————–META-INF\application.xml, MANIFEST.MF, weblogic-application.xml
————–A-ejb.jar

The class files of A-EJB.jar requires reference of common jars in shared library.

Ideally, I am expecting the deployment should happen successfully but this is not happening. Even though I have shared library reference in EAR file, the deployment fails due to classNotFoundException while preparing the EJB module during deployment.

The class files of A-EJB.jar searches for required jar files for reference but they are available in shared library and shared library is not used even EAR file has the reference to it.

Exception:

weblogic.application.ModuleException: Exception preparing module: EJBModule
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
…………………………………………………..

Caused By: java.lang.ClassNotFoundException:
……………………………………………………

So, this means even though EAR had a shared library reference, the ejb.jar present inside the EAR did not have reference to shared library. Is this true ?

Has anyone faced this exception and scenario. Kindly help me about resolving this issue.

  • 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-06T06:18:16+00:00Added an answer on June 6, 2026 at 6:18 am

    I suggest you to use the ear plugin with this settings.. might help..

    <plugin>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
            <modules>
                <ejbModule>
                    <groupId>ur ejb</groupId>
                    <artifactId>ur ejb Id</artifactId>
                </ejbModule>
                <jarModule>
                    <groupId>......</groupId>
                    <artifactId>......</artifactId>
                </jarModule>
                ....
                ....
        Other jar modules to be included other than the one included in dependency tag
                ....
                ....
            </modules>
            <archive>
                <manifest>
                    <addClasspath>false</addClasspath>
                </manifest>
            </archive>
            <displayName>...name...</displayName>
            <description>........desc.......</description>
        </configuration>
    </plugin>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to build an application using Maven for PHP that has multiple modules.
I have a spring based web application MyWebapp built using maven and deployed on
I am trying to build a Java EE application using Maven. I have the
I am using Maven 3 to build a java application with 3 tiers -
I'm trying to build my application for GoogleAppEngine using maven. I've added the following
I am using maven 2.2.1 version as a build tool for my Java Application
I am using Maven as the build file , this is my below settings
I have been using Maven for several months to build using Artifactory for the
I have flex application consisting of several modules which is configured using maven. I'm
I have a library that I distribute using maven 2. The typical user of

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.