Scott Ferguson wrote:
> 
> 
> Can you enable the <spy/> logging on the <database> element and set  
> the logging level to "fine"?  That will show the SQL statements in the  
> logs,
> 
> <database jndi-name="mysql/foo">
>    <driver .../>
>    </spy>
> </database>
> 
> <logger name="com.caucho.sql" level="fine"/>
> 
> -- Scott
> 
> 

Here is the output.  Is it because the table exists and only this one field
is off?  Does resin know how to modify existing tables?  

....
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.8:executeQuery(select 1 from option o where 1=0)
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.8:close()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0:clearWarnings()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0.9:createStatement()
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.9:executeQuery(select 1 from option o where 1=0)
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.9:close()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0:clearWarnings()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0.10:createStatement()
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.10:executeQuery(select id from option where 1=0)
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.10:close()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0:clearWarnings()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0.11:createStatement()
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.11:executeQuery(select followUpQuestionId from option where
1=0)
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.11:close()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0:clearWarnings()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0.12:createStatement()
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.12:executeQuery(select freeForm from option where 1=0)
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.12:close()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0:clearWarnings()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0.13:createStatement()
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.13:executeQuery(select optionType from option where 1=0)
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.13:close()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0:clearWarnings()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0.14:createStatement()
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.14:executeQuery(select parent_question_id from option where
1=0)
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.14:close()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0:clearWarnings()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0.15:createStatement()
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.15:executeQuery(select valueAsString from option where 1=0)
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.15:exn-executeQuery(select valueAsString from option where
1=0) -> org.postgresql.util.PSQLException: ERROR: column "valueasstring"
does not exist
[15:58:16.640] FINE com.caucho.sql.spy.SpyStatement
jdbc/postgres.0.15:close()
[15:58:16.640] FINE com.caucho.sql.spy.SpyConnection
jdbc/postgres.0:clearWarnings()
[15:58:16.640] INFO com.caucho.server.webapp.WebApp
WebApp[http://localhost:8080/directedquestion-1.0-SNAPSHOT] error
[15:58:16.640] WARNING com.caucho.server.webapp.WebApp 'valueAsString' is
not a valid database column in table 'option'.  Either the table needs to be
created or the create-database-tables attribute must be set.
[15:58:16.640]
[15:58:16.640]  select valueAsString from option where 1=0
[15:58:16.640]
[15:58:16.640]org.postgresql.util.PSQLException: ERROR: column
"valueasstring" does not exist
...
-- 
View this message in context: 
http://www.nabble.com/where-do-I-set-the-create-database-tables-attribute--tp15350158p15366686.html
Sent from the Resin mailing list archive at Nabble.com.



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to