Appian Primary DS is working. Getting the following error: java.lang.

Appian Primary DS is working. Getting the following error:

java.lang.IllegalStateException: [jdbc/primaryds] The schema is invalid.

Please let me know, what can be done to solve this error...

OriginalPostID-117700

OriginalPostID-117700

  Discussion posts and replies are publicly visible

  • 1. It's not down, it's busy to reply to the checkengine request within the 30 seconds limit. Leave it running for longer and see if it turns into an Okay
    2. In the meantime let me see the content (sort by name please) of server/process/design/gw1
  • It worked ! All my Engines are restored. Thanks a lot Edurado.

    But actually we still have some other issues. When we start JBOSS we getting an error named "The Schema is invalid"

    Please find the log snippet below:
    Caused by: com.appiancorp.common.config.FatalConfigurationException: An unexpected error occurred while trying to initialize and validate the primary data source.
              at com.appiancorp.rdbms.config.PrimaryDataSourceConfig.finish(PrimaryDataSourceConfig.java:31)
              at com.appiancorp.common.config.ConfigObject.init(ConfigObject.java:66)
              at com.appiancorp.common.config.ConfigObjectRepository.initConfigObject(ConfigObjectRepository.java:313)
              at com.appiancorp.common.config.ConfigObjectRepository.initConfigObject(ConfigObjectRepository.java:222)
              at com.appiancorp.common.config.ConfigObjectRepository.initConfigObject(ConfigObjectRepository.java:214)
              at com.appiancorp.common.config.ConfigObjectRepository.getConfigObjectImpl(ConfigObjectRepository.java:91)
              at com.appiancorp.common.config.ConfigObjectRepository.getConfigObject(ConfigObjectRepository.java:81)
              at com.appiancorp.common.config.AbstractConfiguration.getDecryptedString(AbstractConfiguration.java:294)
              ... 23 more
    Caused by: java.lang.IllegalStateException: [jdbc/primaryds] The schema is invalid.
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.ensureSchema(DataSourceManagerHbImpl.java:614)
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.getEntityManagerFactory(DataSourceManagerHbImpl.java:573)
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.getSessionFactory(DataSourceManagerHbImpl.java:565)
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.initialize(DataSourceManagerHbImpl.java:401)
              at com.appiancorp.rdbms.config.PrimaryDataSourceConfig.finish(PrimaryDataSourceConfig.java:22)
              ... 30 more
    Caused by: org.hibernate.HibernateException: Missing column: author in 27primarydslatest.tp_comment
              at org.hibernate.mapping.Table.validateColumns(Table.java:276)
              at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1316)
              at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:139)
              at com.appiancorp.rdbms.hb.SchemaManagerHbImpl.validateSchema(SchemaManagerHbImpl.java:50)
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.ensureSchema(DataSourceManagerHbImpl.java:611)
              ... 34 more
  • Is this a new environment? The log is showing that your primary data source is missing a column

    Caused by: org.hibernate.HibernateException: Missing column: author in 27primarydslatest.tp_comment

    you may want to double check this is pointing to the right primary data source and that nobody has deleted columns, it seems somebody messed up with your primary ds.
  • Hi Eduardo,
    The issue is resolved now.
    Thanks for your time and support.
  • We have a similar issue. Updating a previous database copy to version 7.6.

    Error log:
    Caused by: java.lang.IllegalStateException: [java:/jdbc/AppianPrimaryDS] The schema is invalid.
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.ensureSchema(DataSourceManagerHbImpl.java:626) [appian-rdbms.jar:]
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.getEntityManagerFactory(DataSourceManagerHbImpl.java:585) [appian-rdbms.jar:]
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.getSessionFactory(DataSourceManagerHbImpl.java:577) [appian-rdbms.jar:]
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.initialize(DataSourceManagerHbImpl.java:413) [appian-rdbms.jar:]
              at com.appiancorp.rdbms.config.PrimaryDataSourceConfig.finish(PrimaryDataSourceConfig.java:22) [appian-rdbms.jar:]
              ... 18 more
    Caused by: org.hibernate.HibernateException: Wrong column type in APPIAN2.dbo.sail_state_cache for column entry_value. Found: image, expected: varbinary(MAX)
              at org.hibernate.mapping.Table.validateColumns(Table.java:283) [hibernate-core-3.6.3.Final.jar:3.6.3.Final]
              at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1316) [hibernate-core-3.6.3.Final.jar:3.6.3.Final]
              at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:139) [hibernate-core-3.6.3.Final.jar:3.6.3.Final]
              at com.appiancorp.rdbms.hb.SchemaManagerHbImpl.validateSchema(SchemaManagerHbImpl.java:50) [appian-rdbms.jar:]
              at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.ensureSchema(DataSourceManagerHbImpl.java:623) [appian-rdbms.jar:]


    Any thoughts? We checked that table and such and is reflecting correctly as varbinary(MAX)
  • getting warning errors when running.:
    Failed to create the XA control connection. Error: "Could not find stored procedure 'master..xp_sqljdbc_xa_init_ex
  • It seems that somebody pointed a newer version of Appian to your primary data source which changed the schema making it incompatible with your current version. That's why you get: "APPIAN2.dbo.sail_state_cache for column entry_value. Found: image, expected: varbinary(MAX)" or maybe your environment is pointing to a different data source than the one where you're verifying the column is of the right type. I suggest you look at your appian-ds.xml to confirm where your environment is pointing to.

    The "Could not find stored procedure..." message is not related and can be fixed with the steps from forum.appian.com/.../e-95457 in the post that reads "You can safely disregard this message..." otherwise you can disable these warnings as I explain here: forum.appian.com/.../e-113194
  • Ok, we went through the migration document, appian and all engines started up fine with the start-suite.sh... then went into jboss and ran /bin/standalone.sh and log keeps telling me (SQLServerException: Failed to create the XA control connection. Error: "Could not find stored procedure 'master..xp_sqljdbc_xa_init_ex' any thoughts?
  • Is that the new log? I see the same error:

    Caused by: org.hibernate.HibernateException: Wrong column type in APPIAN2.dbo.sail_state_cache for column entry_value. Found: image, expected: varbinary(MAX)

    What's the output of this command in your primary DS?

    EXEC sp_columns sail_state_cache