• Exception 03 : org.hibernate.MappingException: Unknown entity: org.hibernate.cfg.Configuration


    异常名称

    org.hibernate.MappingException: Unknown entity: org.hibernate.cfg.Configuration

    异常详细信息

    org.hibernate.MappingException: Unknown entity: org.hibernate.cfg.Configuration

           at org.hibernate.internal.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:1096)

           at org.hibernate.internal.SessionImpl.getEntityPersister(SessionImpl.java:1443)

           at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:116)

           at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:209)

           at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:55)

           at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:194)

           at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:49)

           at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90)

           at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:715)

           at org.hibernate.internal.SessionImpl.save(SessionImpl.java:707)

           at org.hibernate.internal.SessionImpl.save(SessionImpl.java:702)

           at cn.yang.hibernate.day01.UserTest.test(UserTest.java:30)

           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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

           at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)

           at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

           at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)

           at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)

           at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

           at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)

           at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)

           at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)

           at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)

           at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)

           at org.junit.runners.ParentRunner.run(ParentRunner.java:363)

           at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)

           at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)

           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)

           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)

           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

    异常排除流程

     

      session.save( )中的属性只能是正确的持久化的对象

      

  • 相关阅读:
    双向链表
    单链表实例+反转
    const,static,volatile
    html基础知识
    linux知识
    2018-2019 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2018) D. Delivery Delays (二分+最短路+DP)
    2018-2019 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2018) A. Altruistic Amphibians (DP)
    BZOJ 1453 (线段树+并查集)
    HDU 5634 (线段树)
    BZOJ 2124 (线段树 + hash)
  • 原文地址:https://www.cnblogs.com/applerosa/p/5950925.html
Copyright © 2020-2023  润新知