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
0 answers

Cannot initialize weld

I'm using CDI in java SE project with Weld, so everything was working fine, but now i'm getting the below error when trying to run the code: avr. 07, 2019 4:55:23 PM org.jboss.weld.bootstrap.WeldStartup INFO: WELD-000900: 3.0.0 (Final) avr.…
Hen
  • 253
  • 1
  • 2
  • 16
0
votes
1 answer

How to change instance (target) under CDI (Weld) proxy without proxy recreation

I want to refresh bean (destroy, initialize) if some property is changed, for example db url connection. The problem is that this bean might be already injected in other beans in CDI container. I have 2 thoughts about this: 1. If bean is proxied -…
Igor Dumchykov
  • 347
  • 1
  • 15
0
votes
1 answer

Re-inject CDI bean if some injected property changed

I have a bean BeanA with injected property private int url: class BeanA { @Value(${"db.url"}) private String url; private DbConnection connection; } Let us say this Value annotation is similar to Spring Value. During initialization, connection will…
Igor Dumchykov
  • 347
  • 1
  • 15
0
votes
1 answer

Gettting WELD Exception on server startup of weblogic where as using Google Guice for DI in Jersey based application

I am using Weblogic 12b as App server. My application uses Jersey 2.5.1 with Guice3 in my project. I have a class called Application derived from org.glassfish.jersey.server.ResourceConfig. On server startup I am getting error as below: Caused By:…
0
votes
0 answers

Failed to use Injection point in rest service

public class ApplicationBinder extends AbstractBinder { @Override protected void configure() { @Override protected void configure() { …
Alex Roy
  • 11
  • 1
  • 5
0
votes
0 answers

WELD-001409: Ambiguous dependencies for type InjectionPoint with qualifiers

I am doing POC on CDI2.0 with JavaSE using wildfly Weld for CDI implementation.I am able to run the application using maven exec:java command. I have added maven single jar with dependency plugin to make a single jar with java main class. took…
Gnana
  • 2,130
  • 5
  • 26
  • 57
0
votes
1 answer

The calling class org.jboss.resteasy.cdi.CdiInjectorFactory is placed in multiple bean archives

This question was asked before on stackoverflow but, was not appearing as the main question of the post. It was a secondary question. That's why I asked it on a new discussion. The aim is to have a better answer rate. I asked stackoverflow an advice…
flamant
  • 733
  • 4
  • 15
  • 41
0
votes
1 answer

java.lang.reflect.InvocationTargetException when I run jetty

I try to run a deployment of an app with jetty 9.4.8. It is an angular java maven multi module app Here is my web.xml
flamant
  • 733
  • 4
  • 15
  • 41
0
votes
0 answers

How to manually inject dependencies into a bean in a AfterBeanDiscovery event listener (CDI)

I am using CDI 1.2 (Weld 2.3.5) and want to manually instantiate a bean and inject its dependencies during an AfterBeanDiscovery event listener. I'm expecting that this would allow me to ensure that its Initialization would precede the…
Eric B.
  • 23,425
  • 50
  • 169
  • 316
0
votes
0 answers

WELD is not injecting object

I've got a jsf-hibernate application running on a Tomcat v7.0 Server and my problem is that the service is never injected to the handler, so I get a Nullpointer at getService().testMethod1() in the TestWELDHandler. And maybe someone has an idea…
JavaMan
  • 1,142
  • 12
  • 22
0
votes
0 answers

Embedded JAX-RS CDI (Undertow, RestEasy & Weld)

I've been trying in the last couple of days to setup an embedded Undertow server, with JAX-RS, using RestEasy, and CDI using weld. No matter what I do, nothing seems to work. I've read through every possible answer, and demo available I could find;…
elad.chen
  • 2,375
  • 5
  • 25
  • 37
0
votes
1 answer

Java SE and Weld?

I'm currently testing CDI 2.0 for Java SE (weld) - I read, that it won't be necessary to use a beans.xml, so I tried this out: Hallo.class: public class Hallo { public String sayHallo() { return "hallo"; } } Then i have a…
gala_m
  • 37
  • 8
0
votes
2 answers

Alternative CDI implementation - WELD-001408: Unsatisfied dependencies for type Repository with qualifiers @Default

I have an interface Repository with two implementations, DBRepository and UTRepository. UTRepository is annotated with @Alternative and I'm trying to use it in a JUnit test. The test class: @RunWith(Arquillian.class) public class UserServiceTest { …
dluga
  • 67
  • 1
  • 8
0
votes
0 answers

@ObervesAsync not receiving the event

In a weld bean (not EJB), I'm trying to handle an event Asynchronously. To do so I'm trying to fire an asynchronous event using Event.fireAsync and then catch the event using a method that takes the event object as parameter and is annotated with…
Morty
  • 3,463
  • 4
  • 17
  • 21
0
votes
1 answer

How can I inject for generic inherited types?

I spent a plenty of time for finding any answers, but I think I have to ask. I'm using Weld-SE for testing my entities. I prepared entity randomizer for testing. abstract class BaseEntityRandomizer implements…
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184