Questions tagged [weld-se]

45 questions
0
votes
1 answer

How to dispose of CDI created Runnable

I have a Java SE project that accepts will take some command line arguments are perform processing in a separate thread for specified argument. I am using the following weld microprofile config dependencies for injection
Mike
  • 820
  • 7
  • 19
0
votes
1 answer

weld-junit5 with weld 3

Recently we upgraded Weld to 3.0.3.Final (with is the one in Wildfly 12). Now weld-junit5 1.3.1.Final (the most recent version) throws an exception java.lang.NoSuchMethodError:…
Marc von Renteln
  • 1,229
  • 15
  • 34
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
0
votes
1 answer

Hooking into WELD-SE classpath scanner

I've been looking for documentation on WELD-SE's classpath scanner API, but haven't been able to find any. I'm trying to discover POJOs with custom annotations in the spirit of the Servlet, WebSocket and JAX-RS APIs. Is there any way to do this with…
KG6ZVP
  • 3,610
  • 4
  • 26
  • 45
0
votes
1 answer

Weld CDI in Java SE: PreDestroy annotated method called too early?

given the following code, I wonder why the CacheManager is still "alive" after the call to the @PreDestroy annotated method (CacheManager#doCleanup) (see output at the end of this post). Isn't Weld aware of the fact that it's still referenced ? And…
Dee.C.
  • 1
  • 3
0
votes
1 answer

"Argument bean must not be null" when packaging DeltaSpike & Weld SE as an uber-jar

I'm trying to package a command line application using CDI, DeltaSpike (to bootstrap) with Weld SE as the CDI implementation. The application runs fine when launched from my IDE but I'm getting an obtuse error message when packaging the application…
Yeroc
  • 1,054
  • 14
  • 21
0
votes
1 answer

Resolving ambiguous dependencies with CDI extension

I am trying to modify our existing CDI extension which creates its own proxy beans. Now there is only a single proxy created for each service. Services have something like application scope so there is always only a single instance of a…
livthomas
  • 1,160
  • 1
  • 14
  • 25
0
votes
1 answer

Spring Elasticsearch data repository in Weld SE CDI - UnsatisfiedResolutionException

I am trying to inject Spring data repository (Elasticsearch in this instance) in SE application, using Weld SE. Repository public interface EmployeeRepository extends ElasticsearchRepository { List findEmployeesByAge(int…
Sarpy
  • 265
  • 1
  • 7
  • 18
0
votes
1 answer

IllegalAccessError in Java SE app with Weld implementation

I am trying to run a standalone app that has Weld implementation of CDI, and in that app I need EntityManager to work with Oracle database. When I run my app (via Weld main method), following is shown in cmd line: Exception in thread "main"…
Sarpy
  • 265
  • 1
  • 7
  • 18
0
votes
0 answers

How to use CDI inside JUnit @BeforeClass

I try to use CDI with JUnit. I saw lot of example that implement a custom Runner that uses non-static methods. But i have one more constraint. I use the Cucumber runner on top of JUnit and selenium. So i can't use the BlockJUnit4ClassRunner. I must…
Scandinave
  • 1,388
  • 1
  • 17
  • 41
0
votes
2 answers

gradle test failing due to interceptor class not found

I'm working through the exercises in Beginning Java EE 7 except I'm trying to adapt them to use Gradle instead of Maven. For the chapter 2 interceptor exercise, I wrote this build.gradle: apply plugin: 'java' repositories { …
Allen
  • 478
  • 9
  • 21
0
votes
2 answers

Java reflection instance with Weld-SE context

I have a problem with creating object via reflection with Weld context. I'm loading classes and their configuration from external files. Simplify my code looks like: final Class moduleClass =…
enkor
  • 167
  • 14
0
votes
1 answer

Weld-SE not logging with log4j2

Im using weld-se and log4j2 for logger. But I cannot get anything from Weld. Other logging works fine. Libraries: org.jboss.weld.se weld-se-core
enkor
  • 167
  • 14
0
votes
2 answers

CDI: Interceptor is not invoked when called from a JUnit test

I have created an interceptor following the JBoss documentation. To test the interceptor, I put: @Interceptor @Transactional public class TransactionalInterceptor { @AroundInvoke public Object intercept(InvocationContext ctx) throws Exception { …
user3151902
  • 3,154
  • 1
  • 19
  • 32
-1
votes
1 answer

JNI error at Weld Example

Actually i want to create a small "Hello WOrld"-like Example of a JavaSE-Application with Weld-SE, but it seems that there is a runtime error. Here is my class: package de.mycompany.weldapp; import java.util.List; import…
Alex
  • 161
  • 1
  • 13
1 2
3