org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in confgtt.cwd_app_dir_mapping

Atlassian JIRA | Kah Loun Foong [Atlassian] | 2 years ago
  1. 0

    According to this documentation: https://confluence.atlassian.com/display/STASH/Connecting+Stash+to+PostgreSQL bq.PostgreSQL has the idea of schemas. When you create a PostgreSQL database, a 'public' schema is created and set as the default for that database. It is possible to create a different schema (e.g. 'stash') and set that as the default schema. Stash will use whatever schema is set as the default for the logged-in user. Stash does not provide a way for a user to nominate the schema to use; it uses schema that is set as the PostgreSQL default. However, it will only work partially and Stash still trying to use other schema h3.Steps to reproduce # Run the following SQL queries: {code:sql} CREATE DATABASE atlassian WITH ENCODING='UTF8'; CREATE USER conf WITH PASSWORD 'conf'; CREATE SCHEMA AUTHORIZATION conf; {code} # Connect a Confluence server to the database "atlassian" with user "conf" It will use the schema "conf" # Run the following SQL queries: {code:sql} CREATE USER stash WITH PASSWORD 'stash'; CREATE SCHEMA AUTHORIZATION stash; {code} # Connect a Stash server to the database "atlassian" with user "stash" The migration function in Stash will failed with the following error: {noformat} 2015-02-13 16:47:12,415 ERROR [http-nio-7990-exec-4] kahloun.foong @1050IV3x1007x82x0 kyk9e1 0:0:0:0:0:0:0:1 "POST /admin/db/edit HTTP/1.1" c.a.s.i.db.DefaultDatabaseManager Failed to obtain session factory org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in confgtt.cwd_app_dir_mapping at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553) ~[AbstractAutowireCapableBeanFactory.class:4.0.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:991) ~[AbstractApplicationContext.class:4.0.6.RELEASE] at com.atlassian.stash.internal.db.DefaultDatabaseManager.createSessionFactory(DefaultDatabaseManager.java:340) [DefaultDatabaseManager.class:na] at com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:165) [DefaultDatabaseManager.class:na] ... Caused by: org.hibernate.HibernateException: Missing column: is_allow_all in conf.cwd_app_dir_mapping {noformat} Checking the table in the schema "stash", the tables are created correctly. However, Stash is trying to access schema "conf" and the AO tables are missing too.

    Atlassian JIRA | 2 years ago | Kah Loun Foong [Atlassian]
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in confgtt.cwd_app_dir_mapping
  2. 0

    According to this documentation: https://confluence.atlassian.com/display/STASH/Connecting+Stash+to+PostgreSQL bq.PostgreSQL has the idea of schemas. When you create a PostgreSQL database, a 'public' schema is created and set as the default for that database. It is possible to create a different schema (e.g. 'stash') and set that as the default schema. Stash will use whatever schema is set as the default for the logged-in user. Stash does not provide a way for a user to nominate the schema to use; it uses schema that is set as the PostgreSQL default. However, it will only work partially and Stash still trying to use other schema h3.Steps to reproduce # Run the following SQL queries: {code:sql} CREATE DATABASE atlassian WITH ENCODING='UTF8'; CREATE USER conf WITH PASSWORD 'conf'; CREATE SCHEMA AUTHORIZATION conf; {code} # Connect a Confluence server to the database "atlassian" with user "conf" It will use the schema "conf" # Run the following SQL queries: {code:sql} CREATE USER stash WITH PASSWORD 'stash'; CREATE SCHEMA AUTHORIZATION stash; {code} # Connect a Stash server to the database "atlassian" with user "stash" The migration function in Stash will failed with the following error: {noformat} 2015-02-13 16:47:12,415 ERROR [http-nio-7990-exec-4] kahloun.foong @1050IV3x1007x82x0 kyk9e1 0:0:0:0:0:0:0:1 "POST /admin/db/edit HTTP/1.1" c.a.s.i.db.DefaultDatabaseManager Failed to obtain session factory org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in confgtt.cwd_app_dir_mapping at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553) ~[AbstractAutowireCapableBeanFactory.class:4.0.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:991) ~[AbstractApplicationContext.class:4.0.6.RELEASE] at com.atlassian.stash.internal.db.DefaultDatabaseManager.createSessionFactory(DefaultDatabaseManager.java:340) [DefaultDatabaseManager.class:na] at com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:165) [DefaultDatabaseManager.class:na] ... Caused by: org.hibernate.HibernateException: Missing column: is_allow_all in conf.cwd_app_dir_mapping {noformat} Checking the table in the schema "stash", the tables are created correctly. However, Stash is trying to access schema "conf" and the AO tables are missing too.

    Atlassian JIRA | 2 years ago | Kah Loun Foong [Atlassian]
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in confgtt.cwd_app_dir_mapping
  3. 0

    h3.Steps to reproduce: h4.SQL Server # Create a database 'atlassian' # Create a schema name 'stash' in the database # Create a user 'stash' with the default schema 'stash' # Connect Stash server with SQL server database 'atlassian' All the tables are created in the default schema 'dbo' except for AO tables created in schema 'stash' h4.Oracle # Create a database user 'stash' # Grant all the permission to the user 'stash' on the schema 'stash' # Grant another access permission to the user 'stash' on the schema 'crowd' (schema 'crowd' has been used by Crowd application) # Migrate Stash database from HSQLDB to Oracle through the UI It will fail with the following error: {noformat} 2014-02-07 12:09:03,235 ERROR [http-bio-7990-exec-7] 728x27x0 jv58e6 10.123.16.180 "POST /setup HTTP/1.1" c.a.s.i.db.DefaultDatabaseManager Failed to obtain session factory org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in CROWD.CWD_APP_DIR_MAPPING at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1129) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE] at com.atlassian.stash.internal.db.DefaultDatabaseManager.createSessionFactory(DefaultDatabaseManager.java:337) [stash-service-impl-2.10.1.jar:na] at com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:158) [stash-service-impl-2.10.1.jar:na] {noformat} it seems that Stash somehow try to use the schema 'crowd' cause the database user 'stash' have access permission to it.

    Atlassian JIRA | 4 years ago | Kah Loun Foong [Atlassian]
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in CROWD.CWD_APP_DIR_MAPPING
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3.Steps to reproduce: h4.SQL Server # Create a database 'atlassian' # Create a schema name 'stash' in the database # Create a user 'stash' with the default schema 'stash' # Connect Stash server with SQL server database 'atlassian' All the tables are created in the default schema 'dbo' except for AO tables created in schema 'stash' h4.Oracle # Create a database user 'stash' # Grant all the permission to the user 'stash' on the schema 'stash' # Grant another access permission to the user 'stash' on the schema 'crowd' (schema 'crowd' has been used by Crowd application) # Migrate Stash database from HSQLDB to Oracle through the UI It will fail with the following error: {noformat} 2014-02-07 12:09:03,235 ERROR [http-bio-7990-exec-7] 728x27x0 jv58e6 10.123.16.180 "POST /setup HTTP/1.1" c.a.s.i.db.DefaultDatabaseManager Failed to obtain session factory org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in CROWD.CWD_APP_DIR_MAPPING at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1129) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE] at com.atlassian.stash.internal.db.DefaultDatabaseManager.createSessionFactory(DefaultDatabaseManager.java:337) [stash-service-impl-2.10.1.jar:na] at com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:158) [stash-service-impl-2.10.1.jar:na] {noformat} it seems that Stash somehow try to use the schema 'crowd' cause the database user 'stash' have access permission to it.

    Atlassian JIRA | 4 years ago | Kah Loun Foong [Atlassian]
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in CROWD.CWD_APP_DIR_MAPPING
  6. 0

    GitHub comment 43#61047683

    GitHub | 2 years ago | shivarajan
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean#0': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.validator.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;

  1. tvrmsmith 1 times, last 3 months ago
  2. linxiaolong 3 times, last 4 months ago
  3. Bugger 1 times, last 7 months ago
13 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.beans.factory.BeanCreationException

    Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in confgtt.cwd_app_dir_mapping

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean()
  2. Spring Beans
    AbstractAutowireCapableBeanFactory.initializeBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)[AbstractAutowireCapableBeanFactory.class:4.0.6.RELEASE]
    1 frame
  3. Spring Context
    AbstractApplicationContext.getBean
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:991)[AbstractApplicationContext.class:4.0.6.RELEASE]
    1 frame
  4. com.atlassian.stash
    DefaultDatabaseManager.prepareDatabase
    1. com.atlassian.stash.internal.db.DefaultDatabaseManager.createSessionFactory(DefaultDatabaseManager.java:340)[DefaultDatabaseManager.class:na]
    2. com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:165)[DefaultDatabaseManager.class:na]
    2 frames