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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:35:59+00:00 2026-06-19T01:35:59+00:00

I have a Maven project, in which I want to try integration-testing an EAR

  • 0

I have a Maven project, in which I want to try integration-testing an EAR sub-module.
In the integration-test submodule, I do the following:

Properties env;
Context ctx;

env = new Properties();

env.setProperty( "java.naming.factory.initial", "org.jboss.naming.remote.client.InitialContextFactory");

env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
env.setProperty( "java.naming.provider.url", "remote://localhost:4447");
env.put(Context.SECURITY_PRINCIPAL, "jboss-user");
env.put(Context.SECURITY_CREDENTIALS, "*******");
ctx = new InitialContext( env );


IBMPFacadeRemote bmpFacade = ( IBMPFacadeRemote ) ctx.lookup( "ejb:DeDomain-ejb-1.0-SNAPSHOT/BMPFacade!de.domain.service.IBMPFacadeRemote");
bmpFacade.executeBMPProcess( model1, model2);//model1 & model2 are some entities

The problem: when calling mvn integration-test it ends up with the following Exception

java.lang.ClassCastException: org.jboss.ejb.client.naming.ejb.EjbNamingContext cannot be cast to de.domain.service.IBMPFacadeRemote

Could someone help me to solve this problem? Are there any possibilities to integration-test this using a Local Bean (the maven project uses the failsafe-plugin)?

  • 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-19T01:36:00+00:00Added an answer on June 19, 2026 at 1:36 am

    It is now hard to say what exactly solved the problem, but I will try to mention all made changes that solved the problem.

    1. Added to the pom.xml the dependencies

      <dependency>
          <groupId>org.jboss.as</groupId>
          <artifactId>jboss-as-ejb-client-bom</artifactId>
          <version>7.1.1.Final</version>
          <type>pom</type>
      </dependency>
      <dependency>
          <groupId>org.jboss.as</groupId>
          <artifactId>jboss-as-jms-client-bom</artifactId>
          <version>7.1.1.Final</version>
          <type>pom</type>
      </dependency>
      
    2. Changed the JNDI lookup as follows (after changing the deployed name of the EAR&EJB projects)

      IBMPFacadeRemote bmpFacade = ( IBMPFacadeRemote ) ctx.lookup( "ejb:DeDomain-ear/DeDomain-ejb//BMPFacadeBean!de.domain.service.IBMPFacadeRemote");
      
    3. Got rid of the EJB maven plugin from the EJB Project & of some other resources, like jndi.properties

    Probably it is worth mentioning, that the Properties instance remained the same as in the stated in the question.

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

Sidebar

Related Questions

I have a multi module Maven project and I want the sub projects to
I have a maven multiple-module project, which is giving me headaches in the assembly:assembly
I have a project in which the maven-enforcer rule fails with a multi-module build
I have a multi-module maven project in which one module is called webapp and
I have a multi-module maven project which has profiles set up. So if I
I have a war packaging Maven project, in which I have a Java properties
I have a multi-module maven 2 project which uses assemblies (via maven-assembly-plugin at the
I have a maven project with 2 modules. There is a crawler module which
I have a maven project which compiles with javac / aspectj compiler. I want
I have a maven project which won't compile due to an unresolvable reference from

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.