Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: Hibernate 3.0
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class
name="com.OrderSvcItemComp"
table="COMP" dynamic-insert="false"
dynamic-update="false" batch-size="10">
<id name="compId" type="long"
column="COMPONENT_ID">
<generator class="native" />
</id>
<property name="ordSvcItemNum">
<column name="ORD_SVC_ITEM_NUM" />
</property>
<property name="compSeqNum">
<column name="COMPONENT_SEQ_NUM " />
</property>
<one-to-one name="comps"
class="com.PackageComponent"
property-ref="componentId" />
</class>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class
name="com.PackageComponent"
table="PACKAGE_COMPONENTS" lazy="false">
<composite-id>
<key-property name="packageId" type="long"
column="PACKAGE_ID" />
<key-property name="componentId" type="string"
column="COMPONENT_ID" />
<key-property name="activeDt"
column="ACTIVE_DT" />
</composite-id>
<property name="componentId" column="COMPONENT_ID" not-null="true" insert="false" update="false" />
</class>
</hibernate-mapping>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
List osiComps = new OrderSvcItemCompDAO().getOrderSvcItemComp(osv);
Full stack trace of any exception that occurs:
Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:1502)
at org.hibernate.loader.Loader.list(Loader.java:1482)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1246)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)
at com.telcove.phoenix.ordervalidation.dao.OrderSvcItemCompDAO.getOrderSvcItemComp(OrderSvcItemCompDAO.java:31)
at com.telcove.phoenix.ordervalidation.common.OrderValidation.checkIfPackageIsValidForOrderDetail(OrderValidation.java:115)
at Condition_18.invoke(Condition_18.java:1)
at org.drools.semantics.java.JavaCondition.isAllowed(JavaCondition.java:146)
... 11 more
Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321)
at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:1255)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:107)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1183)
at org.hibernate.loader.Loader.doQuery(Loader.java:363)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:203)
at org.hibernate.loader.Loader.doList(Loader.java:1499)
... 19 more
Name and version of the database you are using: Oracle 9i
The generated SQL (show_sql=true):
SELECT this_.component_id AS component1_1_,
this_.ord_svc_item_num AS ord2_8_1_,
this_.component_seq_num AS component3_8_1_,
packagecom2_.package_id AS package1_0_,
packagecom2_.component_id AS component2_0_,
packagecom2_.active_dt AS active3_0_,
packagecom2_.component_id AS component2_9_0_
FROM OEOM_ABS_ORD_SVC_ITEM_COMP this_ LEFT OUTER JOIN package_components packagecom2_ ON this_.component_id =
packagecom2_.component_id
WHERE this_.ord_svc_item_num = ?
Debug level Hibernate log excerpt:error
Hi,
I am gettting the error as shown above. How do I remove the error? I did search the forum but could not get the answer.
Thanks in advance.
-Jam