Re: Problems with Oracle adapter in demo.

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jun 17 2003 - 09:17:35 EDT

  • Next message: Brusowankin, David: "Cannot run modeler.bat"

    > The trace looks weird in that I see function statements with the word
    > "mysql" in the class
    > names .. even though I changed the adapter and created the database in
    > oracle.

    This observation is the key to the problem. Is it possible that you
    changed the JDBC *driver* information, but not the DBAdapter? Check in the
    modeler in DataNode configuration panel.

    Another possibility is that there is still an old version of "cayenne.xml"
    with only a partial change, hanging around in CLASSPATH somewhere.

    Andrus

    > Hi,
    > I was running the 1st command line tutorial on Oracle 8.17 and I
    > got
    > an error. Trace below.
    > (p.s. I'm running beta3
    >
    > It is able to run the query to look for the metro gallery, but it fails
    > to create the entries in artist table
    > (I checked in the database). Note that the statements in the tutorial
    > for 'insert' work properly when I enter them 'manually' in oracle..
    >
    > The trace looks weird in that I see function statements with the word
    > "mysql" in the class
    > names .. even though I changed the adapter and created the database in
    > oracle.

    I think this observation is the key to the problem.

    > p.s. I did follow the instructions to create primary key support, and
    > the sequences did get
    > properly created in oracle (I checked). The tables did also get created.
    >
    > -------------------------------------------------------------
    >
    >
    > C:\work\cayenne-1.0b3\doc\tutorials\cayenne-cmd-app>%JAVA_HOME%\bin\javac
    > java\
    > est\*.java
    >
    > C:\work\cayenne-1.0b3\doc\tutorials\cayenne-cmd-app>set
    > CLASSPATH=%CLASSPATH%;j
    > va
    >
    > C:\work\cayenne-1.0b3\doc\tutorials\cayenne-cmd-app>%JAVA_HOME%\bin\java
    > test.M
    > in metro
    > WARN QueryLogger: --- will run 1 query.
    > WARN QueryLogger: SELECT t0.GALLERY_NAME, t0.GALLERY_ID FROM GALLERY t0
    > WHERE
    > PPER(t0.GALLERY_NAME) LIKE UPPER(?) [bind: '%metro%'] - prepared in 16
    > ms. WARN QueryLogger: === returned 1 row. - took 63 ms.
    >
    > Found gallery 'The Metropolitan Museum of Art'.
    >
    > Exception in thread "main"
    > org.objectstyle.cayenne.CayenneRuntimeException: [v.
    > .0b3 May 25 2003] org.objectstyle.cayenne.CayenneException: [v.1.0b3 May
    > 25 200
    > ] Error generating PK: ORA-00966: missing TABLE keyword
    >
    > at
    > org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext
    > java:735)
    > at test.Main.addArtist(Main.java:99)
    > at test.Main.runTutorial(Main.java:40)
    > at test.Main.main(Main.java:30)
    > Caused by: org.objectstyle.cayenne.CayenneException: [v.1.0b3 May 25
    > 2003] Erro
    > generating PK: ORA-00966: missing TABLE keyword
    >
    > at
    > org.objectstyle.cayenne.access.util.PrimaryKeyHelper.createPermIdsFo
    > ObjEntity(PrimaryKeyHelper.java:200)
    > at
    > org.objectstyle.cayenne.access.ContextCommit.createPrimaryKeys(Conte
    > tCommit.java:517)
    > at
    > org.objectstyle.cayenne.access.ContextCommit.commit(ContextCommit.ja
    > a:139)
    > at
    > org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext
    > java:732)
    > ... 3 more
    > Caused by: java.sql.SQLException: ORA-00966: missing TABLE keyword
    >
    > at
    > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    > at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    > at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    > at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    > at
    > oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:82 )
    > at
    > oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.j
    > va:1446)
    > at
    > oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.ja
    > a:1371)
    > at
    > oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatem
    > nt.java:1900)
    > at
    > oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:737)
    > at
    > org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.getPrimaryKey(MyS
    > LPkGenerator.java:150)
    > at
    > org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.pkFromDatabase(My
    > QLPkGenerator.java:93)
    > at
    > org.objectstyle.cayenne.dba.JdbcPkGenerator.generatePkForDbEntity(Jd
    > cPkGenerator.java:321)
    > at
    > org.objectstyle.cayenne.access.util.PrimaryKeyHelper.createPermIdsFo
    > ObjEntity(PrimaryKeyHelper.java:195)
    > ... 6 more
    >
    > C:\work\cayenne-1.0b3\doc\tutorials\cayenne-cmd-app>
    >
    > Senior Bioinformatics Analyst
    > Core Genotyping Facility
    > 10817 grovemont circle
    > Gaithersburg, MD 20877
    > Tel: 301-496-4060
    > Fax: 301-480-2235
    >
    > USPS Mail Address:
    > 8617 Grovemont Circle
    > Gaithersburg, MD 20892-4605
    >
    > Courier and visitor Address:
    > Advanced Technology Center, Room 152F
    > 8617 Grovemont Circle
    > Gaithersburg, MD 20877



    This archive was generated by hypermail 2.0.0 : Tue Jun 17 2003 - 09:17:36 EDT