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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:12:29+00:00 2026-06-05T05:12:29+00:00

I have a no-interface ejb deployed in an ear (MyEar.ear) @Stateless @LocalBean public class

  • 0

I have a no-interface ejb deployed in an ear (MyEar.ear)

@Stateless
@LocalBean
public class MyService{
// stuff
}

The ear is deployed to jboss-6.0.0.Final

I confirmed the JNDI name from the server jmx console:

MyEar/MyService/no-interface

I’m trying to reference this ejb from another ejb in a war (outside the ear) in the same server:

@EJB(mappedName = "MyEar/MyService/no-interface")
private MyService myService;

I’m referencing the ear project from the war project in eclipse, and compilation is successful.

I keep getting a ClassNotFoundException exception when deploying the war:

java.lang.ClassNotFoundException: eg.com.test.MyService

Why is the ejb in the war not seeing the ejb from the other ear?

Edit: I updated to the follwing

remote interface

@Remote
public interface MyServiceRemote{
// stuff
}

ejb

@Stateless
public class MyService implements MyServiceRemote{
// stuff
}

ejb reference in a different application

@EJB(mappedName = "MyEar/MyService/remote")
private MyServiceRemote myService;

I verified the new JNDI name on the server: MyEar/MyService/remote

But i’m still getting the same exception, this time the interface not found:

java.lang.ClassNotFoundException: eg.com.test.MyServiceRemote

Update: I needed to package the Remote Interface with the war, its working correctly now.

  • 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-05T05:12:31+00:00Added an answer on June 5, 2026 at 5:12 am

    That EJB would need to have a remote interface, and you would access it the same as any remote EJB from the external WAR. The external WAR has a seperate class loader to the EAR, hence it will not find EAR classes.

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

Sidebar

Related Questions

Say I have the following EJB (using ejb3): @Stateless(name=Queries) @Remote(Queries.class) @Local(Queries.class) public final class
I have created and EJB with a remote interface: @Stateless public class TestSessionBean implements
I have interface Foo public interface Foo { public void test(); } Class FooChild
I have a public EJB class that I want accessible online as a web
I'm using JBoss 4.2.3, EJB2, XDoclet and have deployed one EAR with the EJBs
I have deployed an ejb in a war file(not an ear file). I have
I have ejb 2.1 deployed in JBOSS 5 server . The jndi name is
Have a look at following code: @Local public interface MyService { void printMessage(); }
I have a @Stateless EJB with a @WebService interface, using container managed transactions, meaning
I have interface IConfigurationSource { .... } and class FileConfigurationSource : IConfigurationSource { FileConfigurationSource(string

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.