Hibernate version:
3.1
Mapping documents:
<hibernate-mapping package="com.talisen.lbwebpo.model">
<class name="Po" table="PO_LIST" where="SOURCE != 'WEBPO - IDS' AND active = 1">
<id name="poId" column="PO_ID" type="integer">
<generator class="native"/>
</id>
<property name="parentPoId" column="PARENT_PO_ID" type="integer" />
<property name="poNumber" column="PO_NUMBER" type="string" not-null="true" />
<property name="poDate" column="PO_DATE" type="date" not-null="true" />
<property name="loadDate" column="LOAD_DATE" type="timestamp" not-null="true" />
<property name="supplierName" column="SUPPLIER_NAME" type="string" />
<property name="supplierNumber" column="SUPPLIER_NUMBER" type="integer" />
<property name="buyerCode" column="BUYER_CODE" type="string" />
<many-to-one name="poType" column="PO_TYPE_ID" class="PoType" not-null="true"/>
<property name="creator" column="CREATOR" type="string" />
<property name="inQueue" column="IN_QUEUE" type="yes_no" />
<property name="changeOrderSeq" column="CHANGE_ORDER_SEQ" type="string" />
<property name="custCode" column="CUST_CODE" type="string" />
<property name="cageCode" column="CAGE_CODE" type="string" />
<property name="active" column="ACTIVE" type="byte" not-null="true" />
<!-- <many-to-one name="poType" column="PO_TYPE_ID" class="PoType" not-null="true" />-->
<!-- <one-to-one name="rfqReqs" class="RfqReqs" property-ref="reqPo"/>-->
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
List reqList = HibernateUtil
.getCurrentSession()
.createQuery(
"from Po po3 where po3.poType.poTypeId=11 and po3.buyerCode in (:buyerCodes) and po3.poId not in (select r.reqId from RfqReqs r where r.rfq.status = 1) and not exists (select 'x' from ReqDeletedDate rdd where rdd.poId = po3.poId) and (decode(substr(po3.poNumber,6,1),'-',po3.poNumber, decode(instr(po3.poNumber,'-'),0, po3.poNumber, substr(po3.poNumber,1,instr(po3.poNumber,'-')-1)))) not in (select decode(substr(po.poNumber,6,1),'-',po.poNumber,decode(instr(po.poNumber,'-'),0,po.poNumber, substr(po.poNumber,1,instr(po.poNumber,'-')-1))) from Po po WHERE po.poType.poTypeId in (1, 6) AND po.active = 1 and po.poDate > (sysdate - 3) and po.creator = 'WEBPO - LBD') order by po3.poDate asc")
.setParameterList("buyerCodes", buyerCodes).list();
Full stack trace of any exception that occurs:
javax.servlet.ServletException: No data type for node: org.hibernate.hql.ast.tree.MethodNode
\-[METHOD_CALL] MethodNode: '('
+-[METHOD_NAME] IdentNode: 'decode' {originalText=decode}
\-[EXPR_LIST] SqlNode: 'exprList'
+-[METHOD_CALL] MethodNode: '('
| +-[METHOD_NAME] IdentNode: 'substr' {originalText=substr}
| \-[EXPR_LIST] SqlNode: 'exprList'
| +-[DOT] DotNode: 'po4_.PO_NUMBER' {propertyName=poNumber,dereferenceType=4,propertyPath=poNumber,path=po.poNumber,tableAlias=po4_,className=com.talisen.lbwebpo.model.Po,classAlias=po}
| | +-[ALIAS_REF] IdentNode: 'po4_.PO_ID' {alias=po, className=com.talisen.lbwebpo.model.Po, tableAlias=po4_}
| | \-[IDENT] IdentNode: 'poNumber' {originalText=poNumber}
| +-[NUM_INT] LiteralNode: '6'
| \-[NUM_INT] LiteralNode: '1'
+-[QUOTED_STRING] LiteralNode: ''-''
+-[DOT] DotNode: 'po4_.PO_NUMBER' {propertyName=poNumber,dereferenceType=4,propertyPath=poNumber,path=po.poNumber,tableAlias=po4_,className=com.talisen.lbwebpo.model.Po,classAlias=po}
| +-[ALIAS_REF] IdentNode: 'po4_.PO_ID' {alias=po, className=com.talisen.lbwebpo.model.Po, tableAlias=po4_}
| \-[IDENT] IdentNode: 'poNumber' {originalText=poNumber}
\-[METHOD_CALL] MethodNode: '('
+-[METHOD_NAME] IdentNode: 'decode' {originalText=decode}
\-[EXPR_LIST] SqlNode: 'exprList'
+-[METHOD_CALL] MethodNode: '('
| +-[METHOD_NAME] IdentNode: 'instr' {originalText=instr}
| \-[EXPR_LIST] SqlNode: 'exprList'
| +-[DOT] DotNode: 'po4_.PO_NUMBER' {propertyName=poNumber,dereferenceType=4,propertyPath=poNumber,path=po.poNumber,tableAlias=po4_,className=com.talisen.lbwebpo.model.Po,classAlias=po}
| | +-[ALIAS_REF] IdentNode: 'po4_.PO_ID' {alias=po, className=com.talisen.lbwebpo.model.Po, tableAlias=po4_}
| | \-[IDENT] IdentNode: 'poNumber' {originalText=poNumber}
| \-[QUOTED_STRING] LiteralNode: ''-''
+-[NUM_INT] LiteralNode: '0'
+-[DOT] DotNode: 'po4_.PO_NUMBER' {propertyName=poNumber,dereferenceType=4,propertyPath=poNumber,path=po.poNumber,tableAlias=po4_,className=com.talisen.lbwebpo.model.Po,classAlias=po}
| +-[ALIAS_REF] IdentNode: 'po4_.PO_ID' {alias=po, className=com.talisen.lbwebpo.model.Po, tableAlias=po4_}
| \-[IDENT] IdentNode: 'poNumber' {originalText=poNumber}
\-[METHOD_CALL] MethodNode: '('
+-[METHOD_NAME] IdentNode: 'substr' {originalText=substr}
\-[EXPR_LIST] SqlNode: 'exprList'
+-[DOT] DotNode: 'po4_.PO_NUMBER' {propertyName=poNumber,dereferenceType=4,propertyPath=poNumber,path=po.poNumber,tableAlias=po4_,className=com.talisen.lbwebpo.model.Po,classAlias=po}
| +-[ALIAS_REF] IdentNode: 'po4_.PO_ID' {alias=po, className=com.talisen.lbwebpo.model.Po, tableAlias=po4_}
| \-[IDENT] IdentNode: 'poNumber' {originalText=poNumber}
+-[NUM_INT] LiteralNode: '1'
\-[MINUS] BinaryArithmeticOperatorNode: '-' {dataType=org.hibernate.type.IntegerType@e0e9d5}
+-[METHOD_CALL] MethodNode: '('
| +-[METHOD_NAME] IdentNode: 'instr' {originalText=instr}
| \-[EXPR_LIST] SqlNode: 'exprList'
| +-[DOT] DotNode: 'po4_.PO_NUMBER' {propertyName=poNumber,dereferenceType=4,propertyPath=poNumber,path=po.poNumber,tableAlias=po4_,className=com.talisen.lbwebpo.model.Po,classAlias=po}
| | +-[ALIAS_REF] IdentNode: 'po4_.PO_ID' {alias=po, className=com.talisen.lbwebpo.model.Po, tableAlias=po4_}
| | \-[IDENT] IdentNode: 'poNumber' {originalText=poNumber}
| \-[QUOTED_STRING] LiteralNode: ''-''
\-[NUM_INT] LiteralNode: '1'
Name and version of the database you are using:
Oracle 9i
The generated SQL (show_sql=true):
doesn't get to this part
Debug level Hibernate log excerpt:
will try to provide
|