Questions tagged as 'cdi'

1
answer

Injection between jars

I have a Jar, Helper project, which has a process manager, where it controls the execution of etal threads. Where it gets an interface that performs execution when triggered. I have another Jar, Service project that implements the Helper inte...
asked by 28.06.2014 / 22:28
0
answers

CDI bean that goes up with the application

Is there a way to start a CDI bean next to the application I have the following bean: @ApplicationScoped @Named public class MyBean implements Serializable { @Inject private Helper helper; @PostConstruct public void init()...
asked by 17.08.2018 / 21:08
1
answer

Composite vs. Bean CDI - How to access bean methods

I'm trying to create a component to receive the photo from the user's profile. But for this I need to make the access component the methods within the CDI Bean of the page in question. I'm doing something like this: Creating the component:...
asked by 05.04.2017 / 16:30
1
answer

Inject the Dao into the Converter

I'm having a java.lang.NullPointerException error in a converter at the moment it will access the bank, since the dependency is not being injected by the CDI, there are arguments that the Converter should not access the Bank any more my case I a...
asked by 08.07.2016 / 01:49
2
answers

How to search the Session in Hibernate 5.2.3.Final

Hello! I am changing my Hibernate from version 4.3.8.Final to 5.2.3.Final. Now I am not able to fetch the Hibernate Session as it did before, like this: (Session) manager.unwrap(Session.class); Give Cast Error :java.lang.Clas...
asked by 13.10.2016 / 22:06
1
answer

Doubts about JPQL

I honestly have some difficulty with BD, and I need a JPQL that returns only one record. I have an Entity Price and an Entity Product. I need to bring the last price registered by the user. I put a date and ID, I imagine it could be the last ID...
asked by 19.08.2017 / 01:03
1
answer

WildFly 10 + Spring Security + JSF + CDI does not inject dependency

I'm trying to implement CDI in a WEB project that I have where I use WildFly10 with Spring Security (custom login) and JSF and I'm not able to inject dependencies. In the Example below, the UserDao when used    Caused by: java.lang.NullPoi...
asked by 22.06.2016 / 22:50
1
answer

Inject CDI is not working with producer in a .jar project

I created an EntityManager producer on a .jar project but it does not work. I configured POM.XML with the dependency below <!-- CDI --> <dependency> <groupId>javax.enterprise</groupId> <artifactI...
asked by 21.06.2016 / 14:56
1
answer

How to display Questions retrieved from a DAO on the same JSF page

Good afternoon. I have a page called simulate.xhtml where I get some parameters (Filter) to query the database according to the filter. It's all working, what I wanted was to get this query and display the questions on the same page, that i...
asked by 13.10.2015 / 19:42
1
answer

Problems with NullPointerException in a JSF project

I have an application that is displaying the following error message; jun 01, 2015 4:15:05 PM com.sun.faces.lifecycle.InvokeApplicationPhase execute ADVERTÊNCIA: #{pesquisaPedidosBean.pesquisar}: java.lang.NullPointerException javax.faces.Face...
asked by 01.06.2015 / 21:19