Re: [Resin-interest] where do I set the create-database-tables attribute?
On Feb 8, 2008, at 4:07 PM, Daniel Spangler wrote: > > > > Scott Ferguson wrote: >> >> > > 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? Ah. No, Resin doesn't know how to alter a table (it would probably be a dangerous capability, too.) So if the table exists, Resin will only validate the columns, not do any updates. -- Scott > > > > [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 ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] where do I set the create-database-tables attribute?
Scott Ferguson wrote: > > > Can you enable the logging on the element and set > the logging level to "fine"? That will show the SQL statements in the > logs, > > > > > > > > > -- 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
Re: [Resin-interest] where do I set the create-database-tables attribute?
On Feb 7, 2008, at 10:26 PM, Daniel Spangler wrote: > I'm getting the error message below, but I can't quite figure out > where to set the create-database-tables attribute. I have set the > create-database-schema attribute in the ejb-server element, but that > doesn't seem to help. I have also tried to set the create-database- > tables attribute on ejb-server but that violates the schema. Anyone > have any suggestions? > > [22:23:59.531] {resin-100} 'valueAsString' is not a valid database > column in tab > le 'option'. Either the table needs to be created or the create- > database-tables > attribute must be set. Can you enable the logging on the element and set the logging level to "fine"? That will show the SQL statements in the logs, -- Scott > > > > ___ > resin-interest mailing list > resin-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest