Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
28 views

Integration-Test: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor

I want to create a integration test against a database and clean it up afterwards in an wildfly/arquillian environment. But when I try to execute the Test I get a Could not create new instance of ...
OhJohnny's user avatar
  • 341
0 votes
1 answer
58 views

Helidon MP EntityManager always return NULL

I am facing a NullPointerException when trying to use EntityManager in my Helidon MicroProfile project. The exception occurs because the EntityManager is null when I attempt to create a query. The ...
Sid-Ali's user avatar
0 votes
1 answer
33 views

How to inject searchPath parameter with Liquibase CDI

I'm trying to inject the searchPath parameter when using Liquibase CDI, but none of my approaches below seem to be working. Due to circumstances out of my control this is the only way I can modify my ...
zython's user avatar
  • 1,288
0 votes
0 answers
28 views

The scope of the EntityManager being re-exported by a factory matter or not?

I want to use CDI's @Inject for EntityManager instances instead of using the @PersistenceContext annotation. Notes that I am using JTA Container Transaction Managed. I plan to use @ApplicationScoped ...
LHA's user avatar
  • 9,625
0 votes
0 answers
81 views

Unsatisfied dependencies for type AbstractDao with qualifiers @CustomQualifier in CDI

I'm working on a Spring project using CDI (Contexts and Dependency Injection) and I'm encountering an issue with dependency injection. The error message I'm getting is: org.jboss.weld.exceptions....
sparker's user avatar
  • 1,578
1 vote
1 answer
407 views

java.lang.ClassNotFoundException: jakarta.enterprise.inject.spi.el.ELAwareBeanManager

I am currently migrating a project from Java 11 to Java 17, Spring 5 to Spring 6, and from RichFaces to PrimeFaces 14 (Jakarta). After making the necessary changes, I am encountering the following ...
sparkey's user avatar
  • 168
1 vote
0 answers
16 views

Why is the return value of injectionTarget.getInjectionPoints() ignored by Weld?

(I've also asked this question on weld-dev.) In a portable extension observing ProcessInjectionTarget, I have set a custom InjectionTarget using documented mechanisms. My custom InjectionTarget ...
Laird Nelson's user avatar
  • 16.1k
0 votes
1 answer
78 views

Bean injection into Hibernate BeforeExecutionGenerator

I'm using Hibernate's BeforeExecutionGenerator together with IdGeneratorType annotation to generate custom ids for my entities. How could I inject some beans (or config properties) into my ...
Andrei Yusupau's user avatar
0 votes
2 answers
82 views

Quarkus Test. Reset bean state

I have a stateful bean and some different test cases under @QuarkusTest for it. But each test case requires clean bean state for correct execution (tests should not depend on each other). Currently ...
Andrei Yusupau's user avatar
1 vote
0 answers
80 views

Weld not detecting @Inject with Jetty 12, Java 21 and Apache Wicket

I am trying to setup a small application with Jetty, Apache Wicket and Java 21 but it seems like my Weld DI is not picking up on the injection decorators (@Inject and @RequestScoped): My setup is a ...
Itsyaboi's user avatar
0 votes
1 answer
43 views

Error when using CDI Decorator to decorate the managed Validator

I have a stateless Java EE 7 WebService and want to use the validation framework to validate the incoming data. This all works fine. I then want to transform any ConstraintViolationException to ...
Alan Hay's user avatar
  • 23.2k
0 votes
2 answers
119 views

How to Provide Runtime Parameters to a Custom Annotation's Interceptor in a Jakarta EE Project?

I'm working on a Jakarta EE project where I have a custom annotation and an associated interceptor. The annotation is used to execute some logic, and it works as expected as a standalone. However, I ...
maxc123's user avatar
0 votes
0 answers
59 views

How to make CDI work in JerseyTest with Jakarta EE?

This setup works fine when running in Glassfish, but I get errors when running tests. My setup is this: UserRepository.java: @ApplicationScoped public class UserRepository { @Inject private ...
Håkan Gleissman's user avatar
0 votes
1 answer
28 views

ELProcessor and CDI beans in WebLogic

In Java I see this class, ELProcessor and a typical usage: ELProcessor elp = new ELProcessor(); elp.defineBean("employee", new Employee("Charlie Brown")); String name = elp.eval(&...
Sorin-Alexandru Cristescu's user avatar
0 votes
1 answer
67 views

CDI decorators support in Spring Boot

I am trying to use CDI decorators in Spring Boot application. Here is the CDI Decorators for Spring beans article, that describes the purpose and the way how it could be done. The article is pretty ...
Alexandr's user avatar
  • 9,475
1 vote
1 answer
540 views

Errors running builder 'CDI (Contexts and Dependency Injection)

Am using Eclipse with JBoss Tools to develop JSF 2.3 & JPA 2.2 based web application for Apache TomEE 8.0.16 server with Hibernate as JPA implementation. My project has many drop down menus and ...
శ్రీ's user avatar
0 votes
0 answers
153 views

Quarkus CDI failing to find ApplicationScoped bean during quarkus-maven-plugin

I've created a simple Quarkus application that interacts with a backend database, using the repository pattern and a scheduled bean to count the records in the database on a regular basis. During ...
Robert K's user avatar
  • 488
1 vote
2 answers
171 views

Quarkus check for bean injection point during maven package phase causing Unsatisfied dependency for type

I develop an extension that provide Injectable bean with a SyntheticBeanBuildItem. This bean is used via constructor injection in another projet that use this extension. /** * Bean to inject */ @...
Scandinave's user avatar
  • 1,438
0 votes
1 answer
426 views

Quarkus Bean initialization order

I have a situation where one of my classes needs to perform some initialization tasks when the application starts up. This class depends on another component that also needs to be initialized at ...
BananKongen's user avatar
0 votes
0 answers
114 views

With MapStruct, every componentModel field option is read as Default

It's not important if I put cdi, jakarta or even spring. The compiler only read "default". I nead jakarta. @Mapper(componentModel = "jakarta-cdi") public interface DepartmentMapper ...
idronick's user avatar
1 vote
0 answers
653 views

'CDI(Contexts and Dependency Injection' error in Eclipse New Versions 2024

My current projects run on Java 8 and I have made the configurations for this. While building projects; I get the error "errors running builder 'CDI (Contexts and Dependency Injection) Builder' ...
syscod3's user avatar
  • 11
0 votes
1 answer
79 views

CDI is null with upgraded dev stack

I am switching from a single to a multi-tenant database. I wanted to make use of the '@TenantId' annotation in hibernate 6. In order to use hibernate 6 I needed to upgrade from java ee to jakarta ee. ...
Samanite's user avatar
1 vote
1 answer
79 views

Generic enum bean producer

I'm trying to write a generic enum producer;every injection point declare a different enum-type and value is resolved againts a set of values declared elsewhere (not so important). I'm stuck writing ...
Luca Basso Ricci's user avatar
0 votes
0 answers
73 views

Quarkus Arc blocks Multi-Module Build in case of unset Properties in Module Build

I have a Quarkus Multi-Module Project (with Gradle), with following projects: Core Module1 Service1 Module1 contains an @ApplicationScope class that defines following Variable: @Inject @DataSource(&...
funkrusher's user avatar
1 vote
1 answer
44 views

Unable to inject EJB in @FacesConverter in EAR

I've got two demo projects with slightly different project structure. One produces a WAR archive and the other one produces an EAR archive. In the WAR-project the injection of an @EJB in the ...
Thomas P's user avatar
  • 143
1 vote
0 answers
62 views

CDI Custom Scope not working with WELD-001303 error

I have Jetty project (Jetty embedded based version 11) with JPA, CDI, JMS & JAX-RS project. Everything works good, however I want to add a new scope @Inherited @NormalScope @Retention(...
Shay Zambrovski's user avatar
0 votes
0 answers
87 views

Jakarta CDI - Spring integration issue

I'm facing an issue in a Jakarta Faces app with a JSF bean trying to access a Spring bean (rewriting everything from Spring to CDI or vice-versa is out of scope of this question). The CDI-Spring ...
Rin's user avatar
  • 16
1 vote
1 answer
101 views

RESTEasy + Weld (CDI) in WAR file deployed to Jetty 11 doesnt seem to work

I'm trying to deploy a WAR file to Jetty 11 that includes REST service written using RESTEasy which uses CDI (Context & Dependency Injection) via Weld, but it doesn't seem to work. The project is ...
Oberon's user avatar
  • 113
0 votes
1 answer
28 views

Avoiding deploy-time exception when the bean is not found for injection

I have this issue: I'm deploying an application (.ear) to WebLogic/CDI and I have this in one of my classes: @Inject @MyAnnotation private IMyStuff stuff; Of course, if there is no bean with this @...
Sorin-Alexandru Cristescu's user avatar
1 vote
1 answer
102 views

How to process and archive S3 files with timestamp appended in IICS

my source is S3 and fiiicsles are appended with timestamp and the file format is csv. I want to read the data from the file and archive it. For example : my s3 path s3-abc-asia1/datalake/landing/...
nithin's user avatar
  • 49
0 votes
0 answers
60 views

Dynamic bean registration Quarkus

Is there any way to initialize bean dynamically through runtime in Quarkus like it's in Spring https://www.baeldung.com/spring-5-functional-beans @RunWith(SpringRunner.class) @SpringBootTest(classes = ...
Disteonne's user avatar
1 vote
0 answers
105 views

quarkus smallrye reactive messaging - unittest

I'm trying to implement a small unittest, here I have 3 methods: @ApplicationScoped public class MyReactiveMessaging { @Outgoing("from-producer-to-processor") public ClassA produce()...
freedev's user avatar
  • 29.8k
0 votes
1 answer
56 views

Java BatchProperty possible as List<String>?

Is it possible in JSR-352 / Java Batch to have batch properties as List? How would they get initialized from the batch job XML? public class MyItemProcessor extends ItemProcessor { @Inject @...
queeg's user avatar
  • 9,287
-1 votes
1 answer
119 views

Quarkus CDI: lookup and startup event

Starting from the code in the official documentation, I have created the following structure: interface Service { String name(); } @LookupIfProperty(name = "service.foo.enabled", ...
Fabrizio Fortino's user avatar
1 vote
0 answers
45 views

A strange behavior is observed when using CDI beans with session scope in conjunction with the session-cache feature of OpenLiberty

OpenLiberty session-cache feature: A strange behavior is observed when using CDI beans with session scope in conjunction with the session-cache feature (with hazelcast provider) of OpenLiberty. The ...
Rafik's user avatar
  • 11
0 votes
0 answers
52 views

Using PrettyFaces to Manage JSF Conversation ID Without It Being Included in the URL on Postback

I'm working on a JSF (JavaServer Faces) application and I've decided to use PrettyFaces as the URL rewriting library. I want to manage the conversation ID (cid) without it being included in the URL on ...
ymnrad's user avatar
  • 1
0 votes
0 answers
98 views

Injecting Spring Bean into CDI - Creates new instance

We have a very old and large project based upon Spring. We later added JSF and that's working now. We are now testing using CDI (and eventually omnifaces) to avoid the memory problems with viewscoped ...
user avatar
0 votes
1 answer
69 views

Is EntityManager injected with @PersistenceContext to a @RequestScoped CDI bean thread-safe?

In a Java EE web application project, there is a DAO annotated as a CDI bean: @RequestScoped public class CustomerDAO { @PersistentContext private EntityManager em; //some persistence operation ...
Rui's user avatar
  • 3,663
0 votes
0 answers
88 views

How to inject HttpServletRequest in JAX-RS resource in order to get client IP

Java 21 and RMI. Tomcat 10.1. I want to get the client IP that is consuming my JAX-RS resource. Here is my code: Path("/") public class RequestHandlerWebSession extends ...
MARISTobi's user avatar
1 vote
2 answers
99 views

Jakarta CDI force bean construction/register legacy event listeners

I have a new Jakarta EE (Qurakus) application and some old code which has methods to register event listeners. I have made a wrapper for the event registry. Now I need some way to efficiently register ...
Fexl's user avatar
  • 69
0 votes
0 answers
34 views

Injecting ApplicationScoped bean into Web Filter results in null object

I have the following ApplicationScoped bean import javax.enterprise.context.ApplicationScoped; import javax.inject.Named; @Named @ApplicationScoped public class UserService implements Serializable {...
Sam Donato's user avatar
1 vote
0 answers
216 views

Quarkus: is there a way to register bean without any @Produces and other annotations?

Is there a way to register bean into bean container without any annotation like @Producer, @ApplicationScoped and so on? I know there is a way to do it in Spring, but I can't find any way how to do it ...
Disteonne's user avatar
0 votes
1 answer
41 views

dynamic cdi with @Any

In our Java EE application, we process different file types. But instead of injecting all types as @Any @Inject private Instance<FileHandler> handler We do it with a big switch. All handler to ...
Thomas E's user avatar
  • 521
0 votes
0 answers
32 views

Problem to inject СDI Bean in @WebServlet in JSF 4.0 [duplicate]

Excuse me, I'm recently learning programming and Java, mostly from YouTube videos. The problem is that all these videos are based on outdated frameworks, while I am trying to do the same thing using ...
Wilson Ikner's user avatar
0 votes
1 answer
134 views

Update TomEE 9.1.0 to 9.1.1/9.1.2 for JakartaEE 9.1 application results in UnsatisfiedResolutionException for specific inject

We are updating our applications from JavaEE 7 (JDK 1.8, TomEE-7.1.X) to JakartaEE 9.1 (JDK 11, TomEE-9.1.X). As we ran into problems with cxf-3.5 being used in TomEE 9.1.0 we tried to update to a ...
Raphael_S's user avatar
  • 180
0 votes
0 answers
301 views

WELD-001524: Unable to load proxy class for bean org.apache.cxf.cdi.ContextProducerBean

I am migrating Java web service from Java 8 to Jdk- 21. I was able to migrate everything but I have a problem with "cxf-integration-cdi.jar". I have weld-shaded.jar in my "WEB-INF\lib&...
Vinodini Thambudurairaj's user avatar
0 votes
0 answers
67 views

Inject singleton to ApplicationScoped

Can anyone explain why i can't inject Singleton bean to ApplicationScoped bean in Weld/CDI ? Got exception like - WELD-001408: Unsatisfied dependencies for type SomeSingletonBean with qualifiers @...
Benjamin's user avatar
  • 541
2 votes
1 answer
102 views

CDI in ClientHeadersFactory failed after upgrade to Jakarta-EE 10 in OpenLiberty

i'm using Open Liberty 23.0.0.12 on OpenJDK 21.0.1+12-29 for my application. After upgrading the server.xml to use Jakarta EE Web Profile 10.0 instead of 9.1, injections in ClientHeadersFactory doesn'...
Gordon Damerau's user avatar
1 vote
0 answers
19 views

JavaEE - Strategy Pattern - Error while injecting Lambda [duplicate]

I am learning java EE by buildig a supply manager app. I'm trying to implement the strategy pattern, by having a SalesCalculatorService interface: public interface SalesCalculatorService extends ...
CodeFarmer94's user avatar
0 votes
1 answer
58 views

How to determine which Bean Archive a Bean is from?

Question How would I determine, either during or after bean discovery, from which bean archive a bean originated, without relying on implementation specifics (if possible)? Elaboration Within the ...
Byebye's user avatar
  • 1,083

1
2 3 4 5
81