Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-6863

Unable to go on safe mode when table USERPREFERENCES does not exist

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Major Major
    • 4.0 alpha
    • None
    • None
    • None

      Table/View 'USERPREFERENCES' does not exist.
      ERROR 42X05: Table/View 'USERPREFERENCES' does not exist.
      	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
      	at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown Source)
      	at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source)
      	at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
      	at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source)
      	at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source)
      	at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
      	at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown Source)
      	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
      	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
      	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
      	at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
      	at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
      	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
      	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
      	at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281)
      	at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313)
      	at org.ametys.plugins.core.impl.userpref.JdbcXmlUserPreferencesStorage.getUnTypedUserPrefs(JdbcXmlUserPreferencesStorage.java:106)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at org.ametys.runtime.plugin.component.PluginsComponentManager$ComponentInvocationHandler.invoke(PluginsComponentManager.java:177)
      	at com.sun.proxy.$Proxy33.getUnTypedUserPrefs(Unknown Source)
      	at org.ametys.core.userpref.UserPreferencesManager.getUnTypedUserPrefs(UserPreferencesManager.java:100)
      	at org.ametys.plugins.core.userpref.UserPreferencesValuesGenerator.generate(UserPreferencesValuesGenerator.java:81)
      

        1. Capture.PNG
          613 kB
          Laurence Aumeunier

          [CMS-6863] Unable to go on safe mode when table USERPREFERENCES does not exist

          USERPREFERENCES table in missing in the db:

          • If we do not enter safe mode at startup, the "Table/View 'USERPREFERENCES' does not exist" will be thrown
          • If we enter safe mode for another reason, we can enter the safe mode in the admin workspace

          It seems to be working as intented.

          Thibaut Rizzi (Inactive) added a comment - USERPREFERENCES table in missing in the db: If we do not enter safe mode at startup, the "Table/View 'USERPREFERENCES' does not exist" will be thrown If we enter safe mode for another reason, we can enter the safe mode in the admin workspace It seems to be working as intented.

          Note that org.ametys.plugins.core.userpref.JdbcXmlUserPreferencesStorage is not declared as safe

          <feature name="runtime.user.preferences.default" depends="runtime.datasource.core">
                  <!-- 
                      The main users'preferences manager implementation, that do store users'prefs into a sql db. 
                  -->
                  <components>
                      <component role="org.ametys.core.userpref.DefaultUserPreferencesStorage"
                                 id="org.ametys.plugins.core.userpref.JdbcXmlUserPreferencesStorage"
                                 class="org.ametys.plugins.core.impl.userpref.JdbcXmlUserPreferencesStorage">
                          <pool>runtime.datasource.core.jdbc.pool</pool>
                          <table>UserPreferences</table>
                      </component>
                  </components>
              </feature>
          

          Laurence Aumeunier added a comment - Note that org.ametys.plugins.core.userpref.JdbcXmlUserPreferencesStorage is not declared as safe <feature name= "runtime.user.preferences.default" depends= "runtime.datasource.core" > <!-- The main users 'preferences manager implementation, that do store users' prefs into a sql db. --> <components> <component role= "org.ametys.core.userpref.DefaultUserPreferencesStorage" id= "org.ametys.plugins.core.userpref.JdbcXmlUserPreferencesStorage" class= "org.ametys.plugins.core.impl.userpref.JdbcXmlUserPreferencesStorage" > <pool> runtime.datasource.core.jdbc.pool </pool> <table> UserPreferences </table> </component> </components> </feature>

            laurence Laurence Aumeunier
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: