Questions tagged as 'cdi'

1
answer

Doubt Converter and CDI

I am testing a few hours trying to understand why this code here is not working and I am getting a NullPointerExcepetion . Can anyone notice something wrong? import javax.enterprise.context.RequestScoped; import javax.faces.appli...
asked by 07.11.2017 / 21:22
2
answers

Generic DAO with CDI error = can not be cast to java.lang.reflect.ParameterizedType

I'm trying to implement a generic DAO with CDI. Apparently I'm doing it right, however I'm getting the following error:    can not be cast to java.lang.reflect.ParameterizedType This error is pointing me to this line of my Repository clas...
asked by 28.06.2017 / 17:44
1
answer

Problems in Java project with CDI (Weld) + Hibernate + PrimeFaces

Good evening. I'm having trouble executing my project with the structure described in the title of this post. I am using Hibernate, with Transaction Control by Server (JTA). Follow the classes in my project. Bean that is referenced in the xht...
asked by 12.08.2016 / 05:38
1
answer

Using CDI in the app

I have a problem, on my login screen I can inject the em into a good one, when I go to the second screen that would be dash, I can not inject, p> Follow the link: /* * To change this license header, choose License Headers in Project Pro...
asked by 18.05.2016 / 21:16
1
answer

@ApplicationScoped life cycle on ear

I have an application with several WEB modules and an EJB within an EAR according to the following image: IntheEJBmoduleIcreatedanannotatedclasswith@ApplicationScoped,mygoalisforthisclasstostoreinformationthatmustbepassedbetweentheWEBprojects.I...
asked by 18.04.2016 / 16:10
1
answer

Difficulty getting object inside a CDI Extension

I want to create an extension in my project so that it starts interpreting a note itself, so I initially had a @Producer of the Quartz Scheduler object, see public class SchedulerProducer { private static final Logger LOGGER = Logger.getL...
asked by 12.11.2015 / 00:24
1
answer

@Inject for manually instantiated object?

I have a class called Application which is a listener , it instantiates objects of ServidorRadius where it needs to access repositories that are injected with CDI , however radiusRepository is returning null...
asked by 08.10.2015 / 23:49
1
answer

Error injecting object: returning null

When I inject an object into the class it returns null , it does not seem to be instantiated. Exception in thread "main" java.lang.NullPointerException at com.fercosmig.util.db.PopulaTabelaUsuario.main(PopulaTabelaUsuario.java:37)...
asked by 02.10.2015 / 21:21
1
answer

Calculate the total Sales Revenue

I have a query page that shows the total revenue for each product and I want to calculate the total sum of the revenue but the account is going wrong. The correct doing the sum in hand gave 264,660.00 and doing in java gave 18,830.00 link...
asked by 18.07.2017 / 21:06
0
answers

JSF + DDD: Is it correct to use the domain entities within the managed bean?

1 - Is DDD correct to let domain objects be fed by JSF through EL? // classe da camada de dominio public class Cliente { private String nome; // getters e setters; } // bean ligado diretamente ao objeto de dominio...
asked by 04.11.2016 / 18:53