Results 1 to 8 of 8

Thread: Spring-security-acl plugin : table not found in production mode.

Hybrid View

  1. #1

    Default Spring-security-acl plugin : table not found in production mode.

    Hi, I have an app that uses the spring-security-acl plugin and works fine in dev mode.

    However, in production mode, just after seeing "Configuring Spring Security ACL ..." I get a stack trace that starts like this :

    Running Grails application..

    Configuring Spring Security ...
    Configuring Spring Security ACL ...
    util.JDBCExceptionReporter Table not found in statement [select this_.id as id3_0_, this_.version as version3_0_, this_.authority as authority3_0_ from role this_ where this_.authority=?]
    context.ContextLoader Context initialization failed
    org.springframework.beans.factory.access.Bootstrap Exception: Error executing bootstraps; nested exception is org.springframework.dao.InvalidDataAccessResourceU sageException: could not execute query; SQL [select this_.id as id3_0_, this_.version as version3_0_, this_.authority as authority3_0_ from role this_ where this_.authority=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
    at org.codehaus.groovy.grails.web.context.GrailsConte xtLoader.createWebApplicationContext(GrailsContext Loader.java:87)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3961)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4456)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:722)

    Does someone have a clue as to what can cause this? It appears to occur?

    Thanks in advance for any pointer.

    Francis

  2. #2
    Join Date
    Jul 2007
    Posts
    121

    Default

    It's complaining that the 'role' table doesn't exist, which is really more of a core plugin thing than an ACL thing. What is your setting for dbCreate in DataSource.groovy? If it's not create, create-drop, or update, then you need to manually create missing tables.

  3. #3

    Default Spring-security-acl plugin : table not found in production mode.

    Quote Originally Posted by burtbeckwith View Post
    It's complaining that the 'role' table doesn't exist, which is really more of a core plugin thing than an ACL thing. What is your setting for dbCreate in DataSource.groovy? If it's not create, create-drop, or update, then you need to manually create missing tables.
    Thank you for your reply. Actually, my dbCreate setting is 'update' and the tables are there. It works fine in dev mode but the problem occurs in production mode.

    I'm not sure I understand why there's a difference in behaviour regarding the db when switching modes.

    Do you have an idea of what might be the problem?

    Best regards,

    Francis

  4. #4
    Join Date
    Jul 2007
    Posts
    121

    Default

    My guess is you're not connecting to the database you think you are, or you don't have permission to see that table.

  5. #5

    Default Table not found in production mode ...

    Quote Originally Posted by burtbeckwith View Post
    My guess is you're not connecting to the database you think you are, or you don't have permission to see that table.
    Just to make sure, I copied the dev datasource config onto the production one.
    Same behaviour. So the exact same DB and credentials are used in both environments.

    Since my first message I installed the searchable plugin. The error is slightly different in now the missing tables are the ones related to my domain classes.

    Could the problem be related to some optimizations that are done in prod mode or to the order of some operations that are done when creating/updating the db?

    It is very strange ...

  6. #6
    Join Date
    Jun 2010
    Location
    London
    Posts
    304

    Default

    Are you using the same database type in development and production?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •