javax.persistence.PersistenceException: Error loading on com.myproject.webapp.modeleb.ScheduleDay.dayType
Caused by: java.lang.RuntimeException: set dayType on [com.myproject.webapp.modeleb.ScheduleDay] arg[Identifiable-ScheduledAssignment:5] type[com.myproject.webapp.modeleb.ScheduleDay]
Caused by: java.lang.ClassCastException: com.myproject.webapp.modeleb.ScheduledAssignment cannot be cast to com.myproject.webapp.modeleb.DayType
javax.persistence.PersistenceException: Error loading on com.myproject.webapp.modeleb.SchedulePeriodAutomation.automation
Caused by: java.lang.RuntimeException: set automation on [com.myproject.webapp.modeleb.SchedulePeriodAutomation] arg[Identifiable-SchedulePeriod:38] type[com.myproject.webapp.modeleb.SchedulePeriodAutomation]
Caused by: java.lang.ClassCastException: com.myproject.webapp.modeleb.SchedulePeriod cannot be cast to com.myproject.webapp.modeleb.Automationjavax.persistence.PersistenceException: Error loading on com.myproject.webapp.modeleb.RoleTimeCredit.roleTimeCreditType
at com.avaje.ebeaninternal.server.query.SqlBeanLoad.load(SqlBeanLoad.java:88)
at com.avaje.ebeaninternal.server.deploy.BeanPropertyAssocOne.load(BeanPropertyAssocOne.java:559)
Caused by: java.lang.RuntimeException: set roleTimeCreditType on [com.myproject.webapp.modeleb.RoleTimeCredit] arg[Identifiable-RoleTimeCredit:2] type[com.myproject.webapp.modeleb.RoleTimeCredit] threw error
at com.avaje.ebeaninternal.server.deploy.BeanProperty.setValue(BeanProperty.java:708)
at com.avaje.ebeaninternal.server.deploy.BeanPropertyAssocOne.setValue(BeanPropertyAssocOne.java:536)
at com.avaje.ebeaninternal.server.query.SqlBeanLoad.load(SqlBeanLoad.java:79)
... 33 more
Caused by: java.lang.ClassCastException: com.myproject.webapp.modeleb.RoleTimeCredit cannot be cast to com.myproject.webapp.modeleb.RoleTimeCreditType
at com.myproject.webapp.modeleb.RoleTimeCredit._ebean_setField(RoleTimeCredit.java:1)
at com.avaje.ebeaninternal.server.reflect.EnhanceBeanReflect$Setter.set(EnhanceBeanReflect.java:84)
at com.avaje.ebeaninternal.server.deploy.BeanProperty.setValue(BeanProperty.java:703)
... 35 more
javax.persistence.PersistenceException: Error loading on com.myproject.webapp.modeleb.SchedulePeriodAutomation.automation
at com.avaje.ebeaninternal.server.query.SqlBeanLoad.load(SqlBeanLoad.java:88)
at com.avaje.ebeaninternal.server.deploy.BeanPropertyAssocOne.load(BeanPropertyAssocOne.java:559)
at com.avaje.ebeaninternal.server.query.SqlTreeNodeBean.load(SqlTreeNodeBean.java:236)
at com.avaje.ebeaninternal.server.query.CQuery.readRow(CQuery.java:515)
at com.avaje.ebeaninternal.server.query.CQuery.readBeanInternal(CQuery.java:542)
at com.avaje.ebeaninternal.server.query.CQuery.hasNextBean(CQuery.java:657)
at com.avaje.ebeaninternal.server.query.CQuery.readTheRows(CQuery.java:649)
at com.avaje.ebeaninternal.server.query.CQuery.readCollection(CQuery.java:615)
at com.avaje.ebeaninternal.server.query.CQueryEngine.findMany(CQueryEngine.java:168)
at com.avaje.ebeaninternal.server.query.DefaultOrmQueryEngine.findMany(DefaultOrmQueryEngine.java:80)
at com.avaje.ebeaninternal.server.core.OrmQueryRequest.findList(OrmQueryRequest.java:251)
at com.avaje.ebeaninternal.server.core.DefaultServer.findList(DefaultServer.java:1444)
at com.avaje.ebeaninternal.server.core.DefaultServer.findUnique(DefaultServer.java:1228)
at com.avaje.ebeaninternal.server.querydefn.DefaultOrmQuery.findUnique(DefaultOrmQuery.java:925)
at com.avaje.ebeaninternal.util.DefaultExpressionList.findUnique(DefaultExpressionList.java:194)
at com.myproject.webapp.ealeb.SchedulePeriodAutomationAccess.findBySchedulePeriodAndAutomationIds(SchedulePeriodAutomationAccess.java:33)
at com.myproject.webapp.ealeb.SchedulePeriodAutomationAccess.find(SchedulePeriodAutomationAccess.java:25)
at com.myproject.webapp.unittest.UnitTestSupport.insertAllotments(UnitTestSupport.java:577)
at com.myproject.webapp.unittest.UnitTestSupport.insertAllotments(UnitTestSupport.java:497)
at com.myproject.webapp.unittest.TestBasicScatter.testAssignmentSorting(TestBasicScatter.java:2255)
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 junit.framework.TestCase.runTest(TestCase.java:176)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.RuntimeException: set automation on [com.myproject.webapp.modeleb.SchedulePeriodAutomation] arg[Identifiable-SchedulePeriod:38] type[com.myproject.webapp.modeleb.SchedulePeriodAutomation] threw error
at com.avaje.ebeaninternal.server.deploy.BeanProperty.setValue(BeanProperty.java:708)
at com.avaje.ebeaninternal.server.deploy.BeanPropertyAssocOne.setValue(BeanPropertyAssocOne.java:536)
at com.avaje.ebeaninternal.server.query.SqlBeanLoad.load(SqlBeanLoad.java:79)
... 39 more
Caused by: java.lang.ClassCastException: com.myproject.webapp.modeleb.SchedulePeriod cannot be cast to com.myproject.webapp.modeleb.Automation
at com.myproject.webapp.modeleb.SchedulePeriodAutomation._ebean_setField(SchedulePeriodAutomation.java:1)
at com.avaje.ebeaninternal.server.reflect.EnhanceBeanReflect$Setter.set(EnhanceBeanReflect.java:84)
at com.avaje.ebeaninternal.server.deploy.BeanProperty.setValue(BeanProperty.java:703)
... 41 more
/Daryl--
---
You received this message because you are subscribed to the Google Groups "Ebean ORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is there any inheritance involved?
Are there any fields in the beans with interesting modifiers?
Are you able to create a reproducing test case?
TUser2 user = ebeanServer.find(TUser2.class, 9);
Are you able to try using Java7?
Ok, Just tried to reproduce with a quick test and I could not reproduce it.If you can get a test case that would be great obviously.
You can alternatively create a small app and email it or put it somewhere.
Is there any inheritance involved?
--
Hi Rob,I'm having a strange "class" of exceptions happening on a high percentage of unit tests involving Ebean 4.