Questions tagged [weld]

Weld is the reference implementation (RI) for JSR-299: Java Contexts and Dependency Injection for the Java EE platform (CDI)

Weld is the reference implementation (RI) for JSR-299: Java Contexts and Dependency Injection for the Java EE platform (CDI)

See http://seamframework.org/Weld

592 questions
0
votes
1 answer

Weld registry singleton startup when deploying an ear on weblogic 12.2.1.3

I'm deploying an ear, which contains a war file, to Weblogic server 12.2.1.3. Upon deployment of the ear I get the below exception in the logs, blocking deployment: Caused By: java.lang.RuntimeException: SingletonProvider is already initialized with…
Albert Scholtz
  • 337
  • 3
  • 15
0
votes
0 answers

Nested PER_METHOD inside PER_CLASS should call TestInstanceFactory

Currently I am trying to integrate JUnit5.3.0-RC1 into a Weld-SE-Testframework ejb-cdi-unit. The first solution on JUnit5.2.0 available in ejb-cdi-unit:1.1.15 restricts the TestInstance-Classes somewhat concerning CDI. I can only allow @Inject. That…
aschoerk
  • 3,333
  • 2
  • 15
  • 29
0
votes
1 answer

Reattach to conversation with Java CDI Weld

I want to join an existing conversation scope. I start the conversation with: conversation.begin(packageId); I got close with using the following which seems to work: @Inject @Http CoversationContext context; context.activate(packageId); However…
TownCube
  • 1,280
  • 1
  • 13
  • 32
0
votes
1 answer

WeldClientProxy cannot be cast

I use the Unbound ID library that has a class LDAPConnection which has no default constructor and which implements LDAPInterface. I produce the LDAPConnection as follows: @Produces @SimpleLdapConnection @ApplicationScoped public LDAPInterface…
stefan.m
  • 1,912
  • 4
  • 20
  • 36
0
votes
2 answers

Mixing CDI and EJB results in error at start

we have mixed the usage of CDI and EJB in our application. At startup, we receive the error Caused by: org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped. We don't…
user1414745
  • 1,317
  • 6
  • 25
  • 45
0
votes
1 answer

Create parameterized objects at runtime with CDI

The project is set up with CDI 2.0 (specifically Weld 3.0.4). Now I want to have a service accessing and caching an external REST interface. For the sake of simplicity let's assume this REST interface is returning Json objects for given numeric…
towi
  • 11
  • 1
0
votes
2 answers

Call a service in SuperClass whose implementation is injected in subclass

I'm using Weld for Cdi in a JavaSE application. Some of my services come in two flavors. Distinction in CDI via Qualifier (@Italian or @Chinese). Most service code is located in a a shared superclass. This superclass uses other services. Those…
groovedigga
  • 233
  • 3
  • 13
0
votes
1 answer

CDI at ResourceFile in Rest Service

Have a little problem at using CDI in a Rest Service: Created a J2EE 7 Dynamic Web Project with the following file TestRessource.java : @Path("/testpath") public class TestRessource{ @Inject IDataBase db; @GET @Produces("text/html") public Response…
Alex
  • 161
  • 1
  • 13
0
votes
1 answer

WELD-001408: Unsatisfied dependencies for type Gson with qualifiers @Default

All my other Injections are working but it's not working with gson. I have the feeling it's because it's an external package, but I can't resolve the issue. Here are my relevant files: Producer: public class GsonFactory { @Produces public…
Lukas
  • 169
  • 1
  • 3
  • 8
0
votes
0 answers

Inject a @Default Service

I have this following code: @Stateless public class Service { .... @Inject private Translator translator; .... } @Default @ApplicationScoped public class TheTranslator extends Translator {...} If I remove…
Sorin Penteleiciuc
  • 653
  • 1
  • 10
  • 26
0
votes
1 answer

CDI (weld 3.0.3.Final) not calling @PostConstruct if @ApplicationScope

I ran into a bit of an interesting problem as I was going through my latest application and working on coverting beans to @ApplicationScope since I really only needed 1 instance. I have a couple classes I created to inject values from a properties…
Michael Remijan
  • 687
  • 7
  • 22
0
votes
1 answer

What is the proper way to create a bean asynchronously using Weld SE (CDI)?

I am using a Weld SE container in my JavaFX application (via AfterburnerFX actually). A component is initialized (when a dialog window is shown to the user) and it's fields are injected. However, creating one of its dependencies takes much time. Is…
Valya
  • 740
  • 7
  • 17
0
votes
0 answers

How to inject an @Normal (@ApplicationScoped) bean into a @Dependent scope if the bean does not have a no-arg constructor

This post is related to an older SO Post of mine, wherein I was trying to understand the requirements of a no-args constructor by WELD. Right now, I'm trying to figure out if there is a way in CDI to inject an @ApplicationScoped bean (@Normal) into…
Eric B.
  • 23,425
  • 50
  • 169
  • 316
0
votes
0 answers

Portable CDI extension to inject beans at runtime

Referencing this: http://docs.jboss.org/weld/reference/latest-master/en-US/html_single/#_the_literal_injectiontarget_literal_interface Following the instructions from above, i am able to load SomeFrameworkComponent.class dynamically at runtime via…
hrs
  • 379
  • 4
  • 12
0
votes
0 answers

Spring Bean Factory cannot see classes

I'm developing an application that uses JSF (Mojarra) to control de MVC flow, but I also want to integrate Spring Security for its Autehntication and Authorization processes. However, I'm having a problem where Spring Bean Factory cannot instantiate…
Tiago Duque
  • 1,956
  • 1
  • 12
  • 31