Most voted "cdi" questions
CDI or Context and Dependency Injection (<a href="https://jcp.org/en/jsr/detail?id=299">JSR 299</a>) is the Java EE specification for dependency injection and context control.
Learn more…85 questions
Sort by count of
-
1
votes3
answers813
viewsHow to find Session in Hibernate 5.2.3.Final
hello! Guys I’m changing my Hibernate from version 4.3.8.Final to 5.2.3.Final. Now I’m not getting the Hibernate Session like I used to, like this: (Session) manager.unwrap(Session.class); Gives…
-
1
votes0
answers172
viewsJSF + DDD : Is it correct to use the domain entities within the bean Managed?
1 - In the DDD it is correct to let the domain objects be fed by the JSF through EL ? // classe da camada de dominio public class Cliente { private String nome; // getters e setters; } // bean…
-
1
votes1
answer514
viewsCalculate the total Sales Revenue
I have a consultation page that shows the total of the revenue for each product and I want to calculate the total of the sum of the recipes but is going wrong. The correct summing in the hand gave…
-
1
votes1
answer164
viewsDoubt Converter and CDI
I’m a few hours testing and trying to understand why this code here isn’t working and I’m getting one NullPointerExcepetion . Someone can sense something wrong ? import…
-
0
votes0
answers260
viewsuser editing screen does not load data, and delete method does not delete
Take a look at the codes: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"…
-
0
votes2
answers191
viewsnull return when registering new product, but when editing I can save give no error
Hello guys I’m having jsf application problems, cdi, when new product registration give null return, but when editing makes editing normally. give error ago 28, 2016 12:52:37 AM…
-
0
votes1
answer163
viewscdi does not find daos(spring data +ejb+cdi)
the situation is as follows , I am using spring boot and The first thing I did was disable tom cat and use wildfly(10) I used spring data to create the Daos public interface AutoresDao extends…
-
0
votes1
answer279
viewshow to create a bean that returns an entityManeger
am using springboot + ejb + cdi + wildfly10 already created the datasource and configured , I went to the interface wildfly and DS is connecting normal. Dao @Repository public interface PessoaDao…
-
0
votes1
answer98
viewsSubproject dependency injection . jar
I have an app EJB who owns a lib jar as a dependency built for code reuse. My . jar has a class that has been annotated with @RequestScoped, and I need to retrieve it on my ejb. I’m using the…
-
0
votes1
answer206
viewsError saving to bank (Unable to build Entity manager Factory)
I am trying to implement a register but when clicking on the button to save the following error appears in the console: dez 18, 2017 3:49:14 PM org.hibernate.ejb.HibernatePersistence logDeprecation…
-
0
votes0
answers21
viewsHow to get server path without starting Facescontext - JOB execution?
I have a JOB in which I need to download files in order to use them. My project is Java + JSF + CDI. It happens that at the time of the execution of JOB I have no user logged in and the return of…
-
0
votes1
answer43
viewsInvocationtargetexception in dynamic method
I’m in a very strange situation. I get it from my Bean the following arguments: #{segurancaBean.callSubAcaoMethod(subAcao, moduloBean.class.name, modulo.id)} This method is dynamic: public void…
-
0
votes1
answer100
viewsKeep Bean alive even after a redirect - JSF
Does anyone know any way to leave a Bean alive even after giving a redirect? The situation is like this: I am developing a project where, in theory, the user login and the user and password he typed…
-
0
votes1
answer30
viewsinject CDI Beacons into during testing using Arquillian Chameleon
I’m unable to inject with CDI @Inject. The field movimentador If the contract is void. I believe it is because of Beans.xml, but how do I create Beans.xml using Maven-build-Deployment, because I am…
-
0
votes2
answers563
viewsGives success message that saved, not error message, but in the database is not saved - jsf
My code is giving message of success in saving the record, but in reality it is not saving, I have already checked in the database, is not generating error message, and presents the code all right,…
-
0
votes0
answers44
viewsSoftware design with rich classes and CDI
Good night. I’ve read a lot about software architecture using rich classes, dependency injection and such. According to what I have read, the ideal is to receive in the constructor the information…
-
0
votes1
answer35
viewsShow itemLabel instead of ivemValue in Datatable - JSF, Primefaces
Well, I am working on a project and when saving a register using selectOneMenu of the primefaces, an Id is being displayed instead of the field name that was selected, I need to know how to display…
-
0
votes1
answer54
viewserror file facesProduces
is making a mistake Caused by: org.jboss.Weld.exceptions.Deploymentexception: WELD-001409: Ambiguous dependencies for type Httpservletrequest with Qualifiers @Default at Injection point…
-
0
votes1
answer149
viewsInjected object but is null
I have an object that is injected into my converter : package br.com.pokemax.modelo.converter; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import…
-
0
votes1
answer226
viewsHorizontal Scroll Bar, selectOneMenu - Primefaces
Good Morning, I am developing an academic project using JAVA EE, JSF, Primefaces, CDI, Hibernete among other technologies... The layout is responsive and I’m using Panelgrid to organize the form…
-
0
votes1
answer231
viewsPrimefaces (Tabview): Null properties when saving
I’m using a Tabview with two tabs and each tab with an external file with fields. By clicking the "Save" button the attributes are coming as null. Follows the code: Clientescadastrados.xhtml: ...…
-
0
votes1
answer557
viewsProblems with CDI + Weld in Wildfly
I’m trying to create a EntityManagerProducer and it seems in the examples found on the internet something very simple, but it is not being. So I conclude that I am doing something wrong follows my…
-
0
votes1
answer274
viewsHow to integrate CDI-Unit with Jersey Test Framework?
Hello. I am working on a Ws Rest with CDI and Jersey. I want to create a test unit with Junit and due to CDI ended up using the CDI-Unit Runner. I found CDI-Unit simpler than Weldjunit4runner. Now,…
-
0
votes1
answer246
viewsJsf&primefaces CSS problem
Project -- JSF CDI Mysql //I am not using Maven Good afternoon, my question is this: I would rather use style="...." ; in xhtml code, to make the code more elegant, make use of css. for example, I…
-
0
votes1
answer228
viewsCDI is not working with Tomcat7 by Maven + JSF
I’m not able to make CDI work, I’m using the tomcat7 plugin from Maven. Beans.xml is created and in the WEB-INF folder, context.xml is also in the META-INF folder, I also put the CDI dependencies,…
-
0
votes1
answer239
viewsjavax.ws.rs.client.Client set timeout
I have a web application where at a certain time I make requests on a endpoint using JAX-RS RestEasy as follows: // Outros códigos acima @Inject private Client client; ... WebTarget webTarget =…
-
0
votes2
answers118
viewsI cannot make the LIST page work in JSF
I have the following code I am developing with JAVA JSF, primefaces, postgre, cdi, Tomcat: BUSCARBEAN package controller; import java.io.Serializable; import java.util.ArrayList; import…
-
0
votes1
answer644
viewsError Rendering View - JSF + CDI + Primefaces
Good evening, I have the following context: My application uses JSF2, CDI and Primefaces, my view is yielding normally, however, if I start an F5 repeatedly ends up returning me the error of…
-
0
votes0
answers152
views@Stateless on CDI project
Person, I have the following structure in my project (CDI): BEAN: @Named @SessionScoped public class ClienteMB extends BaseAbstractMB<Cliente, ClienteDTO> implements Serializable { @Inject…
-
0
votes1
answer92
viewsError starting JSF application in Apache - CDI Beanmanager instance is not available in JNDI
I have a JSF + Primefaces application that runs smoothly in the development environment. But when it comes to deploying . War in Tomcat, in production, I can’t. The error in the logs is:…
-
-1
votes1
answer434
viewsMy application does not recognize my Bean
Take a good look at the figure; look at my Bean class package br.com.terezinha.adm.controller; import java.io.Serializable; import javax.faces.bean.ViewScoped; import javax.inject.Named; import…
-
-1
votes1
answer318
viewsHow to use CDI in Webservice?
I’m trying to inject a bean @Injection within a WebService, but the bean always stays null. Dependency injection is working in my project. When I use @Injection within a Managebean to a jsp page…
-
-1
votes1
answer985
viewsProblems setting up a Maven project to place CDI
Watch the error message; 08:27:28,047 INFO [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available.…
-
-1
votes1
answer118
viewsError: The constructor Velocitytemplate(Inputstream) is Undefined
import java.io.Serializable; import java.util.Locale; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; import javax.inject.Named; import…
-
-1
votes1
answer231
viewsProblem with JSF2 + CDI + Tomcat
Personal talk, I’m working with JSF and I’m here. I have a simple project for now, with a page with a form that has an Enum attribute in it, IE, when the page is loaded has a selectItems there that…