-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Glassfish4 + Hibernate4.3.5 => NullPointer when injecting
PostPosted: Wed Apr 02, 2014 3:35 pm 
Newbie

Joined: Fri Dec 04, 2009 4:17 pm
Posts: 18
Hi,

I have an webapp running fine in this env:
Glassfish 3.1.1 + JSF 2.0 + Weld 1.1 + CODI 1.0.6 + Richfaces 4.3.5 +
Firebird 2.5.2 + Jaybird 2.2.4 + JPA 2.0 + Hibernate 4.2.7

Now I'm trying to test a new env:
Glassfish 4.0 + JSF 2.0 + Weld 2.0 + CODI 1.0.6 + Richfaces 4.3.5 +
Firebird 2.5.2 + Jaybird 2.2.4 + JPA 2.1 + Hibernate 4.3.5

I didn't change any config files (web.xml, ejb-jar.xml, beans.xml, persistence.xml),
no problems when deploying.

However, when I try to run the webapp in the new env, Glassfish arises
NullPointerException in the line to use a EntityManager previouly injected by Weld.

Here is one example of exception:

Code:
[2014-04-02T15:09:59.021-0400] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=19 _ThreadName=Thread-4] [timeMillis: 1396465799021] [levelValue: 1000] [[
  java.lang.NullPointerException
        at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus(JtaStatusHelper.java:76)
        at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.isActive(JtaStatusHelper.java:118)
        at org.hibernate.engine.transaction.internal.jta.CMTTransaction.join(CMTTransaction.java:149)
        at org.hibernate.jpa.spi.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1602)
        at org.hibernate.jpa.spi.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:210)
        at org.hibernate.jpa.internal.EntityManagerImpl.<init>(EntityManagerImpl.java:91)
        at org.hibernate.jpa.internal.EntityManagerFactoryImpl.internalCreateEntityManager(EntityManagerFactoryImpl.java:345)
        at org.hibernate.jpa.internal.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:338)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.getNonTxEMFromCurrentInvocation(EntityManagerWrapper.java:268)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:213)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:455)
        at util.Chave.<init>(Chave.java:20)
        at util.GeralSis.getEmpresa(GeralSis.java:285)
        at clientws.InstallClientWS.getRun(InstallClientWS.java:31)
        at clientws.InstallClientWS$Proxy$_$$_WeldClientProxy.getRun(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.