1

我有一个查询条件,它从 Oracle 中的数据库表返回结果。我得到了 UI 上除 Date 之外的所有字段的结果。我在搜索屏幕中输入 09/06/2006 作为日期。有人可以给我一个解决方案,看看下面的详细信息。下面是从 QueryCriteria 生成的查询,我在我的 JBoss 日志中得到它 -

16:39:48,286 INFO  [STDOUT] Hibernate: 

        select
            this_.SEQUENCE_NUMBER_N15 as SEQUENCE1_63_0_,
            this_.DATE_LAST_MODIFIED as DATE2_63_0_,
            this_.DATE_TIME_LOADED as DATE3_63_0_,
            this_.DATE_TIME_USER_DELETION as DATE4_63_0_,
            this_.DATE_TRANSACTION as DATE5_63_0_,
            this_.DB_CLEAN_CODE as DB6_63_0_,
            this_.EI_ACTION as EI7_63_0_,
            this_.FK_IAF_SQN15 as FK8_63_0_,
            this_.ID_CODE as ID9_63_0_,
            this_.INTERFACE_TRANSACTION_TYPE as INTERFACE10_63_0_,
            this_.ITEM as ITEM63_0_,
            this_.NON_ENTERPRISE_FLAG as NON12_63_0_,
            this_.OPTION_NUMBER as OPTION13_63_0_,
            this_.ORDER_BASE_NUMBER as ORDER14_63_0_,
            this_.ORDER_TYPE as ORDER15_63_0_,
            this_.OSP_NUMBER as OSP16_63_0_,
            this_.OSP_PREFIX as OSP17_63_0_,
            this_.PRIORITY as PRIORITY63_0_,
            this_.PRODUCT_LINE as PRODUCT19_63_0_,
            this_.PRODUCT_NUMBER as PRODUCT20_63_0_,
            this_.QUANTITY_ADDED as QUANTITY21_63_0_,
            this_.QUANTITY_OUTSTANDING as QUANTITY22_63_0_,
            this_.QUANTITY_USER_DELETED as QUANTITY23_63_0_,
            this_.REASON_CODE as REASON24_63_0_,
            this_.RECLASS_FIELD as RECLASS25_63_0_,
            this_.RECLASS_NEW_VALUE as RECLASS26_63_0_,
            this_.REFERENCE_ID as REFERENCE27_63_0_,
            this_.SALES_AREA_CODE as SALES28_63_0_,
            this_.SALES_FORCE as SALES29_63_0_,
            this_.SALES_OFFICE_CODE as SALES30_63_0_,
            this_.SCS_ENTITY_CODE as SCS31_63_0_,
            this_.SECTION_NUMBER as SECTION32_63_0_,
            this_.SUB_ENTITY as SUB33_63_0_,
            this_.SUB_ITEM as SUB34_63_0_,
            this_.USER_DELETION_COMMENT as USER35_63_0_,
            this_.USER_ID_DELETION as USER36_63_0_,
            1 as formula63_0_ 
        from
            EFLADM.INVENTORY_ADJUSTMENT this_ 
        where
            this_.SCS_ENTITY_CODE=? 
            and this_.DATE_TRANSACTION=? 
        order by
        this_.SEQUENCE_NUMBER_N15 asc

我得到的例外是 -

org.hibernate.HibernateException: class java.lang.StringNot a valid Value
    at com.hp.fait.date.HPDate.nullSafeSet(HPDate.java:237)
    at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:183)
    at org.hibernate.loader.Loader.bindPositionalParameters(Loader.java:1769)
    at org.hibernate.loader.Loader.bindParameterValues(Loader.java:1740)
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1612)
    at org.hibernate.loader.Loader.doQuery(Loader.java:717)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
    at org.hibernate.loader.Loader.doList(Loader.java:2294)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
    at org.hibernate.loader.Loader.list(Loader.java:2167)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706)
    at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
    at com.hp.eiffel.eiffeltools.eiffelinventory.factory.InvAdjustmentFactory.getAllInvAdjustmentBySearchCriteria(InvAdjustmentFactory.java:42)
    at com.hp.eiffel.eiffeltools.eiffelinventory.manager.InvAdjustmentManager.getAllInvAdjustmentBySearchCriteria(InvAdjustmentManager.java:38)
    at com.hp.eiffel.eiffeltools.eiffelinventory.client.InvAdjustmentClient.getInvAdjustmentSummary(InvAdjustmentClient.java:39)
    at com.hp.eiffel.eiffeltools.eiffelinventory.action.InvAdjustmentAction.getBeanListImpl(InvAdjustmentAction.java:131)
    at com.hp.eiffel.eiffeltools.eiffelinventory.action.InvAdjustmentAction.searchInvAdjustmentResultListDetails(InvAdjustmentAction.java:280)

谢谢,萨钦帕拉德卡。

4

0 回答 0