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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:47:23+00:00 2026-05-24T04:47:23+00:00

In my Java EE project, there are several Java EE modules and a web

  • 0

In my Java EE project, there are several “Java EE” modules and a web module.
One of the Java EE modules provides a class to CDI that is to be used by the other modules:

@ApplicationScoped
public class XFactory {

  @Produces @Actual
  public X create() {
     return new X();
  }
}

They are injected into

   @SessionScoped
   public class Target implements Serializable {
       X x;

      @Inject
      public void setX(@Actual X x){
        this.x = x;
      }
   }

However, this works only in one of the Java EE modules and in the web module. In all of the remaining Java EE modules, injection consistently fails, and I am clueless as to why: All I get is WELD-1408, unsatisfied dependency.

All of the modules have beans.xml in the proper places, they all work as long as I don’t switch to injection. Most of the target beans are already in use as injected beans in a JSF.
What’s special about the Java EE module that works is that the bean is injected into a servlet in the web module, not the JSF.

The project runs with Java EE 6, EJB 3.1 in GlassFish 3.1. Dependencies are managed by Maven 3. X itself is Serializable, to satisfy the passivating scopes.

Did you come across this before? What could I have done wrong?

Update: Added dependency management remark above.

Update: Corrected the position of @Actual in Target.

Update: Updated the description with more details after a day of experiments.

  • 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-24T04:47:24+00:00Added an answer on May 24, 2026 at 4:47 am

    This appears to be a problem in Glassfish 3.1, in one of its included libraries, or possibly in JDK 6.

    I have just updated my system to Glassfish 3.1.1 and JDK 7, and problem does not occur any longer.

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

Sidebar

Related Questions

There's a Java library that I would like to use in my project. My
Is there any other implementation (e.g. in an OSS project) of a Java SecurityManager
We're using some C library in our Java project. Several years ago some other
I'm working on a Java web project that uses Maven to build its artifacts.
I got a java web project handling several objects (again containing n objects of
In my current project I use IKVM to cross-compile several Java libraries that deal
I'm working on a web project that will (hopefully) be available in several languages
I hava a Java project that relies on several libraries, which are distributed as
I am working on a JAVA project in which there are multiple terminals. These
I'm working on a project, written in Java, which requires that I build a

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.