Questions tagged [weld-se]

45 questions
15
votes
1 answer

No active contexts for scope type javax.enterprise.context.RequestScoped when invoking a bean from a thread

While using Weld-SE 2.1.2.Final to obtain a bean and to invoke it from a thread, I encounter the following exception: Exception in thread "main" org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active contexts for scope type…
Nader
  • 185
  • 1
  • 1
  • 9
13
votes
5 answers

Bean discovery problems when using weld-se with Gradle application plugin

I am building a Gradle-based Java SE application built on top of Hibernate as my ORM of choice. My plan is to use weld-se to be able to use CDI annotations for injections of EntityManagers throughout the application. Based on the common…
AdrianoKF
  • 2,891
  • 1
  • 25
  • 31
6
votes
1 answer

WELD SE with JUnit 5 require enabling bean discovery programmatically

I'm setting up an example project for testing purposes which uses Weld SE and JUnit5 and for some reason, in my test classes, after initializing weld I observ that, for some reason, it's bean discovery is disabled, which in the end, it lead me to…
Richard Temp
  • 131
  • 1
  • 8
4
votes
1 answer

How to get an executable jar for a weld se application

I have a little cli application that uses weld se that works fine if i run the application from within eclipse (using the main method from weld se: org.jboss.weld.environment.se.StartMain) The problem is i can't create an executable jar that works.…
dermoritz
  • 12,519
  • 25
  • 97
  • 185
4
votes
0 answers

weld-se CDI and intellij idea with multiple modules

I have case where I am developing simple standalone application constructed from 3 jars (A,B,C) built by maven. each of this jar is a separate module in intellij idea. jar A has dependency on jar B and C. jar A starts weld-se container and load…
kamiseq
  • 593
  • 4
  • 17
3
votes
3 answers

Warning at Weld 3 startup with XSD invalid beans.xml for weld:scan tag

I just updated Weld from version 2.4.4 to 3.0.1. I am facing the following error at the application startup and I cannot found a solution. I am using Weld SE. Sep 15, 2017 1:25:12 PM org.jboss.weld.xml.BeansXmlHandler error WARN: WELD-001208: Error…
Nicolas Henneaux
  • 11,507
  • 11
  • 57
  • 82
3
votes
3 answers

Error when try run Weld Se Applicaton - Weld SE container cannot be initialized - no bean archives found

I create a simple JavaSE app using Weld SE. I'm I try to run with gradle run it throws an exception: :compileJava UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :runmai 17, 2016 12:55:55 AM org.jboss.weld.bootstrap.WeldStartup…
alexpfx
  • 6,412
  • 12
  • 52
  • 88
2
votes
1 answer

How to log why WELD SE Container is shutting down

EDIT: It turns out that my docker container was closing because of an errant health check failing. This caused the kubernetes probe to fail too many times and killed the pod. Since the command came from outside the JVM, it is likely not possible for…
Mike
  • 820
  • 7
  • 19
2
votes
1 answer

weld-se unable to find bean in different jar on classpath when running from command line

I've got a simple standalone application that uses weld-se, but I fail to get beans detected from all bean archives on my classpath Basically, I have a bunch of jar files in the directory where I run: java -classpath * a.b.c.Generator Two of these…
Steven De Groote
  • 2,187
  • 5
  • 32
  • 52
2
votes
1 answer

how the weld container service for application in java se environment?

I am a novice in weld, and through several days exploration but I only know some fundamental concept of weld. I'm intended to use weld container in java se environment. And follw What is the easiest way to have CDI and JPA in Java SE? my code…
nail fei
  • 2,179
  • 3
  • 16
  • 36
2
votes
1 answer

Weld using alternative producer from src/test/META-INF/beans.xml

I am trying to use Weld SE 2.3.0.Final to swap an alternative implementation of an injected dependency during testing by supplying a different beans.xml in src/test/resources/META-INF It always seems to use the main version of beans.xml though and…
PDStat
  • 5,513
  • 10
  • 51
  • 86
2
votes
0 answers

Get all Beans with a qualifier

I am looking to get all Beans with a Qualifier. My current approach is to get all registered Beans and look for the Qualifier annotation. But since the Beans are proxy objects this is not possible. I am using Weld SE 2.2
Lukas Eichler
  • 5,689
  • 1
  • 24
  • 43
1
vote
1 answer

Weld SE: not injecting inner dependency in Junit Test

I am using Weld SE in a junit test. It seems it does not inject an inner field of a CDI bean. I am using the maven artifcat weld-se-shaded (4.0.2-Final) import javax.enterprise.context.ApplicationScoped; @ApplicationScoped public class XService { …
pesche666
  • 139
  • 1
  • 13
1
vote
0 answers

Disable Weld-SE startup debug logging level when running unit tests

I have some tests in my project and when I run them through IntelliJ, I get many lines of logging statements from WELD. I can't figure out how to disable them or set them at WARNING or higher level. This is the current output every time I run a Test…
1
vote
3 answers

Unsatisfied dependencies using CDI with Weld when running unit tests on Java SE

I have a small (Java SE 11.x) project where I'm testing CDI with Weld. I have these dependencies (among others but these are the relevant ones for this…
x80486
  • 6,627
  • 5
  • 52
  • 111
1
2 3