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
2 answers

Tomcat, WELD 3, CDI 2, WeldTerminalListener

Trying to set up a maven web project with CDI 2.0 which should run on Tomcat 8.5. So I have to install the jboss WELD 3. What is the relation between Weld, CDI and Java EE versions? With the POM declaration out of here (only…
Jens Fuchs
  • 65
  • 1
  • 9
0
votes
0 answers

EntityManager Throws NullPointerException

I am running the keycloak Photoz example. When I deploy to Wildfly, the EntityManager is not injected and I get a NullPointerException (below). I've tried a few different strategies -- tweaking persistence.xml (remove LOCAL_RESOURCE) and switching…
Brett
  • 8,575
  • 5
  • 38
  • 51
0
votes
0 answers

Injecting Resource into DeltaSpike instantiated class

I'm using JBosss EAP 7. To avoid long turnaround cycles it would be nice to test WebService consumer directly without starting the Appserver. For this purpose we are working with DeltaSpike and Mockito. Besides this our application is based on an…
0
votes
0 answers

SessionScoped bean setter sets value to real class instead of proxy

I'm using Weld CDI version 3.0.1 on Glassfish 5 with CDI API 2.0 and Java 8. I've just created a simple application with a LoginController class that should just accept 'asd' as username and 'asd' as password and set a User object to my…
500 Server error
  • 644
  • 13
  • 28
0
votes
2 answers

CDI Logging Interceptor not working in @PostConstruct

I wanted to create a LoggingInterceptor for my current Stack: Tomcat 8.5.24 Weld 2.4.5-Final JSF 2.3.3 Here is the Annotation to mark methods or types for interception. import java.lang.annotation.ElementType; import…
Kamikazzze
  • 137
  • 2
  • 11
0
votes
1 answer

CDI Injection in Servlet Filter Tomcat 7.0.50

I would like to inject a bean into an servlet filter as described under https://stackoverflow.com/a/7815328/802058 but it does not work for me. My configuration is: @FacesConfig( version = Version.JSF_2_3 ) @Named @SessionScoped public class…
Toru
  • 905
  • 1
  • 9
  • 28
0
votes
0 answers

WELD-001308 with empty qualifieirs

I have this error in my application, but it doesn't say much about the source of error. ERROR [stderr] Exception in thread java.lang.RuntimeException: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308: Unable to resolve any…
fareed
  • 3,034
  • 6
  • 37
  • 65
0
votes
1 answer

Weld: Generic factory for many service-interfaces extending common super-interface

How can I create a single common factory for hundreds of service-interfaces? I have a common generic super-interface, which all my service-interfaces extend: BaseDao There are hundreds of (generated) interfaces sub-classing my BaseDao, e.g.…
Marco
  • 304
  • 4
  • 6
0
votes
1 answer

How to resolve WELD-001318 with Wildfly Swarm for class io.swagger.jaxrs.listing.SwaggerSerializers?

I added Wildfly Swarm 2017.12.1 to my pom. I have not added the fractions manually since all are discovered automatically: 2018-01-03 14:37:34,976 INFO [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction: Logging - STABLE …
user5444681
0
votes
0 answers

Injected stateless bean is always null in servlet methods

I have an application service class that is application scoped: @ApplicationScoped public class ApplicationService { ... } I want to control which methods of the application service are exposed to the servlets, so there is a facade class. The…
SteveB
  • 483
  • 1
  • 4
  • 18
0
votes
1 answer

CDI doesn't see an interceptor

I don't understand why interceptor is not found. I get the following error: the class is not found, or not annotated with @Interceptor and still not registered through a portable extension, or not annotated with @Dependent inside an implicit bean…
Alex Bondar
  • 1,167
  • 4
  • 18
  • 35
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

Does Weld (reference implementation of CDI) have any kind of prototype scope as it exists in Spring?

Does Weld have any kind of scope like prototype in Spring? Weld has qualified @New but it is a little bit different. What I want to do is following: I have bean with application scope. In this bean I need to have reference to bean with scope…
0
votes
1 answer

Is Weld an Java SE Runtime environment or a container for Java SE?

What exactly is Weld ? Is Weld an Java SE runtime by itself or it is only a container which can be used in my existing JRE ?
yathirigan
  • 5,619
  • 22
  • 66
  • 104
0
votes
2 answers

Vertx with resteasy and weld

I need a sample application using vert.x, resteasy and weld-cdi. I am able to use vert.x and resteasy. But i do not know how to integrate weld-cdi. Please help me.