Questions tagged [weld-se]
45 questions
1
vote
0 answers
Exception when shutting down JBoss's Weld
I was testing behaviour of Weld & CDI, but whenever I call Weld::shutdown() the exception VerifyError is thrown:
Exception in thread "main" java.lang.VerifyError: Bad return type
Exception Details:
Location:
…

hexadecel
- 21
- 4
1
vote
1 answer
WeldSE with JUnit5 - Can't inject dependencies
This is my service class:
@Path("/foo")
@RequestScoped
public class FooService {
@Inject @Log
Logger logger;
@GET
@Produces(MediaType.TEXT_PLAIN)
public String ping() {
return "pong";
}
}
In the same module I have…

Fabrizio Stellato
- 1,727
- 21
- 52
1
vote
1 answer
Weld CDI: Producers in superclasses of alternatives are effective despite cdi-spec
Given
public class BeanContainer {
@Produces
Bean bean = new Bean();
}
and its alternative:
@Alternative
public class BeanContainerAlt extends BeanContainer {
@Produces
int producerInt = 10;
}
where Bean is
public class Bean {
…

aschoerk
- 3,333
- 2
- 15
- 29
1
vote
1 answer
Scope conflicts until batch job finished?
Tech stack:
JBeret (core, se) 1.3.0.Final
Hibernate Search (orm, jsr352-core, jsr352-jberet) 5.10.4.Final
Weld (servlet-core, se-core) 3.0.5.Final
If I trigger
BatchRuntime.getJobOperator().start(
MassIndexingJob.NAME,
…

zeitiger
- 177
- 2
- 11
1
vote
2 answers
Weld-SE not starting , no beans archive found
I'm trying to init CDI-SE context inside my Quartz Application, so i have the following dependency (maven):
org.jboss.weld.se
weld-se-core
…

Ronaldo Lanhellas
- 2,975
- 5
- 46
- 92
1
vote
2 answers
Why does my Interceptor Fail in a Weld SE unit test?
I have an interceptor that appears to be loaded correctly by JBoss (EAP 6.4) when I use it in a web app, but is rejected when I use the same beans.xml in a weld-se context.
package com.stackoverflow;
import…

Phil Standen
- 55
- 8
1
vote
1 answer
Packaging Java SE application with weld into executable Jar
I Got the following exception while trying to run JAVA SE executable jar from command line:
Exception in thread "main" org.jboss.weld.exceptions.DeploymentException: java.lang.Internand
at…

Géraud Willing B-S
- 273
- 1
- 2
- 17
1
vote
2 answers
Weld on Java SE does not use alternative
I have projectA, projectB, and projectC Eclipse Maven projects.
ProjectA contains:
IMyApi interface.
"Empty" META-INF\beans.xml file.
ProjectB contains:
IMyConfig interface.
MyConfigJndi implementation of IMyConfig.
MyApiImpl implementation of…

SJuan76
- 24,532
- 6
- 47
- 87
1
vote
1 answer
Do i need to make all object instantiation via producer in CDI
I just start a CDI project. In this project a Beans2 is injected inside a Beans1.
But the Beans2 has a method that create a file. This method instantiates the File Object like this :
new File('myPathFile');
Because this instantiation is not managed…

Scandinave
- 1,388
- 1
- 17
- 41
0
votes
1 answer
Synthetic bean not detected in bean archive due to being added to WeldDeployment.additionalClasses archive
I've been playing with Weld and CDI for a few months now and I've recently come across the following issue.
Problem situation
Using Weld SE 3.1.5.Final
Created a CDI Extension which adds a bean (SomeBean) using @Observes AfterBeanDiscovery…

Byebye
- 934
- 7
- 24
0
votes
1 answer
Deltaspike TransactionStrategy Alternative Ambiguous dependencies
I'm defining the TransactionStrategy in apache-deltaspike.properties, using Global Alternatives…

m_junior
- 591
- 1
- 8
- 19
0
votes
1 answer
How do I validate a normal method as if it were a CDI InjectionPoint?
I'm building a simple API framework on top of Weld CDI and Undertow, to get familiar with the CDI Portable Extension programming model. It's a strict subset of JAX-RS:
@Default
@Path("/dogs")
public class Dogs {
@Inject
private MyService…

Christian Carter
- 103
- 4
0
votes
1 answer
Weld SE shut down by shutdown hook doesn't executes @PreDestroy
I have a very simple Java Weld SE application. According to docs the Weld registers a should hook to shutdown the containers properly. I would expect it tries to shutdown all managed beans properly, but instead it seems the container finishes…

bambula
- 365
- 1
- 12
0
votes
2 answers
jBeret + Weld SE - Inject managed bean from Batchlet
I'm trying to make CDI work on JBeret SE.
This is my code:
SampleBatchlet class
@Named
public class SampleBatchlet extends AbstractBatchlet
{
@Inject
@BatchProperty(name = "foo")
String foo;
@Inject
StepContext stepContext;
…

Fabrizio Stellato
- 1,727
- 21
- 52
0
votes
1 answer
WELD-SE + JUnit5 WELD-001409: Ambiguous dependencies for type Validator with qualifiers @Default
I want to create a unit test of a REST resource using WELD SE with JEE8 (CDI 2.0).
This is the code of the REST resource class:
@Path("/members")
@RequestScoped
public class MemberResourceRESTService {
@Inject
private Logger log;
…

Fabrizio Stellato
- 1,727
- 21
- 52