Questions tagged as 'cdi'

1
answer

Servlet Container (Tomcat) or Application Server?

Currently I'm developing a project that uses JSF, JPA, CDI and EJB. I have read in several places where they stated that Tomcat (Servlet Container) does not have support for these technologies, however I am currently using Tomcat and I use all o...
asked by 11.09.2017 / 19:54
1
answer

Problems with the OpenSessionInViewer + JPA + Tomcat standard

Hello, I'm using Tomcat + JPA + Vraptor 4 and I'm using cdi to inject EntityManager as follows. EntityManagerFactoryCreator: public class EntityManagerFactoryCreator { @ApplicationScoped @Produces public EntityManagerFactory get...
asked by 28.07.2016 / 02:30
1
answer

Error or render screen in application pimefaces - NullPointException

Your method, when called, gives NullPointException . Has an expression that validates when editing appears header "Product Edition", if New registration appears "new." In cadastroProdutoBean.java has method boolean isEditando...
asked by 08.07.2016 / 07:24
1
answer

Web Service Testing with Arquillian

I'm doing a unit test class and I'm using Arquillian because of the CDI, in this case I'm testing a Web Service for authentication of company users. Here is the source of the test class: @RunWith(Arquillian.class) public class UsuarioWebServic...
asked by 12.03.2014 / 19:11
1
answer

No bean corresponds to the point of injection CDI

I want to implement CDI. However when I use the @Inject annotation I am notified with this warning "No bean matches the injection point" Line of code I'm notified @Inject private LancamentoDadosDao lancamentoDadosDao; DAO Class...
asked by 13.07.2016 / 19:24
1
answer

Better EntityManager definition

I'm studying JPA together with Dependency Injection and read a few points about EntityManager : If we use the following method: public EntityManager getEntityManager() { EntityManagerFactory factory = Persistence.createEntityManagerFa...
asked by 28.12.2016 / 18:22
1
answer

Instantiate annotated class with Hibernate inheritance using CDI

Good afternoon, I am creating a project using JSF , CDI , Bootstrap and Hibernate . I would like to know how to work with the following problem, I created a set of classes to represent a person entity física...
asked by 30.03.2016 / 18:16
1
answer

NullPointerException with CDI and JAX-RS

I am studying JAX-R S and created a simple project with the following class: Webservice Code @Path("generic") public class GenericResource { @Inject private MeuServico servico; @GET @Produces("text/plain") publi...
asked by 26.06.2014 / 01:30
1
answer

Error "Transaction is required to perform this operation" when inserting, editing or deleting - Wildfly

So folks, I've been breaking my head with this mistake for some time and I can not figure out how to fix it ... The situation is as follows, I had this project running on Tomcat and now it was necessary to migrate to WildFly, the migration was a...
asked by 16.09.2014 / 15:01
1
answer

Java CDI - Configuration

I created a simple project containing a Test class and an InterfaceInterface interface. In the test interface I created some method just to test. In the Test class I just put @Inject Service service; When I call the interface method, it is...
asked by 17.01.2017 / 20:42