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

    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:@192.168.0.99:1521:Oraware</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="hibernate.hbm2ddl.auto">update</property>






    org.hibernate.exception.SQLGrammarException: could not execute query
    at org.hibernate.exception.SQLStateConverter.convert( SQLStateConverter.java:65)
    at org.hibernate.exception.JDBCExceptionHelper.conver t(JDBCExceptionHelper.java:43)
    at org.hibernate.loader.Loader.doList(Loader.java:215 0)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(L oader.java:2026)
    at org.hibernate.loader.Loader.list(Loader.java:2021)
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoa der.java:369)
    at org.hibernate.hql.ast.QueryTranslatorImpl.list(Que ryTranslatorImpl.java:298)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.ja va:1020)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:7 4)
    at workflowtracker.Tracker.workflowCompleted(Tracker. java:129)
    at workflowtracker.Tracker.startNewWorkflow(Tracker.j ava:213)
    at workflowtracker.WorkflowTracker.eventOccured(Workf lowTracker.java:78)
    at watchdog.manager.WatchDog.eventOccured(WatchDog.ja va:63)
    at watchdog.monitors.Monitor.eventOccured(Monitor.jav a:138)
    at watchdog.monitors.FileSystemMonitor.monitorAnyFile Creation(FileSystemMonitor.java:133)
    at watchdog.monitors.FileSystemMonitor.monitor(FileSy stemMonitor.java:88)
    at watchdog.monitors.FileSystemMonitor.run(FileSystem Monitor.java:72)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended

    at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java: 743)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4 CPreparedStatement.java:216)
    at oracle.jdbc.driver.T4CPreparedStatement.executeFor Describe(T4CPreparedStatement.java:799)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1037)
    at oracle.jdbc.driver.T4CPreparedStatement.executeMay beDescribe(T4CPreparedStatement.java:839)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1132)
    at oracle.jdbc.driver.OraclePreparedStatement.execute Internal(OraclePreparedStatement.java:3316)
    at oracle.jdbc.driver.OraclePreparedStatement.execute Query(OraclePreparedStatement.java:3361)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(Ab stractBatcher.java:137)
    at org.hibernate.loader.Loader.getResultSet(Loader.ja va:1676)
    at org.hibernate.loader.Loader.doQuery(Loader.java:66 2)
    at org.hibernate.loader.Loader.doQueryAndInitializeNo nLazyCollections(Loader.java:223)
    at org.hibernate.loader.Loader.doList(Loader.java:214 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
    Location
    Dominican Republic
    Posts
    721
    There is no dbo in Oracle, so remove it from your query.

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    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
    Posts
    2

    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
  •