Thanks for your response.
I was able to get past the above error by commenting out the Drop institution_id and drop foreign key constraint on institution_id
Have moved on to the next error. Looks like there will be many more to come.
Thanks for your response.
I was able to get past the above error by commenting out the Drop institution_id and drop foreign key constraint on institution_id
Have moved on to the next error. Looks like there will be many more to come.
This breaks the DB upgrade … since the Column is then there and it shouldnt be … so just drop the
<preConditions onFail="MARK_RAN">
<foreignKeyConstraintExists foreignKeyName="FKB025CFC71792AD22"/>
</preConditions>
Getting below error now when starting the open specimen
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.boot.MappingException: Association [com.krishagni.catissueplus.core.de.domain.Form.associations] references an unmapped entity [com.krishagni.catissueplus.core.de.domain.Form.associations] : origin(null)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1619) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
This error is unfamiliar to me …
Did you “fix” other errors by commenting stuff … the source i build from looks the same as
As you can see the only thing “unmapped” Would be ID … and this is covered by the BaseEntity it inherits from.
I urge you to start from scratch and just fix the DB update error by removing the existence check and let the key be removed. Further any other of your given “fixes” could broken the build so go through them again. Look into the DB and see the “DYEXTN_CONTAINERS” and check if its there … im pretty sure your DB is not set up correctly since my source looks indentical and everything is fine.
So try to:
1.Check the DB integrity and compare the Table named above to the *.hbm.xml (if its incorrect you know that you got around an error somewhere to break everything ele)
2. Reset your source to master and try fixing:
a.The Maven Repo https issue (you already did that)
b.The DB bug like shown in the Post here by removing the existence check (
foreignKeyConstraintExists foreignKeyName="FKB025CFC71792AD22
)
c. the front end blank bug (see this post: post)
All else is fine wiht the given build in the master branch (given compiler Jave env and dependencies are correct)
Thanks Simon. I dropped the database and created a new database to start fresh and the check you mentioned was removed and have below statement
in db/3.3/migration.xml
After making the change and building, when starting the openspecimen i see below error in logs.
What would be the right fix for below issue?
When I run below statement I do see 0 as result
select count(*) from os_pv_props where name = ‘abbreviation’;
ERROR org.springframework.web.context.ContextLoader - Context initialization failed
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.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for change set db/3.3/seed-data.xml::Move specimen type and pathology status abbreviations from csv to PV properties::vgaikwad:
Reason: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.CustomChangeException: Error while migrating abbreviations:
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1619) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
Hmm ok have to build rc6 myself. Since this seems fishy. Will come back once i had a look. Weich Sourcecode are you using 9.0 RC6 ? Did you modify anything ? Is your build passing ?
The error says it Cant Do a DB Update that is several years old … the same as the other error … both errors are very strange and in a normal World would never occur except yesh somebody wants them to Happen :).
See below. I wasn’t able to compile 9.0 RC6
OpenSpecimen, a Krishagni Product
Build Version : master
Build Date : Wed Aug 10 12:39:36 EDT 2022
Commit : f31b162
Present Time : Wed Aug 10 12:44:14 EDT 2022
[Fatal Error] -1: Premature end of file.
2022-08-10 12:44:15.801 DEBUG 2425 — [ool housekeeper] c.z.h.p.HikariPool : ConnPool - Pool stats (total=10, active=0, idle=10, waiting=0)
2022-08-10 12:44:15.801 DEBUG 2425 — [ool housekeeper] c.z.h.p.HikariPool : ConnPool - Fill pool skipped, pool is at sufficient level.
10-Aug-2022 12:44:16.013 INFO [http-nio-8080-exec-4] liquibase.lockservice.null Successfully acquired change log lock
Last build i did was 9.0 rc2 so maybe something Changed. So if you could live with rc 2 just try this one the errors above shold be All in this Version (given everything Else is good)
I was able to build 9.0 rc2 and after adding files specimen-type-abbr.csv & specimen-path-status-abbr.csv in the tomcat class path, was able to move past the last issue.
Still getting below error
Running Changeset: db/9.0/audit.xml::Specimen pool item flag::vpawar
11-Aug-2022 12:35:09.964 INFO [main] liquibase.changelog.null Columns POOL_ITEM(boolean),poolItem_MOD(boolean) added to CATISSUE_SPECIMEN_AUD
11-Aug-2022 12:35:09.964 INFO [main] liquibase.changelog.null ChangeSet db/9.0/audit.xml::Specimen pool item flag::vpawar ran successfully in 11ms
Running Changeset: db/9.0/audit.xml::Manage workflows::vpawar
11-Aug-2022 12:35:09.980 INFO [main] liquibase.changelog.null Columns MANAGE_WFS(boolean),manageWfs_MOD(boolean) added to CATISSUE_USER_AUD
11-Aug-2022 12:35:09.981 INFO [main] liquibase.changelog.null ChangeSet db/9.0/audit.xml::Manage workflows::vpawar ran successfully in 9ms
Running Changeset: db/views.xml::Consent tier responses view::vpawar
11-Aug-2022 12:35:09.991 INFO [main] liquibase.changelog.null View CONSENT_TIER_VIEW created
11-Aug-2022 12:35:09.992 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Consent tier responses view::vpawar ran successfully in 3ms
Running Changeset: db/views.xml::Collection protocol registration view::vpawar
11-Aug-2022 12:35:10.004 INFO [main] liquibase.changelog.null View cpr_view created
11-Aug-2022 12:35:10.004 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Collection protocol registration view::vpawar ran successfully in 5ms
Running Changeset: db/views.xml::Specimen shipment view::vpawar
11-Aug-2022 12:35:10.018 INFO [main] liquibase.changelog.null View OS_SPECIMEN_SHIPMENTS_VIEW created
11-Aug-2022 12:35:10.018 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Specimen shipment view::vpawar ran successfully in 7ms
Running Changeset: db/views.xml::Specimen collection and receive details of entire specimen hierarchy::vpawar
11-Aug-2022 12:35:10.030 INFO [main] liquibase.changelog.null View OS_SPMN_COLL_RECV_DETAILS_VIEW created
11-Aug-2022 12:35:10.030 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Specimen collection and receive details of entire specimen hierarchy::vpawar ran successfully in 4ms
Running Changeset: db/views.xml::Specimen shipment events view::vpawar
11-Aug-2022 12:35:10.040 INFO [main] liquibase.changelog.null View SPECIMEN_SHIPMENTS_VIEW created
11-Aug-2022 12:35:10.040 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Specimen shipment events view::vpawar ran successfully in 3ms
Running Changeset: db/views.xml::Container transfer specimen events::vpawar
11-Aug-2022 12:35:10.052 INFO [main] liquibase.changelog.null View OS_CONT_TRAF_SPMN_EVENTS_VIEW created
11-Aug-2022 12:35:10.052 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Container transfer specimen events::vpawar ran successfully in 4ms
Running Changeset: db/views.xml::Computed container hierarchy string::vpawar
11-Aug-2022 12:35:10.062 INFO [main] liquibase.changelog.null Custom SQL executed
11-Aug-2022 12:35:10.062 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Computed container hierarchy string::vpawar ran successfully in 3ms
Running Changeset: db/views.xml::Visit clinical diagnosis with codes view - query::vpawar
11-Aug-2022 12:35:10.071 INFO [main] liquibase.changelog.null View OS_VISIT_CD_VIEW created
11-Aug-2022 12:35:10.071 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Visit clinical diagnosis with codes view - query::vpawar ran successfully in 2ms
Running Changeset: db/views.xml::Starred CPs view::vpawar
11-Aug-2022 12:35:10.080 INFO [main] liquibase.changelog.null View OS_STARRED_CPS_VIEW created
11-Aug-2022 12:35:10.080 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Starred CPs view::vpawar ran successfully in 2ms
Running Changeset: db/views.xml::Participant form rec IDs view::vpawar
11-Aug-2022 12:35:10.088 INFO [main] liquibase.changelog.null View OS_CPR_EXTN_RECS_VIEW created
11-Aug-2022 12:35:10.088 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Participant form rec IDs view::vpawar ran successfully in 2ms
Running Changeset: db/views.xml::CPR custom fields rec IDs view::vpawar
11-Aug-2022 12:35:10.098 INFO [main] liquibase.changelog.null View OS_CPR_CUST_FIELDS_VIEW created
11-Aug-2022 12:35:10.098 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::CPR custom fields rec IDs view::vpawar ran successfully in 2ms
Running Changeset: db/views.xml::Pooled specimen items view::vpawar
11-Aug-2022 12:35:10.107 INFO [main] liquibase.changelog.null View OS_POOLED_SPECIMEN_ITEMS_VIEW created
11-Aug-2022 12:35:10.107 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Pooled specimen items view::vpawar ran successfully in 2ms
Running Changeset: db/views.xml::Specimen positions view::vpawar
11-Aug-2022 12:35:10.116 INFO [main] liquibase.changelog.null View OS_SPECIMEN_POSITIONS_VIEW created
11-Aug-2022 12:35:10.116 INFO [main] liquibase.changelog.null ChangeSet db/views.xml::Specimen positions view::vpawar ran successfully in 2ms
11-Aug-2022 12:35:10.119 INFO [main] liquibase.lockservice.null Successfully released change log lock
12:35:12.073 [main] 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.boot.MappingException: Association [com.krishagni.catissueplus.core.de.domain.Form.associations] references an unmapped entity [com.krishagni.catissueplus.core.de.domain.Form.associations] : origin(null)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1619) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:737) ~[spring-beans-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443) ~[spring-web-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325) [spring-web-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) [spring-web-4.3.30.RELEASE.jar:4.3.30.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4685) [catalina.jar:9.0.31]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5146) [catalina.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.31]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) [catalina.jar:9.0.31]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) [catalina.jar:9.0.31]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705) [catalina.jar:9.0.31]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978) [catalina.jar:9.0.31]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849) [catalina.jar:9.0.31]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.31]
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) [?:?]
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773) [catalina.jar:9.0.31]
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427) [catalina.jar:9.0.31]
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576) [catalina.jar:9.0.31]
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) [catalina.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) [catalina.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) [catalina.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) [catalina.jar:9.0.31]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936) [catalina.jar:9.0.31]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) [catalina.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.31]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) [catalina.jar:9.0.31]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) [catalina.jar:9.0.31]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.31]
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) [?:?]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) [catalina.jar:9.0.31]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) [catalina.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.31]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) [catalina.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.31]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) [catalina.jar:9.0.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.31]
at org.apache.catalina.startup.Catalina.start(Catalina.java:633) [catalina.jar:9.0.31]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343) [bootstrap.jar:9.0.31]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474) [bootstrap.jar:9.0.31]
Hello @Sudha_Kumar,
To resolve the foreign key constraint ‘FKB025CFC71792AD22’ error do the below in MySQL.
set foreign_key_checks=0;
alter table catissue_user drop foreign key FKB025CFC71792AD22;
Restart Tomcat.
Please let me know if this works for you.
Thanks,
Nilesh S.
Hmm yeah just remember you then easily can kill the database by deleting anything
set foreign_key_checks=0; does disable the dependency check for the db in total …
In my opinion its better to know where i changed the code and why … not just turn off the safety and then yeah try it . Thats how Chernobyl happend
Just finished building 9.0 RC6 … with just the same fixes as listed above …
I was able to build 9.0 rc2 and after adding files specimen-type-abbr.csv & specimen-path-status-abbr.csv in the tomcat class path, was able to move past the last issue.
I do not have to add anything manually it just works.
if i download the relase zip the files specified here:
Are actually here:
so if tomcat can not find them on the classpath you should check what happens during the compile java step in your build.gradle
What Nilesh did is essentially the same as what i did by deleting the existence check.
The downside to Nilesh’s solution is that you disable foreign key cheks for the db in total, which is a very bad idea for certain reasons and in my opinion
Thanks @Simon_Streit for taking time to answer the forum questions.
The foreign key checks are never meant to be disabled permanently. The idea was to disable it so that the alter statement worked without any issues. After the alter, the foreign key checks were to be re-enabled. The latter step was missing. Good catch.
@Sudha_Kumar - from the error message, it seems your build is either incomplete or your build source is not the same as one on the GitHub. It might be having some local modifications. Please use a new workspace, checkout the source, do not modify any files, do a clean build and deploy. This should work without any issues.
Thanks,
Vinayak
<---- Vinayak is an offical developer so yeah what he says is correct
What version of Gradle should be used for compiling? When I do the fresh download and build using Gradle 6.9.2 I get below error
Task :compileJava FAILED
FAILURE: Build failed with an exception.
openspecimen-9.0.RC6/build.gradle’ line: 209
Execution failed for task ‘:compileJava’.
Could not get unknown property ‘classesDir’ for main classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.
Hello @Sudha_Kumar,
The gradle version is 2.9.
The below wiki has version details of each component:
https://openspecimen.atlassian.net/wiki/spaces/CAT/pages/1115955/How+to+build+from+source+code#Howtobuildfromsourcecode%3F-Prerequisites
Regards,
Kaustubh
After doing the build and deploy with Gradle version 2.9, OpenSpecimen starts up and I was able to login.
Thanks to all who responded.
Some of the pages not all of them, like http://localhost:8080/openspecimen/ui-app/#/users/-1 is showing up blank and there is no error in the logs.
Hello @Simon_Streit,
Please open the openspecimen.properties file. That will be present in $TOMCAT_HOME/conf directory.
Search for app.data_dir property. It’s a data directory path.
Goto the data directory. In the data directory path the logs directory is present.
Goto data/logs/ directory. Check for os.log file. This file contains the logs of OpenSpecimen application.
If logs directory is not present, please check tomcat logs. Those will be present in the $TOMCAT_HOME/logs directory. Check catalina.out file.
The pages are blank, may be the app is not connecting to DB.
Please share both log files with us or paste the error here that encountered in the logs.
Regards,
Kaustubh
Thanks my post was meant to actually help him solve his problems. Since they were related to the init of the vue.js app.