Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Error: org.springframework.web.context.ContextLoader- Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from the input stream

Reason: Plugin  The plugin folder has multiple version versions of the same plugin. E.g. 

...

  1. Delete the older versions of the plugin jars. I.e. keep only one file per JAR.
  2. Restart the Tomcat server.

Error: "Invocation of init method failed; nested exception is liquibase.exception.DatabaseException:" com.mysql.MysqlDataTruncation:  Data : Data too long for column 'AUTHOR' at row.

Reason: Due to failure of changeset "<changeSet id="vgaikwad" author="Add import rights to all roles having create, update and delete rights on resource" dbms="mysql">"

Solution:

  • Stop OpenSpecimen service (Tomcat)
  • Login to Database.

    • Code Block
      languagesql
      titleRun this query
      alter table databasechangelog change author author varchar(255);


  • Start OpenSpecimen service (Tomcat)


Error: Caused by: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO OS_SC_SPMN_REQUESTS(REQUESTOR, REQUESTOR_EMAIL, REQUESTOR_INSTITUTE, REASON, SHIPPING_ADDR, COMMENTS, IDENTIFIER) VALUES(?, ?, ?, ?, ?, ?, ?)]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'os_20.os_sc_spmn_requests' doesn't exist

Reason: The database table expected by the specimen request form is missing.

Solution:

  • Login to the database.
  • Run the query:


    Code Block
    languagesql
    titleAdding the missing table:
    CREATE TABLE OS_SC_SPMN_REQUESTS (REQUESTOR VARCHAR(255), REQUESTOR_EMAIL VARCHAR(255), REQUESTOR_INSTITUTE VARCHAR(255), REASON TEXT, SHIPPING_ADDR TEXT, COMMENTS TEXT, IDENTIFIER BIGINT NOT NULL);


...

Reason: OpenSpecimen is trying to add an Index on a column that already exists.

Solution:

  • Stop OpenSpecimen service (Tomcat)
  • Login Log in to the database.
  • Find the name of the index on the column.
  • Run the queries:

    • Code Block
      languagesql
      drop index <INDEX_NAME>;


  • Start OpenSpecimen service (Tomcat)


Error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'os-liquibase' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set db/4.0/schema.xml::Move existing CP consent tier statement text to coded consent statement table::mdnasim: Reason: liquibase.exception.DatabaseException: java.sql.SQLException: ORA-12899: value too large for column.

Reason: Consent statement value is too large for the STATEMENT column; table OS_CONSENT_STATEMENTS.

Solution:

  • Stop OpenSpecimen service (Tomcat)
  • Login Log in to the database.
  • Run the queries:

    • Code Block
      languagesql
      alter table OS_CONSENT_STATEMENTS modify STATEMENT VARCHAR2(4000);
      


  • Start OpenSpecimen service (Tomcat)