Announcement Announcement Module
Collapse
No announcement yet.
Spring-security-acl plugin : table not found in production mode. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      Spring-security-acl plugin : table not found in production mode.

      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

      Comment


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

        Comment


        • #5
          Table not found in production mode ...

          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 ...

          Comment


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

            Comment


            • #7
              Table not found in production mode

              Yes, I use the exact same configuration and database in dev and prod mode.

              Comment


              • #8
                Ah, sorry, didn't fully read your previous reply. Are you able to package up a sample application that reproduces the problem so one of us can take a look? Also, which version of Grails are you using? Have you tried with different databases, perhaps HSQLDB, & PostgreSQL?

                Comment

                Working...
                X