Re: commit error with cayenne 1.1.4 ,tomcat 5 and mysql 5

From: Alan Baltazar (acatalan..ahoo.com)
Date: Tue Apr 04 2006 - 11:52:32 EDT

  • Next message: Andrus Adamchik: "Re: commit error with cayenne 1.1.4 ,tomcat 5 and mysql 5"

    Hello Andrus,
      

    --- Andrus Adamchik <andru..bjectstyle.org> wrote:

    > Hi Alan,
    >

      Yes, I can access my DB from Cayenne Modeler (as mentioned below).

    > Can you access your DB from Cayenne Modeler? For instance you can go
    > to "Tools -> Reengineer Database Schema" and see if that works. Use
    > the same URL and userid/password you are using to connect from the
    > application tutorial.
    >

      Attached is the tomcat log stack trace (also the sql script slightly modified from the
      tutorial). I'm running this tutorial on winXP and mysql,tomcat with default install
    (except for app install dir location). thanks for any help.

    > Also - can you find the full stack trace in the tomcat logs? The one
    > you posted does not show the real cause of the error.
    >
    > Andrus
    >
    >
    > On Apr 3, 2006, at 10:58 PM, Alan Baltazar wrote:
    > > hello,
    > >
    > > I'm running the 'cayenne-1.1.4\src\tutorials\cayenne-web-app'
    > > sample. everything works
    > > well until I run the 'add artist,painting,gallery' pages. the
    > > problem is this, when I
    > > enter to save new data (for an insert), i get this exception:
    > > HTTP Status 500 -
    > >
    > > ----------------------------------------------------------------------
    > > ----------
    > >
    > > type Exception report
    > >
    > > message
    > >
    > > description The server encountered an internal error () that
    > > prevented it from fulfilling
    > > this request.
    > >
    > > exception
    > >
    > > javax.servlet.ServletException: [v.1.1.4 January 5 2006] Commit
    > > Exception
    > > org.apache.struts.action.RequestProcessor.processException
    > > (RequestProcessor.java:535)
    > >
    > > org.apache.struts.action.RequestProcessor.processActionPerform
    > > (RequestProcessor.java:433)
    > > org.apache.struts.action.RequestProcessor.process
    > > (RequestProcessor.java:236)
    > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:
    > > 1196)
    > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    > > javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    > >
    > >
    > > root cause
    > >
    > > org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1.4 January 5
    > > 2006] Commit
    > > Exception
    > > org.objectstyle.cayenne.access.DataContext.commitChanges
    > > (DataContext.java:1275)
    > > org.objectstyle.cayenne.access.DataContext.commitChanges
    > > (DataContext.java:1236)
    > > action.SaveGalleryAction.execute(SaveGalleryAction.java:34)
    > >
    > > org.apache.struts.action.RequestProcessor.processActionPerform
    > > (RequestProcessor.java:431)
    > > org.apache.struts.action.RequestProcessor.process
    > > (RequestProcessor.java:236)
    > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:
    > > 1196)
    > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    > > javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    > >
    > >
    > > note The full stack trace of the root cause is available in the
    > > Apache Tomcat/5.0.28
    > > logs.
    > >
    > >
    > > ----------------------------------------------------------------------
    > > ----------
    > >
    > > Apache Tomcat/5.0.28
    > >
    > > ps: i can entered all complete rights for the user in mysql and was
    > > able to physically
    > > insert directly to the mysql database. i'm only having problems
    > > inserting from thia app.
    > >
    > > thanks,
    > > alan
    >
    >

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    2006-04-04 08:36:36 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2006-04-04 08:36:41 StandardContext[/struts-mailreader]action: []: Verifying ModuleConfig for this module
    2006-04-04 08:36:41 StandardContext[/struts-mailreader]action: []: Verification of ModuleConfig has been completed
    2006-04-04 08:36:42 StandardContext[/jsp-examples]ContextListener: contextInitialized()
    2006-04-04 08:36:42 StandardContext[/jsp-examples]SessionListener: contextInitialized()
    2006-04-04 08:36:42 StandardContext[/servlets-examples]ContextListener: contextInitialized()
    2006-04-04 08:36:42 StandardContext[/servlets-examples]SessionListener: contextInitialized()
    2006-04-04 08:39:33 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
    org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1.4 January 5 2006] Commit Exception
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1275)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1236)
            at action.SaveGalleryAction.execute(SaveGalleryAction.java:34)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.sql.SQLException: Table 'art.auto_pk_support' doesn't exist
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
            at com.mysql.jdbc.Statement.execute(Statement.java:529)
            at org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.getPrimaryKey(MySQLPkGenerator.java:161)
            at org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.pkFromDatabase(MySQLPkGenerator.java:93)
            at org.objectstyle.cayenne.dba.JdbcPkGenerator.generatePkForDbEntity(JdbcPkGenerator.java:325)
            at org.objectstyle.cayenne.access.util.PrimaryKeyHelper.createPermIdsForObjEntity(PrimaryKeyHelper.java:183)
            at org.objectstyle.cayenne.access.ContextCommit.createPrimaryKeys(ContextCommit.java:580)
            at org.objectstyle.cayenne.access.ContextCommit.commit(ContextCommit.java:142)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1266)
            ... 32 more

    2006-04-04 08:39:55 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
    org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1.4 January 5 2006] Commit Exception
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1275)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1236)
            at action.SavePaintingAction.execute(SavePaintingAction.java:53)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.sql.SQLException: Table 'art.auto_pk_support' doesn't exist
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
            at com.mysql.jdbc.Statement.execute(Statement.java:529)
            at org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.getPrimaryKey(MySQLPkGenerator.java:161)
            at org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.pkFromDatabase(MySQLPkGenerator.java:93)
            at org.objectstyle.cayenne.dba.JdbcPkGenerator.generatePkForDbEntity(JdbcPkGenerator.java:325)
            at org.objectstyle.cayenne.access.util.PrimaryKeyHelper.createPermIdsForObjEntity(PrimaryKeyHelper.java:183)
            at org.objectstyle.cayenne.access.ContextCommit.createPrimaryKeys(ContextCommit.java:580)
            at org.objectstyle.cayenne.access.ContextCommit.commit(ContextCommit.java:142)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1266)
            ... 32 more

    2006-04-04 08:40:21 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
    org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1.4 January 5 2006] Commit Exception
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1275)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1236)
            at action.SaveArtistAction.execute(SaveArtistAction.java:47)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.sql.SQLException: Table 'art.auto_pk_support' doesn't exist
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
            at com.mysql.jdbc.Statement.execute(Statement.java:529)
            at org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.getPrimaryKey(MySQLPkGenerator.java:161)
            at org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.pkFromDatabase(MySQLPkGenerator.java:93)
            at org.objectstyle.cayenne.dba.JdbcPkGenerator.generatePkForDbEntity(JdbcPkGenerator.java:325)
            at org.objectstyle.cayenne.access.util.PrimaryKeyHelper.createPermIdsForObjEntity(PrimaryKeyHelper.java:183)
            at org.objectstyle.cayenne.access.ContextCommit.createPrimaryKeys(ContextCommit.java:580)
            at org.objectstyle.cayenne.access.ContextCommit.commit(ContextCommit.java:142)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1266)
            ... 32 more

    2006-04-04 08:40:30 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
            at java.util.ArrayList.RangeCheck(Unknown Source)
            at java.util.ArrayList.get(Unknown Source)
            at action.AddPaintingToGalleryAction.execute(AddPaintingToGalleryAction.java:40)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
            at java.lang.Thread.run(Unknown Source)

    2006-04-04 08:40:39 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
    org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1.4 January 5 2006] Commit Exception
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1275)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1236)
            at action.RemovePaintingFromGalleryAction.execute(RemovePaintingFromGalleryAction.java:53)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.sql.SQLException: Table 'art.auto_pk_support' doesn't exist
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
            at com.mysql.jdbc.Statement.execute(Statement.java:529)
            at org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.getPrimaryKey(MySQLPkGenerator.java:161)
            at org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.pkFromDatabase(MySQLPkGenerator.java:93)
            at org.objectstyle.cayenne.dba.JdbcPkGenerator.generatePkForDbEntity(JdbcPkGenerator.java:325)
            at org.objectstyle.cayenne.access.util.PrimaryKeyHelper.createPermIdsForObjEntity(PrimaryKeyHelper.java:183)
            at org.objectstyle.cayenne.access.ContextCommit.createPrimaryKeys(ContextCommit.java:580)
            at org.objectstyle.cayenne.access.ContextCommit.commit(ContextCommit.java:142)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1266)
            ... 32 more


    #
    # for learning cayenne
    #

    DROP DATABASE IF EXISTS ART;
    CREATE DATABASE ART;
    USE ART;

    CREATE TABLE ARTIST (
            DATE_OF_BIRTH DATE NULL,
            ARTIST_ID INT NOT NULL,
            ARTIST_NAME CHAR(255) NOT NULL,
            PRIMARY KEY (ARTIST_ID)
    );

    CREATE TABLE GALLERY (
            GALLERY_ID INT NOT NULL,
            GALLERY_NAME VARCHAR(100) NOT NULL,
            PRIMARY KEY (GALLERY_ID)
    );

    CREATE TABLE PAINTING (
            PAINTING_TITLE VARCHAR(255) NOT NULL,
            GALLERY_ID INT NULL,
            ESTIMATED_PRICE DECIMAL NULL,
            PAINTING_ID INT NOT NULL,
            ARTIST_ID INT NULL,
            PRIMARY KEY (PAINTING_ID)
    );

    INSERT INTO GALLERY (GALLERY_ID, GALLERY_NAME)
    VALUES (1, 'The Metropolitan Museum of Art');

    INSERT INTO GALLERY (GALLERY_ID, GALLERY_NAME)
    VALUES (2, 'Louvre');

    INSERT INTO GALLERY (GALLERY_ID, GALLERY_NAME)
    VALUES (3, 'The State Hermitage Museum');

    INSERT INTO ARTIST (DATE_OF_BIRTH, ARTIST_ID, ARTIST_NAME)
    VALUES ('1970-06-05', 1, 'Andrus Adamchik');

    INSERT INTO ARTIST (DATE_OF_BIRTH, ARTIST_ID, ARTIST_NAME)
    VALUES ('1969-07-08', 2, 'Matt Kerr');

    INSERT INTO ARTIST (DATE_OF_BIRTH, ARTIST_ID, ARTIST_NAME)
    VALUES ('1972-07-23', 3, 'Eric Schneider');

    INSERT INTO ARTIST (DATE_OF_BIRTH, ARTIST_ID, ARTIST_NAME)
    VALUES ('1967-04-25', 4, 'Kyle Dawkins');

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (1, 1, 1, 'Andrus Painting One', 2500);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (2, 1, 2, 'Andrus Painting Two', 3000);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (3, 1, 3, 'Andrus Painting Three', 3500);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (4, 2, 1, 'Matt Painting One', 2000);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (5, 2, 2, 'Matt Painting Two', 2300);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (6, 2, NULL, 'Matt Painting Three', 3200);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (7, 3, 1, 'Eric Painting One', 2600);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (8, 3, NULL, 'Eric Painting Two', 2300);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (9, 3, 3, 'Eric Painting Three', 3100);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (10, 4, NULL, 'Kyle Painting One', 2200);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (11, 4, 2, 'Kyle Painting Two', 2800);

    INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, GALLERY_ID, PAINTING_TITLE, ESTIMATED_PRICE)
    VALUES (12, 4, 3, 'Kyle Painting Three', 1600);



    This archive was generated by hypermail 2.0.0 : Tue Apr 04 2006 - 11:52:59 EDT