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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:36:44+00:00 2026-05-27T00:36:44+00:00

This problem is somewhat complicated and I’m in a little over my head. I

  • 0

This problem is somewhat complicated and I’m in a little over my head. I will try to describe it as briefly as possible.

I have a J2EE application which runs on Glassfish v2 and consumes CCD messages using an implementation of EMF (MDHT). When this is invoked from a webservice which calls the EJB, it works perfectly and has worked for over a year. Recently we had a reason to invoke this from a WAR, the test case is a user uploading the same file which is normally sent over a webservice. When we call this from the WAR, it does not work, the EMF EPackage.Registry is empty!

When we call this from the WAR, the WAR gets an instance of the EJB session bean and just calls the EJB. We want to keep as much logic as possible in the EJB to not duplicate code.

Based on a discussion on the MDHT User list I’m led to believe this is more of an EMF issue than an MDHT issue and it relates to which classloader is in use.

The MDHT and EMF libraries are packaged in the EJB JAR and are visible to the EJB classloader.

I’ve tried several workaround and points to narrow this problem down:

  • moved JARs around to see if its a matter of the classloader not being able to see the MDHT libraries
  • Checked in the debugger to see which classloaders are in play when the Registry is populated
  • Dug deep into EMF and watched for ClassNotFoundExceptions
  • Put a logging breakpoint in to see which classloader is used when populating the Registry. It seems to use the EJB classloader as expected.

Are there any known or general use cases where an EMF implementation would behave differently when called from a WAR instead of an EJB?

Is this really an EMF issue or is it a more general issue when having a WAR call an EJB?

What other debugging steps should I try to isolate and identify the root-cause of 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-05-27T00:36:44+00:00Added an answer on May 27, 2026 at 12:36 am

    The solution to this problem was found on the EMF forums: http://www.eclipse.org/forums/index.php/m/758092/#msg_758092

    If I set the org.eclipse.emf.ecore.EPackage.Registry.INSTANCE system property to org.eclipse.emf.ecore.impl.EPackageRegistryImpl magic happens and it works.

    I’m curious as to why that works, but that is a different question.

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

Sidebar

Related Questions

This issue is somewhat related: Problem with Code Generated by XSD.EXE: Sequence of Elements
This is a really strange problem, that appears to be somewhat intermittent (although it
This problem has been kicking my butt for a few days now. I have
This problem has bugged me so many times and i have now decided to
I have found a whole lot of different solutions to this problem, but not
Ok SQL and Oracle gurus I have a somewhat complicated query that I'm trying
This is possibly a problem with possibly no optimal solution. Suppose I have a
OK, I have a somewhat complicated system in C++. In a nutshell, I need
I have a somewhat complicated Makefile which runs perl scripts and other tools and
My problem is somewhat similar to this problem Custom Validation on group of checkboxes

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.