Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006

    Unanswered: Hibernate 3.1 giving problem with oracle 10g

    My code was working with MS SQL server but after i changed my configurations to use my code with oracle 10g, below mentioned exceptions are coming. Tables are not getting created automatically.
    Any ideas if I am using a wrong driver or dialect.

    An excerpt from my hibernate.cfg.xml
    <property name="hibernate.connection.driver_class">oracle.jd bc.driver.OracleDriver</property>
    <property name="hibernate.connection.url">jdbcracle:thin:@</property>
    <property name="hibernate.connection.username">fahad</property>
    <property name="hibernate.connection.password">prodoc</property>

    <property name="hibernate.connection.pool_size">10</property>
    <property name="show_sql">true</property>
    <property name="hibernate.current_session_context_class">thr ead</property>
    <property name="dialect">org.hibernate.dialect.Oracle9Dialec t</property>
    <property name="">update</property>

    org.hibernate.exception.SQLGrammarException: could not execute query
    at org.hibernate.exception.SQLStateConverter.convert(
    at org.hibernate.exception.JDBCExceptionHelper.conver t(
    at org.hibernate.loader.Loader.doList( 0)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(L
    at org.hibernate.loader.Loader.list(
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoa
    at org.hibernate.hql.ast.QueryTranslatorImpl.list(Que
    at org.hibernate.impl.SessionImpl.list(SessionImpl.ja va:1020)
    at org.hibernate.impl.QueryImpl.list( 4)
    at workflowtracker.Tracker.workflowCompleted(Tracker. java:129)
    at workflowtracker.Tracker.startNewWorkflow(Tracker.j ava:213)
    at workflowtracker.WorkflowTracker.eventOccured(Workf
    at watchdog.manager.WatchDog.eventOccured(WatchDog.ja va:63)
    at watchdog.monitors.Monitor.eventOccured(Monitor.jav a:138)
    at watchdog.monitors.FileSystemMonitor.monitorAnyFile Creation(
    at watchdog.monitors.FileSystemMonitor.monitor(FileSy
    Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended

    at oracle.jdbc.driver.DatabaseError.throwSqlException (
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe
    at oracle.jdbc.driver.T4C8Oall.receive( 743)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4
    at oracle.jdbc.driver.T4CPreparedStatement.executeFor Describe(
    at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(
    at oracle.jdbc.driver.T4CPreparedStatement.executeMay beDescribe(
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(
    at oracle.jdbc.driver.OraclePreparedStatement.execute Internal(
    at oracle.jdbc.driver.OraclePreparedStatement.execute Query(
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(Ab
    at org.hibernate.loader.Loader.getResultSet(Loader.ja va:1676)
    at org.hibernate.loader.Loader.doQuery( 2)
    at org.hibernate.loader.Loader.doQueryAndInitializeNo nLazyCollections(
    at org.hibernate.loader.Loader.doList( 7)
    ... 15 more
    Hibernate: select welllog0_.wellLogID as wellLogID2_, welllog0_.created as created2_, welllog0_.wellID as wellID2_ from WellLog.dbo.WellLog welllog0_ where welllog0_.wellID='g4yr'

  2. #2
    Join Date
    May 2004
    Dominican Republic
    There is no dbo in Oracle, so remove it from your query.

  3. #3
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    >Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended
    I suspect you have SQL syntax issue.
    Like maybe a semicolon on the end?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Oct 2006

    solved !

    thanks all ur right it was dbo. it was in Welllog.hbm.xml
    <class name="WellLog" table="WellLog" schema="dbo" catalogue="Welllog"> <---

    I changed it to this.
    <class name="WellLog" table="WellLog" schema="fant">

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts