Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-10492

IT Failure CountyMaintenanceDocumentTest BusinessObjectDaoProxy called with non-legacy class: CountryBo

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Development, JPA, Regression
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Sprint:
      2.4.0-m4 Dev Sprint 4 (Real)
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Might be covered by a new failure

      
      java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException:
       Error creating bean with name 'TravelAuthorizationDocument' defined in class path resource [org/kuali/rice/krad
      /test/document/TravelAuthorizationDocument.xml]: Initialization of bean failed; nested exception is org.springfr
      amework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required typ
      e 'java.lang.Class' for property 'documentClass'; nested exception is java.lang.IllegalArgumentException: Cannot
       find class [edu.sampleu.travel.dataobject.TravelAuthorizationDocument]
              at org.kuali.rice.test.RiceTestCase.setUp(RiceTestCase.java:101)
              at org.kuali.rice.test.BaselineTestCase.setUp(BaselineTestCase.java:115)
              at org.kuali.rice.krad.test.KRADTestCase.setUp(KRADTestCase.java:81)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
              at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
              at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner.runLeaf(LoadTimeWeavableTestRunner.java:310)
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner.runChild(LoadTimeWeavableTestRunner.java:499)
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner$4.run(LoadTimeWeavableTestRunner.java:271)
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner$2.schedule(LoadTimeWeavableTestRunner.java:116
      )
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner.runChildren(LoadTimeWeavableTestRunner.java:26
      9)
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner.access$000(LoadTimeWeavableTestRunner.java:90)
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner$3.evaluate(LoadTimeWeavableTestRunner.java:262
      )
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner.run(LoadTimeWeavableTestRunner.java:352)
              at org.junit.runners.Suite.runChild(Suite.java:127)
              at org.junit.runners.Suite.runChild(Suite.java:26)
              at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
              at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
              at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
              at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
              at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
              at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
              at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
              at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
              at org.junit.runner.JUnitCore.run(JUnitCore.java:128)
              at org.junit.runner.JUnitCore.runClasses(JUnitCore.java:73)
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner.runBootstrapTest(LoadTimeWeavableTestRunner.ja
      va:372)
              at org.kuali.rice.test.runners.LoadTimeWeavableTestRunner.run(LoadTimeWeavableTestRunner.java:347)
              at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
              at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
              at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
              at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
              at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      
      
      

      CountyMaintenanceDocumentTest BusinessObjectDaoProxy called with non-legacy class: CountryBo

      >>> org.kuali.rice.location.web.CountyMaintenanceDocumentTest.test_MismatchedStateCountry
      >>> org.kuali.rice.location.web.CountyMaintenanceDocumentTest.test_EditDoc
      >>> org.kuali.rice.location.web.CountyMaintenanceDocumentTest.test_NewDoc
      >>> org.kuali.rice.location.web.CountyMaintenanceDocumentTest.test_CopyDoc
      >>> org.kuali.rice.location.web.CountyMaintenanceDocumentTest.test_SaveNewDoc

      http://ci.rice.kuali.org/view/rice-2.4/job/rice-2.4-integration-test-mysql-freestyle/lastCompletedBuild/testReport/org.kuali.rice.location.web/

      
      Error Message
      
      BusinessObjectDaoProxy called with non-legacy class: class org.kuali.rice.location.impl.country.CountryBo
      Stacktrace
      
      java.lang.IllegalStateException: BusinessObjectDaoProxy called with non-legacy class: class org.kuali.rice.location.impl.country.CountryBo
      	at org.kuali.rice.krad.dao.proxy.BusinessObjectDaoProxy.getDao(BusinessObjectDaoProxy.java:64)
      	at org.kuali.rice.krad.dao.proxy.BusinessObjectDaoProxy.save(BusinessObjectDaoProxy.java:236)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy83.save(Unknown Source)
      	at org.kuali.rice.krad.service.impl.BusinessObjectServiceImpl.save(BusinessObjectServiceImpl.java:75)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy87.save(Unknown Source)
      	at org.kuali.rice.location.web.CountyMaintenanceDocumentTest.insertTestCountryAndState(CountyMaintenanceDocumentTest.java:50)
      
      
      
      

      Jenkins shows the changeset associated with these failures as:
      Revision 41031 by ewestfal:
      KULRICE-10155 - changed LoadTimeWeavableTestRunner to keep a static instance of the custom classloader rather than one per class in order to save memory space
      The file was modified /trunk/rice-middleware/it/internal-tools/src/main/java/org/kuali/rice/test/runners/LoadTimeWeavableTestRunner.java

        Attachments

          Issue Links

            Activity

            Hide
            eghm-kuali-m Erik Meade added a comment -

            Apparently the location ITs are not being run in CI?

            Show
            eghm-kuali-m Erik Meade added a comment - Apparently the location ITs are not being run in CI?
            Hide
            eghm-kuali-m Erik Meade added a comment -

            This is running in CI, however for some reason the result log is not linked to for the test. The results can be seen in the raw console http://ci.rice.kuali.org/view/rice-2.4/job/rice-2.4-integration-test-mysql-freestyle/lastCompletedBuild/consoleText

            Show
            eghm-kuali-m Erik Meade added a comment - This is running in CI, however for some reason the result log is not linked to for the test. The results can be seen in the raw console http://ci.rice.kuali.org/view/rice-2.4/job/rice-2.4-integration-test-mysql-freestyle/lastCompletedBuild/consoleText
            Hide
            cpedersen Corey Pedersen (Inactive) added a comment -

            Currently failing with

            2014-02-11 12:47:28,495 [main] FATAL org.kuali.rice.core.framework.persistence.jta.KualiTransactionInterceptor - Exception caught by Transaction Interceptor, this will cause a rollback at the end of the transaction.
            org.springframework.dao.InvalidDataAccessApiUsageException: The attribute [stateCode] is not present in the managed type [EntityTypeImpl@1418660166:StateBo [ javaType: class org.kuali.rice.location.impl.state.StateBo descriptor: RelationalDescriptor(org.kuali.rice.location.impl.state.StateBo --> [DatabaseTable(KRLC_ST_T)]), mappings: 7]].; nested exception is java.lang.IllegalArgumentException: The attribute [stateCode] is not present in the managed type [EntityTypeImpl@1418660166:StateBo [ javaType: class org.kuali.rice.location.impl.state.StateBo descriptor: RelationalDescriptor(org.kuali.rice.location.impl.state.StateBo --> [DatabaseTable(KRLC_ST_T)]), mappings: 7]].
            	at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:296)
            	at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:121)
            
            ...
            ...
            Caused by: java.lang.IllegalArgumentException: The attribute [stateCode] is not present in the managed type [EntityTypeImpl@1418660166:StateBo [ javaType: class org.kuali.rice.location.impl.state.StateBo descriptor: RelationalDescriptor(org.kuali.rice.location.impl.state.StateBo --> [DatabaseTable(KRLC_ST_T)]), mappings: 7]].
            	at org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl.getAttribute(ManagedTypeImpl.java:148)
            	at org.eclipse.persistence.internal.jpa.querydef.FromImpl.get(FromImpl.java:312)
            	at org.kuali.rice.krad.data.jpa.NativeJpaQueryTranslator$TranslationContext.attr(NativeJpaQueryTranslator.java:114)
            	at org.kuali.rice.krad.data.jpa.NativeJpaQueryTranslator.addEqualTo(NativeJpaQueryTranslator.java:176)
            	at org.kuali.rice.krad.data.jpa.NativeJpaQueryTranslator.addEqualTo(NativeJpaQueryTranslator.java:36)
            	at org.kuali.rice.krad.data.jpa.QueryTranslatorBase.addSingleValuePredicate(QueryTranslatorBase.java:138)
            
            Show
            cpedersen Corey Pedersen (Inactive) added a comment - Currently failing with 2014-02-11 12:47:28,495 [main] FATAL org.kuali.rice.core.framework.persistence.jta.KualiTransactionInterceptor - Exception caught by Transaction Interceptor, this will cause a rollback at the end of the transaction. org.springframework.dao.InvalidDataAccessApiUsageException: The attribute [stateCode] is not present in the managed type [EntityTypeImpl@1418660166:StateBo [ javaType: class org.kuali.rice.location.impl.state.StateBo descriptor: RelationalDescriptor(org.kuali.rice.location.impl.state.StateBo --> [DatabaseTable(KRLC_ST_T)]), mappings: 7]].; nested exception is java.lang.IllegalArgumentException: The attribute [stateCode] is not present in the managed type [EntityTypeImpl@1418660166:StateBo [ javaType: class org.kuali.rice.location.impl.state.StateBo descriptor: RelationalDescriptor(org.kuali.rice.location.impl.state.StateBo --> [DatabaseTable(KRLC_ST_T)]), mappings: 7]]. at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:296) at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:121) ... ... Caused by: java.lang.IllegalArgumentException: The attribute [stateCode] is not present in the managed type [EntityTypeImpl@1418660166:StateBo [ javaType: class org.kuali.rice.location.impl.state.StateBo descriptor: RelationalDescriptor(org.kuali.rice.location.impl.state.StateBo --> [DatabaseTable(KRLC_ST_T)]), mappings: 7]]. at org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl.getAttribute(ManagedTypeImpl.java:148) at org.eclipse.persistence.internal.jpa.querydef.FromImpl.get(FromImpl.java:312) at org.kuali.rice.krad.data.jpa.NativeJpaQueryTranslator$TranslationContext.attr(NativeJpaQueryTranslator.java:114) at org.kuali.rice.krad.data.jpa.NativeJpaQueryTranslator.addEqualTo(NativeJpaQueryTranslator.java:176) at org.kuali.rice.krad.data.jpa.NativeJpaQueryTranslator.addEqualTo(NativeJpaQueryTranslator.java:36) at org.kuali.rice.krad.data.jpa.QueryTranslatorBase.addSingleValuePredicate(QueryTranslatorBase.java:138)
            Hide
            cpedersen Corey Pedersen (Inactive) added a comment -

            It appears that org.kuali.rice.krad.data.provider.impl.DataObjectWrapperBase#getForeignKeyAttributeMap should be returning the childAttributeName of the relationship instead of the parentAttributeName. This does not error when names match, but in this test the relationship is stateCode => code.

            Show
            cpedersen Corey Pedersen (Inactive) added a comment - It appears that org.kuali.rice.krad.data.provider.impl.DataObjectWrapperBase#getForeignKeyAttributeMap should be returning the childAttributeName of the relationship instead of the parentAttributeName. This does not error when names match, but in this test the relationship is stateCode => code.
            Hide
            cpedersen Corey Pedersen (Inactive) added a comment -

            Now failing with
            java.lang.Exception: Unexpected exception, expected<org.kuali.rice.krad.exception.ValidationException> but was<java.lang.UnsupportedOperationException>
            at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:28)
            ...
            Caused by: java.lang.UnsupportedOperationException: getReferenceIfExists not supported in KRAD
            at org.kuali.rice.krad.service.impl.KRADLegacyDataAdapterImpl.getReferenceIfExists(KRADLegacyDataAdapterImpl.java:699)
            at org.kuali.rice.krad.service.impl.LegacyDataAdapterImpl.getReferenceIfExists(LegacyDataAdapterImpl.java:262)
            at org.kuali.rice.krad.service.impl.DictionaryValidationServiceImpl.validateReferenceExists(DictionaryValidationServiceImpl.java:479)

            Show
            cpedersen Corey Pedersen (Inactive) added a comment - Now failing with java.lang.Exception: Unexpected exception, expected<org.kuali.rice.krad.exception.ValidationException> but was<java.lang.UnsupportedOperationException> at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:28) ... Caused by: java.lang.UnsupportedOperationException: getReferenceIfExists not supported in KRAD at org.kuali.rice.krad.service.impl.KRADLegacyDataAdapterImpl.getReferenceIfExists(KRADLegacyDataAdapterImpl.java:699) at org.kuali.rice.krad.service.impl.LegacyDataAdapterImpl.getReferenceIfExists(LegacyDataAdapterImpl.java:262) at org.kuali.rice.krad.service.impl.DictionaryValidationServiceImpl.validateReferenceExists(DictionaryValidationServiceImpl.java:479)

              People

              • Assignee:
                cpedersen Corey Pedersen (Inactive)
                Reporter:
                eghm-kuali-m Erik Meade
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d