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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:59:56+00:00 2026-06-07T17:59:56+00:00

Environment Two stateless EJBs with their Remote Interfaces. EJB1 is injected into EJB2. ///

  • 0

Environment

  • Two stateless EJBs with their Remote Interfaces. EJB1 is injected into EJB2.
    /// EJB1

    package com.xxx.layer1;

    @Remote
    public interface EJB1Remote {
    }

    @Stateless (mappedNamed="com.xxx.EJB1")
    public class EJB1 implements EJB1Remote {
    }


    /// EJB2

    package com.xxx.layer2;

    import com.xxx.layer1;

    @Remote
    public interface EJB2Remote {
    }

    @Stateless (mappedNamed="com.xxx.EJB2")
    public class EJB2 implements EJB2Remote {

        @EJB(mappedNamed="com.xxx.EJB1")
        EJB1Remote ejb1;
    }
  • EJB2 also uses some Optional Packages (declared in its MANIFEST)

  • WebLogic application server (10.3.3)

  • Two EJBs are packaged into two separate JAR files

Problem

If two JAR files are packaged into an EAR file and deployed, dependency injection works. But if I deploy them separately, even though after I deployed EJB1 first and verified the global JNDI name in Weblogic (com.xxx.EJB1#com.xxx.layer1.EJB1Remote), EJB2’s deployment fails with ClassNotFoundException: com.xxx.layer1.EJB1Remote

  • 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-07T17:59:57+00:00Added an answer on June 7, 2026 at 5:59 pm

    Each individual JAR file in this case is an application of its own in WebLogic and each application has its own classloader. So when JAR files are deployed separately (not bundled in an EAR file), their classloader doesn’t see the classes inside the others.

    In this case, I separated EJB2’s interface into another JAR file and deployed it as an Optional Package and added its reference to other JAR files’ Manifests.

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

Sidebar

Related Questions

I have two environment variables in apache config, I want to concatenate them into
You can easily swap two deployments between staging and production environment in the Azure
I have a WCF environment hosted on a windows service. I have two hosts
I've been strugling for two weeks to create an environment for building a gstreamer
I have two versions of a Drupal site running on my local dev environment.
When I use the itemize environment, i.e. \begin{itemize} \item one \item two \item three
I am trying to create a sandbox environment using two matching databases held on
I have two different types of WCF clients in my test environment sending a
I have two databases, one is in a test environment and is sqllite3 and
Is it possible to use two different databases on WordPress depending the environment where

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.