That makes sense! How long do you think it would take to get a new version of the Grails plug in after this new version of the Liquibase library is built?
Thanks a lot for your time and quick responses on this!! LiquiBase Community Forum wrote: > > The try/catch would have to be something added into the liquibase code > and have the library rebuilt. Where exactly is hidden from the > stacktrace, I guess, but it will not be difficult to add in. It will > probably be a week or so until a new production build can be > available, though. > > Nathan > > On Wed, Sep 2, 2009 at 3:21 PM, Maricel Quesada<[email protected]> > wrote: >> >> Thanks for the quick reply! >> >> Yeah, I am using preconditions, just to make sure some tables don't >> exist. >> >> I am not sure I understand how to add the try/catch to that select since >> that is being done behind the scenes, could you explain please? >> >> Here it is the stack trace for the exception: >> >> Sep 2, 2009 10:34:20 AM org.apache.catalina.core.StandardContext >> listenerStop >> SEVERE: Exception sending context destroyed event to listener instance of >> class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener >> org.springframework.beans.factory.access.BootstrapException: Error >> executing >> bootstraps; nested exception is >> org.codehaus.groovy.runtime.InvokerInvocationException: >> liquibase.exception.MigrationFailedException: Migration failed for change >> set releases/20091015-changeLogSchema.xml::1::mquesada: >> Reason: >> org.postgresql.util.PSQLException: ERROR: permission denied for >> relation lock_details >> >> at >> org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:74) >> at >> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) >> at >> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) >> at >> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) >> at >> org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) >> at >> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) >> at >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) >> at >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) >> at >> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850) >> at >> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724) >> at >> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493) >> at >> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) >> at >> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) >> at >> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) >> at >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) >> at >> org.apache.catalina.core.StandardHost.start(StandardHost.java:722) >> at >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) >> at >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) >> at >> org.apache.catalina.core.StandardService.start(StandardService.java:516) >> at >> org.apache.catalina.core.StandardServer.start(StandardServer.java:710) >> at org.apache.catalina.startup.Catalina.start(Catalina.java:583) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) >> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) >> Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: >> liquibase.exception.MigrationFailedException: Migration failed for change >> set releases/20091015-changeLogSchema.xml::1::mquesada: >> Reason: >> org.postgresql.util.PSQLException: ERROR: permission denied for >> relation lock_details >> >> at >> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) >> at >> org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) >> at >> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) >> at >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) >> at >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) >> at >> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850) >> at >> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724) >> at >> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493) >> at >> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) >> at >> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) >> at >> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) >> at >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) >> at >> org.apache.catalina.core.StandardHost.start(StandardHost.java:722) >> at >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) >> at >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) >> at >> org.apache.catalina.core.StandardService.start(StandardService.java:516) >> at >> org.apache.catalina.core.StandardServer.start(StandardServer.java:710) >> at org.apache.catalina.startup.Catalina.start(Catalina.java:583) >> ... 2 more >> Caused by: liquibase.exception.MigrationFailedException: Migration failed >> for change set releases/20091015-changeLogSchema.xml::1::mquesada: >> Reason: >> org.postgresql.util.PSQLException: ERROR: permission denied for >> relation lock_details >> >> at liquibase.ChangeSet.execute(ChangeSet.java:182) >> at >> liquibase.parser.visitor.UpdateVisitor.visit(UpdateVisitor.java:26) >> at >> liquibase.parser.ChangeLogIterator.run(ChangeLogIterator.java:41) >> at liquibase.Liquibase.update(Liquibase.java:112) >> at >> com.bc.commerce.community.dal.persistence.util.DatabaseUtil.executeLiquibaseMigration(DatabaseUtil.groovy:56) >> at >> com.bc.commerce.community.dal.persistence.util.DatabaseUtil$executeLiquibaseMigration.call(Unknown >> Source) >> at BootStrap$_closure1.doCall(BootStrap.groovy:21) >> ... 20 more >> >> This exception is being thrown when trying the execute the migration from >> the Bootstrap.groovy file when deploying the WAR. However if I do grails >> migrate to that same DB, I got the same base exception. >> >> Thanks again!! >> >> >> LiquiBase Community Forum wrote: >>> >>> It usually needs to do that as part of building a database snapshot. >>> In the 1.9 releases, I think the only time it does that is if you are >>> using precondions like tableExists or columnExists. The current >>> codebase also uses it (though not a full database snapshot anymore) to >>> check the state/existance of the databasechangelog table, but I don't >>> think we did that in 1.9. If you aren't using preconditions, that is >>> probably why it is doing it. The call itself is made because that is >>> the only way we can determine if a column is autoincrement based on >>> the jdbc metadata. >>> >>> Unfortunately, I think the only way around the problem for now is to >>> add a try/catch around the select id cal and assume it is not >>> autoincrement if you don't have access to it. >>> >>> Do you have a stacktrace you could send? >>> >>> Nathan >>> >>> On Wed, Sep 2, 2009 at 12:13 PM, Maricel >>> Quesada<[email protected]> wrote: >>>> >>>> Hi All, >>>> >>>> I am using Liquibase plug in for Grails and when I try to execute the >>>> migration on an existing Postgresql database I am getting the following >>>> exception: >>>> >>>> org.postgresql.util.PSQLException: ERROR: permission denied for >>>> relation >>>> lock_details >>>> >>>> I am adding new tables, constraints, foreign keys, etc., but I am not >>>> messing around with existing tables and for what I am seeing in the >>>> Postgres >>>> log files, it seems that Liquibase goes through all the tables doing >>>> selects >>>> like this: >>>> >>>> SELECT id FROM public.comments WHERE 1 = 0 >>>> >>>> but when it gets to lock_details, it breaks because this is a view that >>>> belongs to the postgres user, which is not the one I am using, and my >>>> user >>>> does not have access to this view. >>>> >>>> My biggest question here is why Liquibase needs to do this and how can >>>> I >>>> prevent it from crashing when doing this kind of selects on table/views >>>> that >>>> my user doesn't have access to? >>>> >>>> Any help is very much appreciated!! >>>> >>>> Thanks!! >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Liquibase-migration-failing-due-to-permission-denied-for-relation-I-am-not-even-using-tp25261723p25261723.html >>>> Sent from the LiquiBase - User mailing list archive at Nabble.com. >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >>>> 30-Day >>>> trial. Simplify your report design, integration and deployment - and >>>> focus on >>>> what you do best, core application coding. Discover what's new with >>>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>>> _______________________________________________ >>>> Liquibase-user mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/liquibase-user >>>> >>> >>> ------------------------------------------------------------------------------ >>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >>> 30-Day >>> trial. Simplify your report design, integration and deployment - and >>> focus >>> on >>> what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> _______________________________________________ >>> Liquibase-user mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/liquibase-user >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Liquibase-migration-failing-due-to-permission-denied-for-relation-I-am-not-even-using-tp25261723p25265032.html >> Sent from the LiquiBase - User mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and >> focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Liquibase-user mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/liquibase-user >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Liquibase-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/liquibase-user > > -- View this message in context: http://www.nabble.com/Liquibase-migration-failing-due-to-permission-denied-for-relation-I-am-not-even-using-tp25261723p25266783.html Sent from the LiquiBase - User mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Liquibase-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/liquibase-user
