发表于: 2017-07-07 23:38:19

3 1147


今天完成的事:

1、代码生成(已不记得跑了多少遍了,最终出现如下错误)

serivce 启动没问题,但是进行crud就出错,目前尚未找出原因

07-08 01:17:46:ERROR(359)main com.gemantic.dal.config.DaoConfig - afterPropertiesSet fail: No identifier specified for entity: com.ptteng.carrots.zangai.model.ProfessionLabel
java.lang.IllegalArgumentException: Property 'sessionFactory' is required
    at org.springframework.orm.hibernate3.HibernateAccessor.afterPropertiesSet(HibernateAccessor.java:314)
    at org.springframework.orm.hibernate3.HibernateTemplate.<init>(HibernateTemplate.java:139)
    at com.gemantic.dal.dao.impl.DBAgentHibernateImpl.<init>(DBAgentHibernateImpl.java:55)
    at com.gemantic.dal.dao.impl.DBAgentHibernateImpl.getInstance(DBAgentHibernateImpl.java:60)
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.save(CompositeDaoImpl.java:76)
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.save(CompositeDaoImpl.java:116)
    at com.ptteng.carrots.zangai.service.impl.CompanyLabelServiceImpl.insert(CompanyLabelServiceImpl.java:43)
    at TestClient.getTest(TestClient.java:33)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
07-08 01:17:46:ERROR(45)main com.ptteng.carrots.zangai.service.impl.CompanyLabelServiceImpl -  insert wrong : com.ptteng.carrots.zangai.model.CompanyLabel@683d9d[
  id=2
  cId=3
  content=五险一金
  createBy=1
  updateBy=2
  updateAt=1499447865772
  createAt=1499447865772
]
07-08 01:17:46:ERROR(46)main com.ptteng.carrots.zangai.service.impl.CompanyLabelServiceImpl - com.gemantic.dal.dao.exception.DaoException
com.gemantic.dal.dao.exception.DaoException
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.processException(CompositeDaoImpl.java:1384)
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.save(CompositeDaoImpl.java:97)
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.save(CompositeDaoImpl.java:116)
    at com.ptteng.carrots.zangai.service.impl.CompanyLabelServiceImpl.insert(CompanyLabelServiceImpl.java:43)
    at TestClient.getTest(TestClient.java:33)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.IllegalArgumentException: Property 'sessionFactory' is required
    at org.springframework.orm.hibernate3.HibernateAccessor.afterPropertiesSet(HibernateAccessor.java:314)
    at org.springframework.orm.hibernate3.HibernateTemplate.<init>(HibernateTemplate.java:139)
    at com.gemantic.dal.dao.impl.DBAgentHibernateImpl.<init>(DBAgentHibernateImpl.java:55)
    at com.gemantic.dal.dao.impl.DBAgentHibernateImpl.getInstance(DBAgentHibernateImpl.java:60)
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.save(CompositeDaoImpl.java:76)
    ... 25 more
com.gemantic.common.exception.ServiceDaoException: com.gemantic.dal.dao.exception.DaoException
    at com.ptteng.carrots.zangai.service.impl.CompanyLabelServiceImpl.insert(CompanyLabelServiceImpl.java:48)
    at TestClient.getTest(TestClient.java:33)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: com.gemantic.dal.dao.exception.DaoException
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.processException(CompositeDaoImpl.java:1384)
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.save(CompositeDaoImpl.java:97)
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.save(CompositeDaoImpl.java:116)
    at com.ptteng.carrots.zangai.service.impl.CompanyLabelServiceImpl.insert(CompanyLabelServiceImpl.java:43)
    ... 23 more
Caused by: java.lang.IllegalArgumentException: Property 'sessionFactory' is required
    at org.springframework.orm.hibernate3.HibernateAccessor.afterPropertiesSet(HibernateAccessor.java:314)
    at org.springframework.orm.hibernate3.HibernateTemplate.<init>(HibernateTemplate.java:139)
    at com.gemantic.dal.dao.impl.DBAgentHibernateImpl.<init>(DBAgentHibernateImpl.java:55)
    at com.gemantic.dal.dao.impl.DBAgentHibernateImpl.getInstance(DBAgentHibernateImpl.java:60)
    at com.gemantic.dal.dao.impl.CompositeDaoImpl.save(CompositeDaoImpl.java:76)
    ... 25 more
07-08 01:17:46:INFO(85)Thread-1 com.gemantic.dal.config.GroupConfig - close datasource complete jdbc:mysql://127.0.0.1:3306/resources?defaultBatchValue=1000
07-08 01:17:46:INFO(85)Thread-1 com.gemantic.dal.config.GroupConfig - close datasource complete jdbc:mysql://127.0.0.1:3306/carrots_zangai?defaultBatchValue=1000

Process finished with exit code 0


明天计划的事:继续整

遇到的问题:上面

收获:那根测试条从之前的红色变成绿色了





返回列表 返回列表
评论

    分享到