错误:HHH000099:发生断言失败

时间:2014-07-22 10:10:24

标签: java hibernate annotations javafx-8

当我尝试将数据填入表格时,我得到了这个hibernate断言错误。

除了源代码之外我找不到任何关于此错误的内容,所以我想,也许我正在做一些明显错误的事情...

这是堆栈跟踪,

Hibernate: 
select
    company0_.ID as ID1_3_7_,
    company0_.ADDRESS as ADDRESS2_3_7_,
    company0_.EMAIL as EMAIL3_3_7_,
    company0_.NAME as NAME4_3_7_,
    company0_.REMARK as REMARK5_3_7_,
    company0_.STATUS as STATUS6_3_7_,
    company0_.TELEPHONE as TELEPHON7_3_7_,
    agents1_.COMPANY_ID as COMPANY_7_3_9_,
    agents1_.ID as ID1_14_9_,
    agents1_.ID as ID1_14_0_,
    agents1_.COMPANY_ID as COMPANY_7_14_0_,
    agents1_.EMAIL as EMAIL2_14_0_,
    agents1_.NAME as NAME3_14_0_,
    agents1_.REMARK as REMARK4_14_0_,
    agents1_.STATUS as STATUS5_14_0_,
    agents1_.TELEPHONE as TELEPHON6_14_0_,
    purchaseor2_.AGENT_ID as AGENT_ID8_14_10_,
    purchaseor2_.ID as ID1_13_10_,
    purchaseor2_.ID as ID1_13_1_,
    purchaseor2_.company as company2_13_1_,
    purchaseor2_.DATE as DATE3_13_1_,
    purchaseor2_.PO_STATUS as PO_STATU4_13_1_,
    purchaseor2_.PURCHASE_ORDER_NO as PURCHASE5_13_1_,
    purchaseor2_.AGENT_ID as AGENT_ID8_13_1_,
    purchaseor2_.STATUS as STATUS6_13_1_,
    purchaseor2_.USER_ID as USER_ID7_13_1_,
    items3_.COMPANY_ID as COMPANY14_3_11_,
    items3_.ID as ID1_7_11_,
    items3_.ID as ID1_7_2_,
    items3_.BRAND_ID as BRAND_I12_7_2_,
    items3_.CATAGORY_ID as CATAGOR13_7_2_,
    items3_.CODE as CODE2_7_2_,
    items3_.COMPANY_ID as COMPANY14_7_2_,
    items3_.DESCRIPTION as DESCRIPT3_7_2_,
    items3_.ITEM_CODE as ITEM_COD4_7_2_,
Jul 22, 2014 3:11:25 PM org.hibernate.AssertionFailure <init>
    items3_.ITEM_IMAGE as ITEM_IMA5_7_2_,
    items3_.ITEM_NAME as ITEM_NAM6_7_2_,
    items3_.MODEL_ID as MODEL_I15_7_2_,
    items3_.NAME as NAME7_7_2_,
    items3_.REORDER_LEVEL as REORDER_8_7_2_,
    items3_.SELL_PRICE as SELL_PRI9_7_2_,
    items3_.STATUS as STATUS10_7_2_,
    items3_.WARRENT_PERIOD as WARRENT11_7_2_,
    brand4_.ID as ID1_1_3_,
    brand4_.DESCRIPTION as DESCRIPT2_1_3_,
    brand4_.NAME as NAME3_1_3_,

ERROR: HHH000099: an assertion failure occured (this may indicate a bug in Hibernate,            
but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure:          nullidentifier
    brand4_.STATUS as STATUS4_1_3_,
    catagory5_.ID as ID1_2_4_,
    catagory5_.NAME as NAME2_2_4_,
    catagory5_.REMARK as REMARK3_2_4_,
org.hibernate.AssertionFailure: null identifier
    catagory5_.STATUS as STATUS4_2_4_,
    itempurcha6_.ITEM_ID as ITEM_ID3_7_12_,
    itempurcha6_.ITEM_ID as ITEM_ID3_8_12_,
at org.hibernate.engine.spi.EntityKey.<init>(EntityKey.java:69)
    itempurcha6_.PURCHASE_ORDER_ID as PURCHASE2_8_12_,
    itempurcha6_.ITEM_ID as ITEM_ID3_8_5_,
    itempurcha6_.PURCHASE_ORDER_ID as PURCHASE2_8_5_,
    itempurcha6_.QTY as QTY1_8_5_,
    model7_.ID as ID1_9_6_,
    model7_.BRAND_ID as BRAND_ID5_9_6_,
at    org.hibernate.internal.AbstractSessionImpl.generateEntityKey(AbstractSessionImpl.java:247)
    model7_.DESCRIPTION as DESCRIPT2_9_6_,
    model7_.NAME as NAME3_9_6_,
    model7_.STATUS as STATUS4_9_6_ 
from
    company company0_ 
left outer join
at org.hibernate.loader.Loader.extractKeysFromResultSet(Loader.java:795)
    sales_agent agents1_ 
        on company0_.ID=agents1_.COMPANY_ID 
left outer join
    purchase_order purchaseor2_ 
        on agents1_.ID=purchaseor2_.AGENT_ID 
left outer join
    item items3_ 
        on company0_.ID=items3_.COMPANY_ID 
left outer join
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:708)
    brand brand4_ 
        on items3_.BRAND_ID=brand4_.ID 
left outer join
    catagory catagory5_ 
at org.hibernate.loader.Loader.processResultSet(Loader.java:943)
        on items3_.CATAGORY_ID=catagory5_.ID 
left outer join
    item_purchase_order itempurcha6_ 
        on items3_.ID=itempurcha6_.ITEM_ID 
left outer join
    model model7_ 
        on items3_.MODEL_ID=model7_.ID 
where
    company0_.ID=?
at org.hibernate.loader.Loader.doQuery(Loader.java:911)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:342)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:312)
at org.hibernate.loader.Loader.loadEntity(Loader.java:2121)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)
at    org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3927)
at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:460)
at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:429)
at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:206)
at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:262)
at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:150)
at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1092)
at org.hibernate.internal.SessionImpl.internalLoad(SessionImpl.java:1019)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:672)
at org.hibernate.type.EntityType.resolve(EntityType.java:490)
at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:168)
at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:137)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1108)
at org.hibernate.loader.Loader.processResultSet(Loader.java:964)
at org.hibernate.loader.Loader.doQuery(Loader.java:911)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:342)
at org.hibernate.loader.Loader.doList(Loader.java:2526)
at org.hibernate.loader.Loader.doList(Loader.java:2512)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2342)
at org.hibernate.loader.Loader.list(Loader.java:2337)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:495)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:357)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:195)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1269)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
at com.pcHome.dao.SalesAgentDao.getAllSalesAgentObservableList(SalesAgentDao.java:39)
at    com.pcHome.view.controller.SalesAgentController.initialize(SalesAgentController.java:139)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3230)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3191)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3164)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3140)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3120)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3113)
at com.pcHome.view.SalesAgentLoader.start(SalesAgentLoader.java:27)
at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
at java.lang.Thread.run(Thread.java:744)
Exception in Application start method
java.lang.reflect.InvocationTargetException
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:483)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:367)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
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:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
at java.lang.Thread.run(Thread.java:744)
Caused by: javafx.fxml.LoadException: 
file:/D:/Back%20Ups/Version%2028/InventoryAndSalesControlSystem/dist/run980571470/Inventory AndSalesControlSystem.jar!/com/pcHome/view/fxml/salesAgent.fxml

at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2617)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2595)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3230)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3191)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3164)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3140)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3120)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3113)
at com.pcHome.view.SalesAgentLoader.start(SalesAgentLoader.java:27)
at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
... 1 more
Caused by: java.lang.NullPointerException
at com.pcHome.dao.SalesAgentDao.getAllSalesAgentObservableList(SalesAgentDao.java:49)
at com.pcHome.view.controller.SalesAgentController.initialize(SalesAgentController.java:139)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
... 19 more
Exception running application com.pcHome.view.SalesAgentLoader

0 个答案:

没有答案