3 Replies Latest reply on Feb 14, 2013 8:20 AM by Radoslav Husar

    Failing to initialize jpa mapped class in a cluster

    matt crowe Newbie

      This problem is consistent in that it reoccurs, but only about 1 out of 3 times when we restart our servers. After the servers are up, if it works the first time, it will continue to work, and the same goes for failing.

       

      When we try to login, via Spring, the container fails to initialize our first hibernate mapped class. Here is the error:

       

      Error during getting UserLogin with username=7@7.com. Could not init

      ialize class colorado.dor.online.interlock.model.Applicant

      java.rmi.RemoteException: Error during getting UserLogin with username=7@7.com. Could not initialize class colorad

      o.dor.online.interlock.model.Applicant

              at colorado.dor.online.interlock.service.ejb.UserAdminServiceBean.getUserLogin(UserAdminServiceBean.java:7

      8)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

              at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvoca

      tionWrapper.java:72)

              at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:76)

              at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:62)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.ja

      va:72)

              at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_18792704

      40.invoke(InvocationContextInterceptor_z_fillMethod_1879270440.java)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88

      )

              at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_1879270440.in

      voke(InvocationContextInterceptor_z_setup_1879270440.java)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)

              at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

              at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)

       

      Here's how the class is mapped:

      <hibernate-configuration>

       

        <session-factory>

          <property name="connection.datasource">java:/colorado-dor-online-interlock-ds</property>

          <property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>

          <property name="hibernate.show_sql">true</property>

          <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

          <property name="hibernate.cache.use_second_level_cache">false</property>

          <property name="hibernate.current_session_context_class">thread</property>

         

          <!-- Mapping classes -->

          <mapping class="colorado.dor.online.interlock.model.Applicant" />

          ...etc...

       

      JBoss version: JBoss (Microcontainer) [5.1.0 (build: SVNTag=JBPAPP_5_1_0 date=201009150028)

       

      Hibernate version:

        <artifactId>hibernate-core</artifactId>
       

      <version>3.3.2.GA_CP03</version>

      and

        <artifactId>hibernate-annotations</artifactId>
        <version>3.4.0.GA_CP03</version>