9 Replies Latest reply: Mar 16, 2011 1:50 PM by Mrinal Malhotra RSS

    EntityManager not injected

    Gabor Gulyas Newbie

      hi,

       

      sorry for this dummy question, i started to use Jboss 6 Final and probably mixed up something and could not find the reason why my EntityManager is not injected.

       

      I could not see any big problems during deployment, all my stateless EJBs and the persistence unit seem to be deployed correctly:

       

      15:37:00,457 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2071068979{vfs:///home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/auth-ejbs-1.0.0-SNAPSHOT.jar/}
      15:37:00,457 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2071068979{vfs:///home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/auth-ejbs-1.0.0-SNAPSHOT.jar/}
      15:37:00,457 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2041379477{vfs:///home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/base-ejbs-1.0.0-SNAPSHOT.jar/}
      15:37:00,458 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2041379477{vfs:///home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/base-ejbs-1.0.0-SNAPSHOT.jar/}
      15:37:00,489 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/auth-ejbs-1.0.0-SNAPSHOT/AuthorizationServiceImpl
      15:37:00,491 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/auth-ejbs-1.0.0-SNAPSHOT/AuthenticationServiceImpl
      15:37:00,493 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/base-ejbs-1.0.0-SNAPSHOT/LocaleMgrBean
      15:37:00,494 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/base-ejbs-1.0.0-SNAPSHOT/BaseEntityMgrBean
      15:37:00,495 WARN  [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated
      15:37:00,654 WARN  [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated
      15:37:03,254 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Created KernelDeployment for: auth-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,254 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthenticationServiceImpl,service=EJB3
      15:37:03,254 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:
      15:37:03,255 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:
      15:37:03,255 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss.ejb:service=EJBTimerService; Required: Described
      15:37:03,255 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss-switchboard:appName=pilot-ear,module=auth-ejbs-1.0.0-SNAPSHOT,name=AuthenticationServiceImpl; Required: Create
      15:37:03,255 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:AuthenticationServiceImpl
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/AuthenticationServiceImpl/local
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/AuthenticationServiceImpl/local-hu.ideal.common.tools.interfaces.IBasicLoginAuthentication
      15:37:03,257 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthenticationServiceImpl,service=EJB3) to KernelDeployment of: auth-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,260 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthorizationServiceImpl,service=EJB3
      15:37:03,260 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:
      15:37:03,260 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:
      15:37:03,260 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss.ejb:service=EJBTimerService; Required: Described
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss-switchboard:appName=pilot-ear,module=auth-ejbs-1.0.0-SNAPSHOT,name=AuthorizationServiceImpl; Required: Create
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:AuthorizationServiceImpl
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/AuthorizationServiceImpl/local-hu.ideal.auth.interfaces.IAuthorizationService
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/AuthorizationServiceImpl/local
      15:37:03,262 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.auth.interfaces.IAuthorizationService
      15:37:03,262 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote
      15:37:03,262 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal
      15:37:03,263 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthorizationServiceImpl,service=EJB3) to KernelDeployment of: auth-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,265 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Created KernelDeployment for: base-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,265 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=LocaleMgrBean,service=EJB3
      15:37:03,265 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:
      15:37:03,266 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:
      15:37:03,266 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss.ejb:service=EJBTimerService; Required: Described
      15:37:03,266 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss-switchboard:appName=pilot-ear,module=base-ejbs-1.0.0-SNAPSHOT,name=LocaleMgrBean; Required: Create
      15:37:03,266 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/LocaleMgrBean/remote-hu.ideal.common.base.ejb.remote.LocaleMgrBeanRemote
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/LocaleMgrBean/local-hu.ideal.common.base.ejb.LocaleMgrBeanLocal
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/LocaleMgrBean/local
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.remote.LocaleMgrBeanRemote
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:LocaleMgrBean
      15:37:03,268 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/LocaleMgrBean/remote
      15:37:03,268 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.LocaleMgrBeanLocal
      15:37:03,268 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=LocaleMgrBean,service=EJB3) to KernelDeployment of: base-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,270 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=BaseEntityMgrBean,service=EJB3
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss.ejb:service=EJBTimerService; Required: Described
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss-switchboard:appName=pilot-ear,module=base-ejbs-1.0.0-SNAPSHOT,name=BaseEntityMgrBean; Required: Create
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:
      15:37:03,272 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/BaseEntityMgrBean/remote-hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote
      15:37:03,272 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/BaseEntityMgrBean/local-hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal
      15:37:03,272 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote
      15:37:03,272 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:BaseEntityMgrBean
      15:37:03,273 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal
      15:37:03,273 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/BaseEntityMgrBean/local
      15:37:03,273 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/BaseEntityMgrBean/remote
      15:37:03,274 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=BaseEntityMgrBean,service=EJB3) to KernelDeployment of: base-ejbs-1.0.0-SNAPSHOT.jar
      15:37:04,401 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthenticationServiceImpl,service=EJB3
      15:37:04,401 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: hu.ideal.auth.ejb.AuthenticationServiceImpl ejbName: AuthenticationServiceImpl
      15:37:04,408 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
      
           pilot-ear/AuthenticationServiceImpl/local - EJB3.x Default Local Business Interface
           pilot-ear/AuthenticationServiceImpl/local-hu.ideal.common.tools.interfaces.IBasicLoginAuthentication - EJB3.x Local Business Interface
      
      15:37:04,409 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
      15:37:04,412 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthorizationServiceImpl,service=EJB3
      15:37:04,412 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: hu.ideal.auth.ejb.AuthorizationServiceImpl ejbName: AuthorizationServiceImpl
      15:37:04,418 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
      
           pilot-ear/AuthorizationServiceImpl/local - EJB3.x Default Local Business Interface
           pilot-ear/AuthorizationServiceImpl/local-hu.ideal.auth.interfaces.IAuthorizationService - EJB3.x Local Business Interface
      
      15:37:04,419 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
      15:37:04,720 INFO  [STDOUT] 15:37:04,485 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
      15:37:04,720 INFO  [STDOUT] 15:37:04,486 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [vfs:/home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/lib/ejbtools-1.0.0-SNAPSHOT.jar/logback.xml]
      15:37:04,720 INFO  [STDOUT] 15:37:04,589 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
      15:37:04,721 INFO  [STDOUT] 15:37:04,593 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeFilter scanning period to 30 seconds
      15:37:04,721 INFO  [STDOUT] 15:37:04,595 |-ERROR in ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter@7675f36f - URL [vfs:/home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/lib/ejbtools-1.0.0-SNAPSHOT.jar/logback.xml] is not of type file
      15:37:04,721 INFO  [STDOUT] 15:37:04,595 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter
      15:37:04,721 INFO  [STDOUT] 15:37:04,595 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
      15:37:04,721 INFO  [STDOUT] 15:37:04,604 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [BUSINESS-FILE]
      15:37:04,722 INFO  [STDOUT] 15:37:04,662 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack.
      15:37:04,722 INFO  [STDOUT] 15:37:04,704 |-INFO in ch.qos.logback.core.FileAppender[BUSINESS-FILE] - File property is set to [/tmp/nde-x-test-business.log]
      15:37:04,722 INFO  [STDOUT] 15:37:04,706 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [BUSINESS-FILE] from the object stack
      15:37:04,722 INFO  [STDOUT] 15:37:04,706 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
      15:37:04,723 INFO  [STDOUT] 15:37:04,708 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
      15:37:04,723 INFO  [STDOUT] 15:37:04,711 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack.
      15:37:04,723 INFO  [STDOUT] 15:37:04,712 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [STDOUT] from the object stack
      15:37:04,723 INFO  [STDOUT] 15:37:04,713 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
      15:37:04,723 INFO  [STDOUT] 15:37:04,713 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [BUSINESS-FILE] to Logger[root]
      15:37:04,724 INFO  [STDOUT] 15:37:04,715 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[root]
      15:37:04,724 INFO  [STDOUT] 
      15:37:04,729 ERROR [STDERR] SLF4J: Class path contains multiple SLF4J bindings.
      15:37:04,730 ERROR [STDERR] SLF4J: Found binding in [vfs:/home/gg/jboss-6.0.0.Final/common/lib/slf4j-jboss-logmanager.jar/org/slf4j/impl/StaticLoggerBinder.class]
      15:37:04,730 ERROR [STDERR] SLF4J: Found binding in [vfs:/home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/lib/logback-classic-0.9.16.jar/org/slf4j/impl/StaticLoggerBinder.class]
      15:37:04,730 ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      15:37:04,789 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=LocaleMgrBean,service=EJB3
      15:37:04,789 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: hu.ideal.common.base.ejb.impl.LocaleMgrBean ejbName: LocaleMgrBean
      15:37:04,804 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
      
           pilot-ear/LocaleMgrBean/remote - EJB3.x Default Remote Business Interface
           pilot-ear/LocaleMgrBean/remote-hu.ideal.common.base.ejb.remote.LocaleMgrBeanRemote - EJB3.x Remote Business Interface
           pilot-ear/LocaleMgrBean/local - EJB3.x Default Local Business Interface
           pilot-ear/LocaleMgrBean/local-hu.ideal.common.base.ejb.LocaleMgrBeanLocal - EJB3.x Local Business Interface
      
      15:37:04,806 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
      15:37:04,808 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=BaseEntityMgrBean,service=EJB3
      15:37:04,808 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: hu.ideal.common.base.ejb.impl.BaseEntityMgrBean ejbName: BaseEntityMgrBean
      15:37:04,820 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
      
           pilot-ear/BaseEntityMgrBean/remote - EJB3.x Default Remote Business Interface
           pilot-ear/BaseEntityMgrBean/remote-hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote - EJB3.x Remote Business Interface
           pilot-ear/BaseEntityMgrBean/local - EJB3.x Default Local Business Interface
           pilot-ear/BaseEntityMgrBean/local-hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal - EJB3.x Local Business Interface
      
      15:37:04,821 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
      15:37:04,831 INFO  [org.jboss.jpa.deployment.PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=pilot-ear.ear/lib/base-entities-1.0.0-SNAPSHOT.jar#default
      15:37:04,834 INFO  [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [
           name: default
           ...]
      15:37:04,836 WARN  [org.hibernate.ejb.Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly.PersistenceUnitInfo.getNewTempClassLoader() is null.
      15:37:04,843 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
      15:37:04,851 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
      15:37:04,853 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
      15:37:04,858 INFO  [org.hibernate.cfg.search.HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
      15:37:04,859 INFO  [org.hibernate.connection.ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      15:37:04,860 INFO  [org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider] Using provided datasource
      15:37:06,029 INFO  [org.hibernate.cfg.SettingsFactory] Database ->
             name : Oracle
          version : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
      With the Partitioning, OLAP and Data Mining options
            major : 10
            minor : 2
      15:37:06,029 INFO  [org.hibernate.cfg.SettingsFactory] Driver ->
             name : Oracle JDBC driver
          version : 10.1.0.5.0
            major : 10
            minor : 1
      15:37:06,047 INFO  [org.hibernate.dialect.Dialect] Using dialect: org.hibernate.dialect.OracleDialect
      15:37:06,048 WARN  [org.hibernate.dialect.Oracle9Dialect] The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
      15:37:06,052 WARN  [org.hibernate.dialect.OracleDialect] The OracleDialect dialect has been deprecated; use Oracle8iDialect instead
      15:37:06,058 INFO  [org.hibernate.engine.jdbc.JdbcSupportLoader] Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
      15:37:06,059 INFO  [org.hibernate.transaction.TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
      15:37:06,059 INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      15:37:06,060 INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      15:37:06,060 INFO  [org.hibernate.cfg.SettingsFactory] Automatic flush during beforeCompletion(): disabled
      15:37:06,061 INFO  [org.hibernate.cfg.SettingsFactory] Automatic session close at end of transaction: disabled
      15:37:06,061 INFO  [org.hibernate.cfg.SettingsFactory] JDBC batch size: 15
      15:37:06,061 INFO  [org.hibernate.cfg.SettingsFactory] JDBC batch updates for versioned data: disabled
      15:37:06,061 INFO  [org.hibernate.cfg.SettingsFactory] Scrollable result sets: enabled
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] JDBC3 getGeneratedKeys(): disabled
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] Connection release mode: auto
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] Default batch fetch size: 1
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] Generate SQL with comments: disabled
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] Order SQL updates by primary key: disabled
      15:37:06,063 INFO  [org.hibernate.cfg.SettingsFactory] Order SQL inserts for batching: disabled
      15:37:06,063 INFO  [org.hibernate.cfg.SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      15:37:06,064 INFO  [org.hibernate.hql.ast.ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      15:37:06,064 INFO  [org.hibernate.cfg.SettingsFactory] Query language substitutions: {}
      15:37:06,064 INFO  [org.hibernate.cfg.SettingsFactory] JPA-QL strict compliance: enabled
      15:37:06,064 INFO  [org.hibernate.cfg.SettingsFactory] Second-level cache: enabled
      15:37:06,066 INFO  [org.hibernate.cfg.SettingsFactory] Query cache: disabled
      15:37:06,066 INFO  [org.hibernate.cfg.SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
      15:37:06,078 INFO  [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider
      15:37:06,079 INFO  [org.hibernate.cfg.SettingsFactory] Optimize cache for minimal puts: disabled
      15:37:06,080 INFO  [org.hibernate.cfg.SettingsFactory] Cache region prefix: persistence.unit:unitName=pilot-ear.ear/lib/base-entities-1.0.0-SNAPSHOT.jar#default
      15:37:06,080 INFO  [org.hibernate.cfg.SettingsFactory] Structured second-level cache entries: disabled
      15:37:06,080 INFO  [org.hibernate.cfg.SettingsFactory] Echoing all SQL to stdout
      15:37:06,080 INFO  [org.hibernate.cfg.SettingsFactory] Statistics: disabled
      15:37:06,085 INFO  [org.hibernate.cfg.SettingsFactory] Deleted entity synthetic identifier rollback: disabled
      15:37:06,085 INFO  [org.hibernate.cfg.SettingsFactory] Default entity-mode: pojo
      15:37:06,085 INFO  [org.hibernate.cfg.SettingsFactory] Named query checking : enabled
      15:37:06,085 INFO  [org.hibernate.cfg.SettingsFactory] Check Nullability in Core (should be disabled when Bean Validation is on): disabled
      15:37:06,094 INFO  [org.hibernate.impl.SessionFactoryImpl] building session factory
      15:37:06,095 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=pilot-ear.ear/lib/base-entities-1.0.0-SNAPSHOT.jar#default
      15:37:06,113 INFO  [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      15:37:06,119 INFO  [org.hibernate.util.NamingHelper] Creating subcontext: persistence.unit:unitName=pilot-ear.ear
      15:37:06,121 INFO  [org.hibernate.util.NamingHelper] Creating subcontext: lib
      15:37:06,123 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=pilot-ear.ear/lib/base-entities-1.0.0-SNAPSHOT.jar#default
      15:37:06,124 WARN  [org.hibernate.impl.SessionFactoryObjectFactory] InitialContext did not implement EventContext
      15:37:06,124 INFO  [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      15:37:06,155 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/auth-webapp
      15:37:06,231 INFO  [javax.enterprise.resource.webcontainer.jsf.config] Initializing Mojarra 2.0.3 ( b05) for context '/auth-webapp'
      15:37:09,588 INFO  [org.richfaces.log.Cache] Selected fallback cache factory
      15:37:09,591 INFO  [org.richfaces.log.Cache] Creating LRUMap cache instance using parameters: {com.sun.faces.duplicateJARPattern=^tmp\d+(\S*\.jar), org.richfaces.skin=#{skinBean.skin}, com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider, javax.faces.PROJECT_STAGE=Development, org.richfaces.enableControlSkinningClasses=#{skinBean.enableClassesSkinning}, org.richfaces.enableControlSkinning=#{skinBean.enableElementsSkinning}, resteasy.unwrapped.exceptions=javax.ejb.EJBException, javax.faces.STATE_SAVING_METHOD=client}
      15:37:09,597 INFO  [org.richfaces.log.Cache] Creating LRUMap cache instance of 512 items capacity
      15:37:09,602 INFO  [org.richfaces.log.Application] RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0.20101110-M4 SVN r.20021
      15:37:09,613 INFO  [javax.enterprise.resource.webcontainer.jsf.config] Monitoring jndi:/localhost/auth-webapp/WEB-INF/faces-config.xml for modifications
      
      15:37:00,491 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/auth-ejbs-1.0.0-SNAPSHOT/AuthenticationServiceImpl
      15:37:00,493 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/base-ejbs-1.0.0-SNAPSHOT/LocaleMgrBean
      15:37:00,494 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/base-ejbs-1.0.0-SNAPSHOT/BaseEntityMgrBean
      15:37:00,495 WARN  [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated
      15:37:00,654 WARN  [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated
      15:37:03,254 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Created KernelDeployment for: auth-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,254 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthenticationServiceImpl,service=EJB3
      15:37:00,457 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2071068979{vfs:///home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/auth-ejbs-1.0.0-SNAPSHOT.jar/}
      15:37:00,457 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2071068979{vfs:///home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/auth-ejbs-1.0.0-SNAPSHOT.jar/}
      15:37:00,457 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2041379477{vfs:///home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/base-ejbs-1.0.0-SNAPSHOT.jar/}
      15:37:00,458 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2041379477{vfs:///home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/base-ejbs-1.0.0-SNAPSHOT.jar/}
      15:37:00,489 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/auth-ejbs-1.0.0-SNAPSHOT/AuthorizationServiceImpl
      15:37:00,491 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/auth-ejbs-1.0.0-SNAPSHOT/AuthenticationServiceImpl
      15:37:00,493 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/base-ejbs-1.0.0-SNAPSHOT/LocaleMgrBean
      15:37:00,494 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@214789ac into MC at org.jboss.ejb.bean.instantiator/pilot-ear/base-ejbs-1.0.0-SNAPSHOT/BaseEntityMgrBean
      15:37:00,495 WARN  [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated
      15:37:00,654 WARN  [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated
      15:37:03,254 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Created KernelDeployment for: auth-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,254 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthenticationServiceImpl,service=EJB3
      15:37:03,254 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:
      15:37:03,255 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:
      15:37:03,255 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss.ejb:service=EJBTimerService; Required: Described
      15:37:03,255 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss-switchboard:appName=pilot-ear,module=auth-ejbs-1.0.0-SNAPSHOT,name=AuthenticationServiceImpl; Required: Create
      15:37:03,255 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:AuthenticationServiceImpl
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/AuthenticationServiceImpl/local
      15:37:03,256 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/AuthenticationServiceImpl/local-hu.ideal.common.tools.interfaces.IBasicLoginAuthentication
      15:37:03,257 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthenticationServiceImpl,service=EJB3) to KernelDeployment of: auth-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,260 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthorizationServiceImpl,service=EJB3
      15:37:03,260 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:
      15:37:03,260 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:
      15:37:03,260 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss.ejb:service=EJBTimerService; Required: Described
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss-switchboard:appName=pilot-ear,module=auth-ejbs-1.0.0-SNAPSHOT,name=AuthorizationServiceImpl; Required: Create
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:AuthorizationServiceImpl
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/AuthorizationServiceImpl/local-hu.ideal.auth.interfaces.IAuthorizationService
      15:37:03,261 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/AuthorizationServiceImpl/local
      15:37:03,262 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.auth.interfaces.IAuthorizationService
      15:37:03,262 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote
      15:37:03,262 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal
      15:37:03,263 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthorizationServiceImpl,service=EJB3) to KernelDeployment of: auth-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,265 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Created KernelDeployment for: base-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,265 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=LocaleMgrBean,service=EJB3
      15:37:03,265 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:
      15:37:03,266 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:
      15:37:03,266 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss.ejb:service=EJBTimerService; Required: Described
      15:37:03,266 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss-switchboard:appName=pilot-ear,module=base-ejbs-1.0.0-SNAPSHOT,name=LocaleMgrBean; Required: Create
      15:37:03,266 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/LocaleMgrBean/remote-hu.ideal.common.base.ejb.remote.LocaleMgrBeanRemote
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/LocaleMgrBean/local-hu.ideal.common.base.ejb.LocaleMgrBeanLocal
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/LocaleMgrBean/local
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.remote.LocaleMgrBeanRemote
      15:37:03,267 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:LocaleMgrBean
      15:37:03,268 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/LocaleMgrBean/remote
      15:37:03,268 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.LocaleMgrBeanLocal
      15:37:03,268 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=LocaleMgrBean,service=EJB3) to KernelDeployment of: base-ejbs-1.0.0-SNAPSHOT.jar
      15:37:03,270 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=BaseEntityMgrBean,service=EJB3
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss.ejb:service=EJBTimerService; Required: Described
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jboss-switchboard:appName=pilot-ear,module=base-ejbs-1.0.0-SNAPSHOT,name=BaseEntityMgrBean; Required: Create
      15:37:03,271 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:
      15:37:03,272 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/BaseEntityMgrBean/remote-hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote
      15:37:03,272 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/BaseEntityMgrBean/local-hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal
      15:37:03,272 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote
      15:37:03,272 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:BaseEntityMgrBean
      15:37:03,273 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      Class:hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal
      15:37:03,273 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/BaseEntityMgrBean/local
      15:37:03,273 INFO  [org.jboss.ejb3.deployers.JBossASKernel]      jndi:pilot-ear/BaseEntityMgrBean/remote
      15:37:03,274 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=BaseEntityMgrBean,service=EJB3) to KernelDeployment of: base-ejbs-1.0.0-SNAPSHOT.jar
      15:37:04,401 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthenticationServiceImpl,service=EJB3
      15:37:04,401 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: hu.ideal.auth.ejb.AuthenticationServiceImpl ejbName: AuthenticationServiceImpl
      15:37:04,408 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
      
           pilot-ear/AuthenticationServiceImpl/local - EJB3.x Default Local Business Interface
           pilot-ear/AuthenticationServiceImpl/local-hu.ideal.common.tools.interfaces.IBasicLoginAuthentication - EJB3.x Local Business Interface
      
      15:37:04,409 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
      15:37:04,412 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=pilot-ear.ear,jar=auth-ejbs-1.0.0-SNAPSHOT.jar,name=AuthorizationServiceImpl,service=EJB3
      15:37:04,412 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: hu.ideal.auth.ejb.AuthorizationServiceImpl ejbName: AuthorizationServiceImpl
      15:37:04,418 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
      
           pilot-ear/AuthorizationServiceImpl/local - EJB3.x Default Local Business Interface
           pilot-ear/AuthorizationServiceImpl/local-hu.ideal.auth.interfaces.IAuthorizationService - EJB3.x Local Business Interface
      
      15:37:04,419 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
      15:37:04,720 INFO  [STDOUT] 15:37:04,485 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
      15:37:04,720 INFO  [STDOUT] 15:37:04,486 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [vfs:/home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/lib/ejbtools-1.0.0-SNAPSHOT.jar/logback.xml]
      15:37:04,720 INFO  [STDOUT] 15:37:04,589 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
      15:37:04,721 INFO  [STDOUT] 15:37:04,593 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeFilter scanning period to 30 seconds
      15:37:04,721 INFO  [STDOUT] 15:37:04,595 |-ERROR in ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter@7675f36f - URL [vfs:/home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/lib/ejbtools-1.0.0-SNAPSHOT.jar/logback.xml] is not of type file
      15:37:04,721 INFO  [STDOUT] 15:37:04,595 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter
      15:37:04,721 INFO  [STDOUT] 15:37:04,595 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
      15:37:04,721 INFO  [STDOUT] 15:37:04,604 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [BUSINESS-FILE]
      15:37:04,722 INFO  [STDOUT] 15:37:04,662 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack.
      15:37:04,722 INFO  [STDOUT] 15:37:04,704 |-INFO in ch.qos.logback.core.FileAppender[BUSINESS-FILE] - File property is set to [/tmp/nde-x-test-business.log]
      15:37:04,722 INFO  [STDOUT] 15:37:04,706 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [BUSINESS-FILE] from the object stack
      15:37:04,722 INFO  [STDOUT] 15:37:04,706 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
      15:37:04,723 INFO  [STDOUT] 15:37:04,708 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
      15:37:04,723 INFO  [STDOUT] 15:37:04,711 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [layout] on top of the object stack.
      15:37:04,723 INFO  [STDOUT] 15:37:04,712 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [STDOUT] from the object stack
      15:37:04,723 INFO  [STDOUT] 15:37:04,713 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
      15:37:04,723 INFO  [STDOUT] 15:37:04,713 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [BUSINESS-FILE] to Logger[root]
      15:37:04,724 INFO  [STDOUT] 15:37:04,715 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[root]
      15:37:04,724 INFO  [STDOUT] 
      15:37:04,729 ERROR [STDERR] SLF4J: Class path contains multiple SLF4J bindings.
      15:37:04,730 ERROR [STDERR] SLF4J: Found binding in [vfs:/home/gg/jboss-6.0.0.Final/common/lib/slf4j-jboss-logmanager.jar/org/slf4j/impl/StaticLoggerBinder.class]
      15:37:04,730 ERROR [STDERR] SLF4J: Found binding in [vfs:/home/gg/jboss-6.0.0.Final/server/default/deploy/pilot-ear.ear/lib/logback-classic-0.9.16.jar/org/slf4j/impl/StaticLoggerBinder.class]
      15:37:04,730 ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      15:37:04,789 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=LocaleMgrBean,service=EJB3
      15:37:04,789 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: hu.ideal.common.base.ejb.impl.LocaleMgrBean ejbName: LocaleMgrBean
      15:37:04,804 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
      
           pilot-ear/LocaleMgrBean/remote - EJB3.x Default Remote Business Interface
           pilot-ear/LocaleMgrBean/remote-hu.ideal.common.base.ejb.remote.LocaleMgrBeanRemote - EJB3.x Remote Business Interface
           pilot-ear/LocaleMgrBean/local - EJB3.x Default Local Business Interface
           pilot-ear/LocaleMgrBean/local-hu.ideal.common.base.ejb.LocaleMgrBeanLocal - EJB3.x Local Business Interface
      
      15:37:04,806 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
      15:37:04,808 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=pilot-ear.ear,jar=base-ejbs-1.0.0-SNAPSHOT.jar,name=BaseEntityMgrBean,service=EJB3
      15:37:04,808 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: hu.ideal.common.base.ejb.impl.BaseEntityMgrBean ejbName: BaseEntityMgrBean
      15:37:04,820 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
      
           pilot-ear/BaseEntityMgrBean/remote - EJB3.x Default Remote Business Interface
           pilot-ear/BaseEntityMgrBean/remote-hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote - EJB3.x Remote Business Interface
           pilot-ear/BaseEntityMgrBean/local - EJB3.x Default Local Business Interface
           pilot-ear/BaseEntityMgrBean/local-hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal - EJB3.x Local Business Interface
      
      15:37:04,821 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
      15:37:04,831 INFO  [org.jboss.jpa.deployment.PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=pilot-ear.ear/lib/base-entities-1.0.0-SNAPSHOT.jar#default
      15:37:04,834 INFO  [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [
           name: default
           ...]
      15:37:04,836 WARN  [org.hibernate.ejb.Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly.PersistenceUnitInfo.getNewTempClassLoader() is null.
      15:37:04,843 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
      15:37:04,851 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
      15:37:04,853 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
      15:37:04,858 INFO  [org.hibernate.cfg.search.HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
      15:37:04,859 INFO  [org.hibernate.connection.ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      15:37:04,860 INFO  [org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider] Using provided datasource
      15:37:06,029 INFO  [org.hibernate.cfg.SettingsFactory] Database ->
             name : Oracle
          version : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
      With the Partitioning, OLAP and Data Mining options
            major : 10
            minor : 2
      15:37:06,029 INFO  [org.hibernate.cfg.SettingsFactory] Driver ->
             name : Oracle JDBC driver
          version : 10.1.0.5.0
            major : 10
            minor : 1
      15:37:06,047 INFO  [org.hibernate.dialect.Dialect] Using dialect: org.hibernate.dialect.OracleDialect
      15:37:06,048 WARN  [org.hibernate.dialect.Oracle9Dialect] The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
      15:37:06,052 WARN  [org.hibernate.dialect.OracleDialect] The OracleDialect dialect has been deprecated; use Oracle8iDialect instead
      15:37:06,058 INFO  [org.hibernate.engine.jdbc.JdbcSupportLoader] Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
      15:37:06,059 INFO  [org.hibernate.transaction.TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
      15:37:06,059 INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      15:37:06,060 INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      15:37:06,060 INFO  [org.hibernate.cfg.SettingsFactory] Automatic flush during beforeCompletion(): disabled
      15:37:06,061 INFO  [org.hibernate.cfg.SettingsFactory] Automatic session close at end of transaction: disabled
      15:37:06,061 INFO  [org.hibernate.cfg.SettingsFactory] JDBC batch size: 15
      15:37:06,061 INFO  [org.hibernate.cfg.SettingsFactory] JDBC batch updates for versioned data: disabled
      15:37:06,061 INFO  [org.hibernate.cfg.SettingsFactory] Scrollable result sets: enabled
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] JDBC3 getGeneratedKeys(): disabled
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] Connection release mode: auto
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] Default batch fetch size: 1
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] Generate SQL with comments: disabled
      15:37:06,062 INFO  [org.hibernate.cfg.SettingsFactory] Order SQL updates by primary key: disabled
      15:37:06,063 INFO  [org.hibernate.cfg.SettingsFactory] Order SQL inserts for batching: disabled
      15:37:06,063 INFO  [org.hibernate.cfg.SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      15:37:06,064 INFO  [org.hibernate.hql.ast.ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      15:37:06,064 INFO  [org.hibernate.cfg.SettingsFactory] Query language substitutions: {}
      15:37:06,064 INFO  [org.hibernate.cfg.SettingsFactory] JPA-QL strict compliance: enabled
      15:37:06,064 INFO  [org.hibernate.cfg.SettingsFactory] Second-level cache: enabled
      15:37:06,066 INFO  [org.hibernate.cfg.SettingsFactory] Query cache: disabled
      15:37:06,066 INFO  [org.hibernate.cfg.SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
      15:37:06,078 INFO  [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider
      15:37:06,079 INFO  [org.hibernate.cfg.SettingsFactory] Optimize cache for minimal puts: disabled
      15:37:06,080 INFO  [org.hibernate.cfg.SettingsFactory] Cache region prefix: persistence.unit:unitName=pilot-ear.ear/lib/base-entities-1.0.0-SNAPSHOT.jar#default
      15:37:06,080 INFO  [org.hibernate.cfg.SettingsFactory] Structured second-level cache entries: disabled
      15:37:06,080 INFO  [org.hibernate.cfg.SettingsFactory] Echoing all SQL to stdout
      15:37:06,080 INFO  [org.hibernate.cfg.SettingsFactory] Statistics: disabled
      15:37:06,085 INFO  [org.hibernate.cfg.SettingsFactory] Deleted entity synthetic identifier rollback: disabled
      15:37:06,085 INFO  [org.hibernate.cfg.SettingsFactory] Default entity-mode: pojo
      15:37:06,085 INFO  [org.hibernate.cfg.SettingsFactory] Named query checking : enabled
      15:37:06,085 INFO  [org.hibernate.cfg.SettingsFactory] Check Nullability in Core (should be disabled when Bean Validation is on): disabled
      15:37:06,094 INFO  [org.hibernate.impl.SessionFactoryImpl] building session factory
      15:37:06,095 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=pilot-ear.ear/lib/base-entities-1.0.0-SNAPSHOT.jar#default
      15:37:06,113 INFO  [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      15:37:06,119 INFO  [org.hibernate.util.NamingHelper] Creating subcontext: persistence.unit:unitName=pilot-ear.ear
      15:37:06,121 INFO  [org.hibernate.util.NamingHelper] Creating subcontext: lib
      15:37:06,123 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=pilot-ear.ear/lib/base-entities-1.0.0-SNAPSHOT.jar#default
      15:37:06,124 WARN  [org.hibernate.impl.SessionFactoryObjectFactory] InitialContext did not implement EventContext
      15:37:06,124 INFO  [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      15:37:06,155 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/auth-webapp
      15:37:06,231 INFO  [javax.enterprise.resource.webcontainer.jsf.config] Initializing Mojarra 2.0.3 ( b05) for context '/auth-webapp'
      15:37:09,588 INFO  [org.richfaces.log.Cache] Selected fallback cache factory
      15:37:09,591 INFO  [org.richfaces.log.Cache] Creating LRUMap cache instance using parameters: {com.sun.faces.duplicateJARPattern=^tmp\d+(\S*\.jar), org.richfaces.skin=#{skinBean.skin}, com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider, javax.faces.PROJECT_STAGE=Development, org.richfaces.enableControlSkinningClasses=#{skinBean.enableClassesSkinning}, org.richfaces.enableControlSkinning=#{skinBean.enableElementsSkinning}, resteasy.unwrapped.exceptions=javax.ejb.EJBException, javax.faces.STATE_SAVING_METHOD=client}
      15:37:09,597 INFO  [org.richfaces.log.Cache] Creating LRUMap cache instance of 512 items capacity
      15:37:09,602 INFO  [org.richfaces.log.Application] RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0.20101110-M4 SVN r.20021
      15:37:09,613 INFO  [javax.enterprise.resource.webcontainer.jsf.config] Monitoring jndi:/localhost/auth-webapp/WEB-INF/faces-config.xml for modifications
      15:37:03,254 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:
      15:37:03,255 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:
      
      

       

      I acquire my stateless EJB (AuthorizationServiceImpl) via JNDI from my JSF Managed Bean:


                IAuthorizationService authService = (IAuthorizationService)
                     new InitialContext().lookup("pilot-ear/AuthorizationServiceImpl/local");
      

       

      This AuthorizationServiceImpl EJB extends another EJB : BaseEntityMgrBean.

      These EJBs are in different ejb modules (auth-ejbs and base-ejbs respectively) within the same ear.

      BaseEntityManagerBean has the EntityManager injected:

       

           @PersistenceContext
           private EntityManager eMgr;
      

       

      My persistence.xml (which is located in a jar file together with the entities in the ear's lib folder) :

       

      <persistence xmlns="http://java.sun.com/xml/ns/persistence"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
       version="2.0">
       
       <persistence-unit name="default" transaction-type="JTA">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <jta-data-source>java:/jdbcdatasource</jta-data-source>
        <class>hu.ideal.common.base.entities.Locale</class>
        <class>hu.ideal.auth.model.User</class>
        <class>hu.ideal.auth.model.Role</class>
        <class>hu.ideal.auth.model.Permission</class>
        <class>hu.ideal.common.base.entities.locale.LocaleI18nFields</class>
        <properties>
         <!-- property name="hibernate.hbm2ddl.auto" value="update" /-->
         <property name="hibernate.show_sql" value="true" />
         <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" />
         <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver" />
         <property name="hibernate.connection.url" value="jdbc:oracle:thin:@192.168.0.6:1521:tango" />
         <property name="hibernate.connection.username" value="nde" />
         <property name="hibernate.connection.password" value="nde" />
         <property name="hibernate.c3p0.min_size" value="5" />
         <property name="hibernate.c3p0.max_size" value="20" />
         <property name="hibernate.c3p0.timeout" value="300" />
         <property name="hibernate.c3p0.max_statements" value="50" />
         <property name="hibernate.c3p0.idle_test_period" value="3000" />
        </properties>
       </persistence-unit>
      </persistence>
      
       
      

       

      The problem is when any method of JNDI-looked up AuthorizationServiceImpl is invoked the injected EntityManager is null.

      Can anyone please tell me what i am doing wrong?

       

      thanks a lot for your help,

      gg

        • 1. Re: EntityManager not injected
          jaikiran pai Master

          That should have worked. Can you post the exact bean and the base class code? Where is the base-ejbs.jar located in the .ear?

          • 2. Re: EntityManager not injected
            Gabor Gulyas Newbie

            thanks for the fast reply.

             

            ear structure:

            base-ejbs.jar, auth-ejbs.jar and auth-webapp.war are located in the root of the ear file. jar modules are in the lib folder of the ear file.

             

            the beans:

             

            
            package hu.ideal.auth.ejb;
            return users;
            package hu.ideal.auth.ejb;
            
            import hu.ideal.auth.interfaces.IAuthorizationService;
            import hu.ideal.auth.model.Permission;
            import hu.ideal.auth.model.Role;
            import hu.ideal.auth.model.User;
            import hu.ideal.common.base.ejb.impl.BaseEntityMgrBean;
            
            import java.util.List;
            
            import javax.ejb.Stateless;
            import javax.persistence.EntityManager;
            import javax.persistence.PersistenceContext;
            
            /**
             * 
             * @author gg
             * 
             */
            @Stateless
            public class AuthorizationServiceImpl extends BaseEntityMgrBean implements
                      IAuthorizationService {
            
                 @Override
                 public List<User> getUsers() {
                      List<User> users = findAll(User.class);
                      return users;
                 }
            }
            
            }
            package hu.ideal.auth.ejb;
            
            import hu.ideal.auth.interfaces.IAuthorizationService;
            import hu.ideal.auth.model.Permission;
            import hu.ideal.auth.model.Role;
            import hu.ideal.auth.model.User;
            import hu.ideal.common.base.ejb.impl.BaseEntityMgrBean;
            
            import java.util.List;
            
            import javax.ejb.Stateless;
            import javax.persistence.EntityManager;
            import javax.persistence.PersistenceContext;
            
            /**
             * 
             * @author gg
             * 
             */
            @Stateless
            public class AuthorizationServiceImpl extends BaseEntityMgrBean implements
                      IAuthorizationService {
            
                 @Override
                 public List<User> getUsers() {
                      List<User> users = findAll(User.class);
                      return users;
                 }
            
                 @Override
                 public List<Role> getRoles() {
                      List<Role> roles = findAll(Role.class);
                      return roles;
                 }
            
                 @Override
                 public List<Permission> getPermissions() {
                      List<Permission> permissions = findAll(Permission.class);
                      return permissions;
                 }
            
                 @Override
                 public User saveUser(User user) {
                      return saveEntity(user);
                 }
            
                 @Override
                 public void deleteUser(User user) {
                      deleteEntity(user);
                 }
            
                 @Override
                 public Role saveRole(Role role) {
                      return saveEntity(role);
                 }
            
                 @Override
                 public void deleteRole(Role role) {
                      deleteEntity(role);
                 }
            
                 @Override
                 public Permission savePermission(Permission permission) {
                      return saveEntity(permission);
                 }
            
                 @Override
                 public void deletePermission(Permission permission) {
                      deleteEntity(permission);
                 }
            
            }
            
            
            

             

             

             

            package hu.ideal.common.base.ejb.impl;
            
            import java.util.Arrays;
            import java.util.Date;
            import java.util.List;
            
            import javax.ejb.Stateless;
            import javax.persistence.EntityManager;
            import javax.persistence.EntityNotFoundException;
            import javax.persistence.NonUniqueResultException;
            import javax.persistence.PersistenceContext;
            
            import org.slf4j.Logger;
            import org.slf4j.LoggerFactory;
            
            import hu.ideal.common.base.ejb.BaseEntityMgrBeanLocal;
            import hu.ideal.common.base.ejb.order.OrderField;
            import hu.ideal.common.base.ejb.remote.BaseEntityMgrBeanRemote;
            import hu.ideal.common.base.entities.BaseEntity;
            import hu.ideal.common.base.entities.BaseSoftDeleteEntity;
            import hu.ideal.common.utils.ArrayUtils;
            import hu.ideal.common.exceptions.NonUniqueIdRuntimeException;
            
            /**
             *
             */
            @Stateless
            public class BaseEntityMgrBean implements BaseEntityMgrBeanLocal, BaseEntityMgrBeanRemote {
                 
                 /**
                  * The logger utility that provides logging capabilities for the class and the inherited classes.
                  * <p>
                  * This should be overwritten in inherited classes and instantiate with the actual class.
                  */
                 protected static final Logger log = LoggerFactory.getLogger(BaseEntityMgrBean.class);
            
                 @PersistenceContext
                 private EntityManager eMgr;
                 
                 /**
                  * Returns the {@link EntityManager} of this session bean.
                  * 
                  * @return the EntityManager of the session bean
                  */
                 public EntityManager getEMgr() {
                      return eMgr;
                 }
            
                 /**
                  * Sets the {@link EntityManager} of this session bean.
                  * 
                  * @param eMgr the EntityManager of the session bean
                  */
                 public void setEMgr(EntityManager eMgr) {
                      this.eMgr = eMgr;
                 }
            
                 @Override
                 public <T extends BaseEntity> T saveEntity(T entity) {
                      return saveEntity(entity, null);
                 }
            
                 @Override
                 public <T extends BaseEntity> T saveEntity(T entity, Long userId) {
                      if (log.isInfoEnabled()) {
                           log.info("Saving entity: {} in the name of user: {}", entity, userId);
                      }
                      final Date now = new Date(System.currentTimeMillis());
                      if (entity.getId() == null) {
                           entity.setCreateDate(now);
                           entity.setCreateUserId(userId == null ? -1L : userId);
                           entity.setLastModifyDate(entity.getCreateDate());
                           entity.setLastModifyUserId(entity.getCreateUserId());
                           eMgr.persist(entity);
                           if (log.isDebugEnabled()) {
                                log.debug("Inserted entity: {}", entity);
                           }
                      } else {
                           entity.setLastModifyDate(now);
                           entity.setLastModifyUserId(userId == null ? -1L : userId);
                           entity = eMgr.merge(entity);
                           if (log.isDebugEnabled()) {
                                log.debug("Updated entity: {}", entity);
                           }
                      }
                      return entity;
                 }
            
                 @Override
                 public <T extends BaseEntity> void deleteEntity(T entity) {
                      deleteEntity(entity, null);
                 }
            
                 @Override
                 public <T extends BaseEntity> void deleteEntity(T entity, Long userId) {
                      if (log.isInfoEnabled()) {
                           log.info("Deleting entity: {} in the name of user: {}", entity, userId);
                      }
                      
                      T mergedEntity = eMgr.merge(entity);
                      
                      if (mergedEntity instanceof BaseSoftDeleteEntity) {
                           final Date now = new Date(System.currentTimeMillis());
                           final BaseSoftDeleteEntity dEntity = (BaseSoftDeleteEntity)mergedEntity;
                           dEntity.setDeleteDate(now);
                           dEntity.setDeleteUserId(userId == null ? -1L : userId);
                           eMgr.merge(dEntity);
                           if (log.isDebugEnabled()) {
                                log.debug("Softly deleted entity: {}", entity);
                           }
                      } else {
                           eMgr.remove(mergedEntity);
                           if (log.isDebugEnabled()) {
                                log.debug("Physically deleted entity: {}", entity);
                           }
                      }
                 }
            
                 @Override
                 public <T extends BaseEntity> List<T> findAll(Class<T> cls) {
                      return findAll(cls, null);
                 }
            
                 @Override
                 public <T extends BaseEntity> List<T> findAll(Class<T> cls, OrderField[] orderFields) {
                      if (log.isInfoEnabled()) {
                           log.info("Finding all entity instances of {} with ordering: {}", cls, Arrays.toString(orderFields));
                      }
                      final StringBuilder jpql = new StringBuilder("SELECT o FROM ").append(cls.getName().substring(cls.getName().lastIndexOf('.')+1)).append(" o");
                      if (BaseSoftDeleteEntity.class.isAssignableFrom(cls)) {
                           jpql.append(" WHERE o.deleteDate IS NULL");
                      }
                      if (orderFields != null && orderFields.length > 0 && !ArrayUtils.isEmpty(orderFields)) {
                           for (int i = 0; i < orderFields.length; i++) {
                                if (i > 0) {
                                     jpql.append(',');
                                }
                                jpql.append(' ').append(orderFields[i].getFieldName()).append(' ').append(orderFields[i].getSortOrder().name());
                           }
                      }
                      final String jpqlString = jpql.toString();
                      if (log.isDebugEnabled()) {
                           log.debug("The generated JPQL select is: {}", jpqlString);
                      }
                      log.debug("__________________________________"+eMgr);
                      return eMgr.createQuery(jpqlString).getResultList();
                 }
            
                 @Override
                 public <T extends BaseEntity> T findById(Class<T> cls, Long id) {
                      T entity = null;
                      if (log.isInfoEnabled()) {
                           log.info("Finding entity instances of {} with id: {}", cls, id);
                      }
                      if (BaseSoftDeleteEntity.class.isAssignableFrom(cls)) {
                           final StringBuilder jpql = new StringBuilder("SELECT o FROM ").append(cls.getName().substring(cls.getName().lastIndexOf('.')+1)).append(" o WHERE o.id = :id AND o.deleteDate IS NULL");
                           try {
                                entity = (T) eMgr.createQuery(jpql.toString()).setParameter("id", id).getSingleResult();
                           } catch (EntityNotFoundException enfe) {
                                // not a problem, no entity with such id, or the entity is deleted
                           } catch (NonUniqueResultException nure) {
                                // this should not happen, as the database cannot store duplicated primary keys
                                throw new NonUniqueIdRuntimeException(nure.getMessage(), nure);
                           }
                      } else {
                           entity = eMgr.find(cls, id);
                      }
                      return entity;
                 }
            
            }
            
            • 3. Re: EntityManager not injected
              Benjamin Seyinbour Expert
              The problem is when any method of JNDI-looked up AuthorizationServiceImpl is invoked the injected EntityManager is null.

              Well, the problem originates from BaseEntityMgrBean, but lies in AuthorizationServiceImpl: The EJB-3.1 specs says your  business interfaces (BaseEntityMgrBeanLocal, BaseEntityMgrBeanRemote) from the BaseEntityMgrBean superclass are not exposed to your subclass 'AuthorizationServiceImpl'.

              To expose BaseEntityMgrBean  business interfaces in AuthorizationServiceImpl, you might want to do:

              interface IAuthorizationService extends  BaseEntityMgrBeanLocal, BaseEntityMgrBeanRemote

              OR

              public class AuthorizationServiceImpl extends BaseEntityMgrBean implements
              IauthorizationService, BaseEntityMgrBeanLocal, BaseEntityMgrBeanRemote



              cheers!
              • 4. Re: EntityManager not injected
                Gabor Gulyas Newbie

                hi,

                 

                thanks for the hint, you are correct but it has not solved my problem.

                now i started to simplify the whole app, there is no ejb inheritance any more, only one simple stateful ejb, but the entitymanager is still null. probably i am doing something very stupid somewhere, but i could not find so far. i will get back with the result.

                thanks a lot

                • 5. Re: EntityManager not injected
                  jaikiran pai Master

                  If you have narrowed it down to a very simple example (one which can be easily dropped into AS 6.0 Final deploy folder), then feel free to attach that app.

                  • 6. Re: EntityManager not injected
                    Gabor Gulyas Newbie

                    i found a wrong maven dependency scope in one of the poms, which caused that the jpa 2 jar was bundled with the ear file (in the lib folder). after fixing it the pom, the jpa2 jar is not in the ear any more and everything is working:-)

                    thanks a lot for your help!

                    cheers,

                    gg

                    • 7. EntityManager not injected
                      Benjamin Seyinbour Expert

                      Hi Gabor Gulyas,

                       

                      I think it is not the jpa2 jar that is the problem, rather it is the 'persistence.xml' file in the jpa 2 jar that is causing the problem. If you remove it out of the jpa2 jar, you would find that it works @see my findings at:

                       

                      http://community.jboss.org/thread/160503?tstart=60

                      http://community.jboss.org/thread/160387

                      • 8. Re: EntityManager not injected
                        Mrinal Malhotra Newbie

                        Hi

                        I am facing exactly the same problem, any help would be appreciated

                         

                        My setup:

                        JBoss 6.0.0.Final

                        Eclipse Helios

                         

                        Here is the code I am trying to run

                         

                        persistence.xml:

                        <?xml version="1.0" encoding="UTF-8"?>

                        <persistence xmlns="http://java.sun.com/xml/ns/persistence"

                           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"

                           version="1.0">

                            <persistence-unit name="testDatabase">

                              <jta-data-source>java:/OracleDS</jta-data-source>

                            <properties>

                            <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver" />

                            <property name="hibernate.connection.url" value="jdbc:oracle:thin:localhost:1521:testDB" />

                            <property name="hibernate.connection.username" value="sa" />

                            <property name="hibernate.connection.password" value="sa" />

                            <property name="hibernate.c3p0.min_size" value="5" />

                            <property name="hibernate.c3p0.max_size" value="20" />

                            <property name="hibernate.c3p0.timeout" value="300" />

                            <property name="hibernate.c3p0.max_statements" value="50" />

                            <property name="hibernate.c3p0.idle_test_period" value="3000" />

                          <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>

                              </properties>

                          </persistence-unit>

                        </persistence>


                        EntityBean:

                        package test.enterprise.ejb;

                        import java.io.Serializable;

                        import javax.persistence.Column;
                        import javax.persistence.Entity;
                        import javax.persistence.Id;
                        import javax.persistence.NamedQuery;
                        import javax.persistence.Table;

                        @Entity
                        @Table(name = "TS_PROCESS_XREF")
                        @NamedQuery(name=TSProcessXRefBean.findAll,query="SELECT process_code from ts_process_xref")
                        public class TSProcessXRefBean implements Serializable {
                        public final static String findAll ="test.enterprise.ejb.findAll";
                        /**
                          *
                          */
                        private static final long serialVersionUID = 1L;
                        public TSProcessXRefBean()
                        {
                         
                        }
                        public String getpCode() {
                          return pCode;
                        }
                        public void setpCode(String pCode) {
                          this.pCode = pCode;
                        }
                        public int getSeqNo() {
                          return seqNo;
                        }
                        public void setSeqNo(int seqNo) {
                          this.seqNo = seqNo;
                        }
                        public String getParentPCode() {
                          return parentPCode;
                        }
                        public void setParentPCode(String parentPCode) {
                          this.parentPCode = parentPCode;
                        }
                        public String getUpdLogin() {
                          return updLogin;
                        }
                        public void setUpdLogin(String updLogin) {
                          this.updLogin = updLogin;
                        }

                        @Id
                        @Column (name="P_CODE")
                        private String pCode;
                        @Column (name="SEQNO")
                        private int seqNo;
                        @Column (name="PARENT_PROCESS_CODE")
                        private String parentPCode;
                        @Column (name="UPD_LOGIN")
                        private String updLogin;

                        }

                         

                        Remote Interface:

                        package test.enterprise.ejb;

                        import java.util.List;
                        import javax.ejb.Remote;

                        @Remote
                        public interface TSProcessXRefDAO {
                        public List<?> getAllRows();
                        public TSProcessXRefBean getSingleProcess(String p_processCode);
                        public String getMessage();
                        }

                         

                        Implementation Class:

                        package test.enterprise.ejb;

                        import java.util.List;

                        import javax.ejb.Remote;
                        import javax.ejb.Stateless;
                        import javax.persistence.EntityManager;
                        import javax.persistence.PersistenceContext;
                        import javax.persistence.PersistenceContextType;
                        import javax.persistence.Query;

                        import org.hibernate.SessionFactory;

                         

                        @Stateless
                        @Remote (TSProcessXRefDAO.class)
                        public class TSProcessXRefDAOImpl implements TSProcessXRefDAO, java.io.Serializable {

                         

                        @PersistenceContext(unitName="testDatabase", type=PersistenceContextType.TRANSACTION)
                        private EntityManager manager;


                        @Override
                        public List<?> getAllRows() {
                          return this.manager.createNamedQuery(TSProcessXRefBean.findAll).getResultList();
                        }


                        @Override
                        public TSProcessXRefBean getSingleProcess(String p_processCode) {
                          String l_query = "select " +
                            "process_code,seq_no,parent_process_code,upd_login from " +
                            "ts_process_xref where process_code=?";
                           if(manager == null)
                           {
                            System.out.println("Not working...");
                            return null;
                           }
                          
                          Query query = this.manager.createQuery(l_query);
                          query.setParameter(1, p_processCode);
                         
                          Object o = query.getSingleResult();
                          System.out.println (o);
                          return
                           (TSProcessXRefBean)
                            query.getSingleResult();
                        }
                        @Override
                        public String getMessage()
                        {
                          return "From EJB";
                        }
                        }

                         

                        TestClient:

                        package test.main;

                        import java.util.Properties;
                        import javax.naming.Context;
                        import javax.naming.InitialContext;
                        import javax.naming.NamingException;

                        import test.enterprise.ejb.TSProcessXRefBean;
                        import test.enterprise.ejb.TSProcessXRefDAO;

                        public class TestClass {

                        public static void main(String[] args) {
                           Properties properties = new Properties();
                           properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                           properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
                           properties.put("java.naming.provider.url","localhost:1099");
                           Context context; 
                           try  {   
                            context = new InitialContext (properties);   
                            TSProcessXRefDAO service1 = (TSProcessXRefDAO)           
                            context.lookup("TestEnterprise/TSProcessXRefDAOImpl/remote");  
                            TSProcessXRefBean result = service1.getSingleProcess("TS_EQCH");
                            System.out.println (result.getSeqNo());
                            }
                           catch (NamingException e) 
                           {  
                            e.printStackTrace();  

                            }
                           }
                        }

                         

                        My Oracle Datasource settings (oracle-ds.xml):

                        <datasources>

                        <local-tx-datasource>

                        <jndi-name>OracleDS</jndi-name>

                        <use-java-context>true</use-java-context>

                        <connection-url>jdbc:oracle:thin:localhost:1521:testDB</connection-url>

                        <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

                        <user-name>sa</user-name>

                        <password>sa</password>

                        <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>

                        <metadata>

                        <type-mapping>Oracle9i</type-mapping>

                        </metadata>

                        </local-tx-datasource>

                        </datasources>

                        Error I keep getting:

                        13:53:43,363 ERROR [STDERR] javax.ejb.EJBException: java.lang.NullPointerException

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:183)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:251)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:392)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:88)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:75)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.async.impl.interceptor.AsynchronousClientInterceptor.invoke(AsynchronousClientInterceptor.java:143)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)

                        13:53:43,363 ERROR [STDERR]  at $Proxy243.invoke(Unknown Source)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:185)

                        13:53:43,363 ERROR [STDERR]  at $Proxy242.getAllRows(Unknown Source)

                        13:53:43,363 ERROR [STDERR]  at org.apache.jsp.WEB_002dINF.TestEJBConn_jsp._jspService(TestEJBConn_jsp.java:76)

                        13:53:43,363 ERROR [STDERR]  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

                        13:53:43,363 ERROR [STDERR]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                        13:53:43,363 ERROR [STDERR]  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)

                        13:53:43,363 ERROR [STDERR]  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)

                        13:53:43,363 ERROR [STDERR]  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)

                        13:53:43,363 ERROR [STDERR]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                        13:53:43,363 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)

                        13:53:43,363 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

                        13:53:43,363 ERROR [STDERR]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                        13:53:43,363 ERROR [STDERR]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)

                        13:53:43,363 ERROR [STDERR]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                        13:53:43,363 ERROR [STDERR]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                        13:53:43,363 ERROR [STDERR]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)

                        13:53:43,363 ERROR [STDERR]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

                        13:53:43,363 ERROR [STDERR]  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                        13:53:43,363 ERROR [STDERR]  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)

                        13:53:43,363 ERROR [STDERR]  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)

                        13:53:43,363 ERROR [STDERR]  at java.lang.Thread.run(Unknown Source)

                        13:53:43,363 ERROR [STDERR] Caused by: java.lang.NullPointerException

                        13:53:43,363 ERROR [STDERR]  at test.enterprise.ejb.TSProcessXRefDAOImpl.getAllRows(TSProcessXRefDAOImpl.java:26)

                        13:53:43,363 ERROR [STDERR]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        13:53:43,363 ERROR [STDERR]  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                        13:53:43,363 ERROR [STDERR]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                        13:53:43,363 ERROR [STDERR]  at java.lang.reflect.Method.invoke(Unknown Source)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvocationWrapper.java:72)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:76)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:62)

                        13:53:43,363 ERROR [STDERR]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        13:53:43,363 ERROR [STDERR]  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                        13:53:43,363 ERROR [STDERR]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                        13:53:43,363 ERROR [STDERR]  at java.lang.reflect.Method.invoke(Unknown Source)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:74)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_8993048.invoke(InvocationContextInterceptor_z_fillMethod_8993048.java)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_8993048.invoke(InvocationContextInterceptor_z_setup_8993048.java)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.async.impl.interceptor.AsynchronousServerInterceptor.invoke(AsynchronousServerInterceptor.java:128)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95)

                        13:53:43,363 ERROR [STDERR]  at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247)

                        13:53:43,363 ERROR [STDERR]  ... 56 more

                        • 9. Re: EntityManager not injected
                          Mrinal Malhotra Newbie

                          Addding these 3 properties in persistence.xml fixed the issue:

                           

                                 <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>

                                 <property name = "hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory"/>

                                 <property name="hibernate.archive.autodetection" value="class"/>