weld Questions

2

Solved

So, I have a basic Java SE program with dependency injection using Weld 1.2. Everything is working fine, until I throw Hibernate into the mix, with the following pom.xml dependency entries: <d...
Lipoma asked 11/9, 2014 at 22:19

4

Solved

I have faced with the following issue. I am using Weld implementation of the CDI. I have found that if a service is annotated with @ApplicationScoped then @PostConstruct section is not invoked unt...
Polynomial asked 14/3, 2018 at 13:19

4

Solved

I am using tomcat v7 with Weld v2.2.9.Final and myFaces v2.2.7 after restart server in eclipse IDE and reload page I getting this error. I have no clue why this error appear to me. It has to be con...
Censorious asked 25/2, 2015 at 7:47

2

Solved

Say I have: public interface Foo {...} public class AltProducer { private Foo altFoo; @Produces @Alternative public Foo getAltFoo() { return altFoo; } } What do I need to put in beans.xml s...
Yahweh asked 3/2, 2014 at 8:17

1

Solved

Testing memory leaks with creation of multiple @Dependent instances with WildFly 18.0.1 @Dependent public class Book { @Inject protected GlobalService globalService; protected byte[] data; pr...
Hoitytoity asked 28/4, 2020 at 21:38

1

Solved

I use Java 14 with Jetty 9.4 and Weld-servlet-shaded-3.1 and I get this exception: Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.l...
Vivavivace asked 29/3, 2020 at 17:30

3

Solved

My configuration is: Wildfly 8.2.0, Weld Is it possible to inject in bean and not in its interface in CDI ? @Stateless class Bean implements IBean { ... } interface IBean { ... } @SessionScope...
Metropolitan asked 22/12, 2015 at 8:23

3

I have searched every where, but seem I cannot find out the best answer for me to resolved this error, there is my stack trace, can somebody tell me what happening with me, I have spent twos date t...
Mussel asked 19/3, 2013 at 10:2

5

When trying to inject arguments into the constructor of a CDI bean (ApplicationScoped), I'm encountering the following issue: Caused by: org.jboss.weld.exceptions.UnproxyableResolutionException: W...
Microsurgery asked 3/10, 2017 at 11:36

1

I have a Conversation scoped bean, ComponenteM, that is injected in a Request Scoped bean, ComponenteC. @Named @RequestScoped public class ComponenteC implements Serializable { @Inject Component...
Urgent asked 11/8, 2015 at 10:40

2

I'm trying to updating my Jersey project from 2.25 to 2.27. Jersey is part of Java EE 8 since version 2.26, so I've also decided to update my project from Java EE 7 to Java EE 8, and from JAX-RS ...
Balmy asked 4/6, 2018 at 9:13

1

Solved

Coming from a Guice background, I know that it is possible to seed an object value from a scope using. scope.seed(Key.get(SomeObject.class), someObject); I suppose one could do this by register...
Length asked 12/7, 2016 at 6:34

3

Solved

My app is being deployed on to IBM WebSphere. I have a simple service and I'd like to know how dependency injection works in this case. // stateless EJB @Stateless public class UserService { pri...
Intoxicant asked 19/11, 2018 at 14:27

2

Solved

I have created a Java project to serve as a lib to other projects, reducing code duplication between projects. This lib project is exported to jar to be included in Web projects (WAR, not EAR). In...
Arria asked 24/8, 2016 at 0:12

4

Solved

I am setting up basic environment for learning CDI in JavaEE7. I have the following code for starting Weld. Just a startup and shutdown. package com.anshbansal; import org.jboss.weld.environment....
Stringency asked 11/7, 2014 at 19:21

0

I use Deltaspike CdiControl to start up the CDI container for my unit tests. That works fine but there is a problem: If I use this approach for Maven web app the beans.xml end up in src/main/webapp...
Schoolmarm asked 4/3, 2018 at 21:0

2

Solved

I'm trying to apply the constructor injection pattern to beans in my CDI application and am encountering the following error message: 15:18:11,852 ERROR [izone.adams.webapp.error.IzoneExceptionHan...
Hindi asked 23/1, 2018 at 20:42

1

I have a schedule service which gets its job via REST as JSON. The Resource class: import java.io.IOException; import javax.inject.Inject; import javax.ws.rs.Consumes; import javax.ws.rs.POST; i...
Kandace asked 22/3, 2016 at 14:0

3

Solved

I am able to deploy a RESTEasy application working well with Weld (meaning my CDI works) but I am having some trouble with my integration tests. I get this error: org.jboss.weld.exceptions.Deploym...
Unsocial asked 24/1, 2017 at 18:48

4

Solved

I do a small test project with CDI. My application is composed of an EJB EAR and WAR, all deployed on Glassfish 4. I'm using Hibernate 4.3.4 to access the database. My goal is to verify that a cla...
Ludicrous asked 5/3, 2014 at 7:32

2

Solved

In Spring, I can inject an javax.persistence.EntityManager into a Spring bean using the annotation @javax.persistence.PersistenceContext, like this: @Service public class MyRepository { @Persiste...
Estellaestelle asked 7/11, 2016 at 15:46

4

Solved

Is it possible to set conversation timeout globally for all conversation objects injected into @Named beans? I have several @ConversationScoped beans, e.g.: import javax.annotation.PostConstruct;...
Cetinje asked 1/10, 2013 at 6:36

6

Solved

How can I programmatically inject a Java CDI 1.1+ managed bean into a local variable in a static method?
Partly asked 17/7, 2014 at 8:30

3

Solved

I have an application, which has multiple modules and various dependencies. When I deploy the application on Glassfish 4, I am getting error: org.jboss.weld.exceptions.DeploymentException: WELD-00...
Silvester asked 18/11, 2013 at 14:31

4

Solved

I would like to exclude a class from scanning in CDI 1.0. I'm using the default implementation of CDI in WebLogic 12.1.12 (Weld, CDI 1.0). I saw several web sites and docs with CDI 1.1 but not wit...
Untenable asked 14/3, 2014 at 13:6

© 2022 - 2024 — McMap. All rights reserved.