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

Injecting one ejb bean inside another within the same jar module not working

I have two beans in my jar module -> bean A: @Singleton public final class A { public String getS() { return""; } and a second bean B within the same jar module: @Stateless public final class B { @Inject private A a; …
michalavis
  • 79
  • 1
  • 8
0
votes
1 answer

Is there a way to use weld and cdi-unit with java 11 openj9

I am using weld and cdi-unit with java 11-openj9 in a project, when I run my unit test, configured with @runWith(Cdirunner.class) I get this error "ClassNotFoundException: org.jglue.cdiunit.CdiRunner"
0
votes
1 answer

I want to use CDI with Java SE 12, but start up failes (Main Class, JBoss or Payara, all the same error)

I got completely stuck. I want to use CDI2 with Servlets to write a simple web app. However, the beans not get loaded. I get the following error in JBoss or Payara or Weld (if running as Main Application): WELD-001524: Unable to load proxy class for…
0
votes
1 answer

Liquibase applies patches after Camel starts, leading to an error

I'm struggling to get Liquibase and Camel to work seamlessly. It happens that Camel initiates its routes before Liquibase applies its patches, leading to an error if the former has to access a table that is not in the database yet. As a workaround,…
aleric
  • 152
  • 4
  • 9
0
votes
0 answers

Dependency Injection in combination with Factory

I have a factory which creates actions based on parameters. They implement my Action interface. interface Action { ActionResult execute() throws Exception; } class CopyAction implements Action { ... } class MoveAction implements Action { …
Martin
  • 852
  • 7
  • 20
0
votes
1 answer

Constructor Injection not working in Servlet + WELD + Tomcat

I have problem with Constructor Injection in CDI. Field or property injection works fine. Constructor Injection of Field injected instances works fine as well. The only thing is not working - constructor injection in Servlet Classes. Configuration:…
Krzysztof
  • 517
  • 1
  • 4
  • 11
0
votes
1 answer

How can I handle multiple disposal methods for inherited types?

I have two classes. class A { } class B extends A { } And in my producer class I declared like this. @Produces A produceA(InjectionPoint ip) { return new A(); } void disposeA(@Disposes A a) { // empty } @Produces B…
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184
0
votes
0 answers

How to setup SparkJava CDI with DeltaSpike and Weld

So I've started setting up a simple SparkJava application from scratch with the basic goal of comparing it to a mirrored SpringBoot (with SpringData) application which I've already built. However I've been struggling with DeltaSpike (which is the…
vitorrrr
  • 70
  • 7
0
votes
0 answers

Proper way to handle multiple injected @ConversationScoped beans

I am injecting multiple @ConversationScoped beans in one @ViewScoped bean and this has caused a lot of Conversation Locked issues. To rectify this issue, in all the @ConversationScoped bean, I put lines of code to end the existing conversations…
0
votes
0 answers

error occured while linking abaqus2018 with vs2016 and ps2012

I have a problem in linking the abaqus 2018 with the visual studios 2012 and parallel studios 2016.... the error refers that"Problem during compilation - C:\Circulr weld\arcweld.for"..this was one of the problems when the job was running in…
0
votes
1 answer

class not found in war but is available

I have a war that I try to run under Tomcat but I get an error stating that a class is not found. java.lang.ClassNotFoundException: org.jboss.weld.proxy.WeldConstruct When I check the exploded war I see that the class is available. When I now move…
Milo van der Zee
  • 1,031
  • 11
  • 30
0
votes
0 answers

Cannot inject spring data JPA repository into EJB bean on WebSphere

I try to integrate CDI spring-data-jpa in Java EE environment. I created a very simple repository: public interface SampleRepository extends JpaRepository { } I also added the CDI producer for the…
Adam
  • 884
  • 7
  • 29
0
votes
0 answers

Simple usage of (weld) DI for Jersey and Hibernate project

I'm bootstrapping a new Java restful api service using jersey and hibernate. I'm struggling to put DI into the whole thing. Specifically I can't seem to inject hibernate stuff (EntityManagerFactory or EntityManager) and also I'd love to de-couple…
mfirry
  • 3,634
  • 1
  • 26
  • 36
0
votes
1 answer

Wildfly 14 CDI: WELD-001408 on 3rd part JAR after migration from JBoss 7

We are migrating a few old systems written in Java 5, 6 and 7 to Java 8 and from JBoss 7 to Wildfly 14. After the migration, I get all the time this kind of error: WELD-001408: Unsatisfied dependencies for type InterfaceTypeConverterProvider with…
André Silva
  • 103
  • 8
0
votes
1 answer

How to get the @Qualifier member value?

I have an @InterceptorBinding with member value like this: @Target({ElementType.METHOD, ElementType.TYPE}) @InterceptorBinding @Retention(RetentionPolicy.RUNTIME) public @interface Transactional { boolean value() default true; } and an…
Hen
  • 253
  • 1
  • 2
  • 16