Is there an up-to-date springboot version of LibreClinica? #216
Replies: 23 comments 16 replies
-
Hi shanzhu2021 So your question about LibreClinica is whether you can not run it from within IntelliJ IDEA like you are used from Spring Boot projects or not, right? Regards, |
Beta Was this translation helpful? Give feedback.
-
Yes, please start this process, I 'd like to work for the migration of LibreClinica to Spring Boot. |
Beta Was this translation helpful? Give feedback.
-
My question would be if you are interested about spring boot version only so that you can run it in development or if you want to run LibreClinica as spring boot app in production. Because if you are only searching for a way how to setup development environment with intellij (java, postgresql, maven build, run in debug mode), then this is of course possible without spring boot and I will update our developer documentation with tutorial how to do it. |
Beta Was this translation helpful? Give feedback.
-
My answer is both - first I need a clear way to setup development environment with intellij, please update the developer documentation with tutorial how to do it, including the SQL scripts on initializing the database tables, and I also want to run LibreClinica as spring boot app in production in the near future, with all the dependencies and plugins up-to-date. |
Beta Was this translation helpful? Give feedback.
-
Ok. As I mentioned, I will be working on dev documentation so I can add some details regarding how to setup development environment. Just briefly, for developer it should be pretty straightforward. You import it as a maven project. Setup your local jdk and tomcat so that you can create your tomcat specific run/debug configuration. Use maven to execute specific goals. Once build, it produces war that you define in your build/debug configuration to be deployed in tomcat. Regarding database initialisation. Liquibase is used for DB scheme version management. The initialisation/update of database scheme is perform automatically on deployment (only empty DB is required at beginning). best Tomas |
Beta Was this translation helpful? Give feedback.
-
I did a bit of work on dev documentation. Hopefully it will help you to get started: libreclinica-docs.readthedocs.io best Tomas |
Beta Was this translation helpful? Give feedback.
-
Dear Tomas,
I am trying to follow your dev documentation, but I use an Intellij IDEA community Edition, I cannot find a Server tab at the Run/Debug Configuration step. Is there other way to do it?
Regards,
Tong
|
Beta Was this translation helpful? Give feedback.
-
I am not sure if I would recommend IntelliJ IDEA Community Edition for this project, as far as I know it does not have support for Java EE and other frameworks used in enterprise application development. And it seem to also not have the Tomcat plugin necessary to setup Tomcat server as described in the documentation. Quick search on the internet says that it may be possible to configure Tomcat as external tool, but I cannot share my experience in this direction. |
Beta Was this translation helpful? Give feedback.
-
I switch to Ultimate edition, and open the project in IntelliJ IDEA, finally there are several errors in pom file as follows: |
Beta Was this translation helpful? Give feedback.
-
the lines 450, 469, 472 belong to maven plugins that are not used if developer machine is setup as described in docs. The error only says that this maven plugin would not work, but these two plugins are not used (at least not in the parent project level). The Oracle JDBC driver is more of relic (Oracle DB backend is not supported in the system for long time already). We plan to remove it in one of the next refactoring branches, but currently there is still code (although unused) which operates with it. The dependency is only available from OC server (which is also one of the reasons why we want to get rid of it). If for some reason (network/proxy...) you (or maven) cannot reach that server then you have a problem. Can you reach this endpoint? https://openclinica.jfrog.io/artifactory/libs-release/oracle/ojdbc14/ojdbc14/10g/ojdbc14-10g.jar |
Beta Was this translation helpful? Give feedback.
-
Yes, I can get it but very slow. |
Beta Was this translation helpful? Give feedback.
-
These 3 lines that I mentioned you can ignore. But "could not find artifact error" you need to solve. Because you need to be able to fetch ojdbc14-10g.jar via maven. |
Beta Was this translation helpful? Give feedback.
-
When I further check the pom files in the four dir, I found there are still problems as shown in the snapshots. In addition, for the PostgreSQL database, I changed the port to 5434, where I should make change in the project? |
Beta Was this translation helpful? Give feedback.
-
jaxb2-maven-plugin does not work anymore in newest version of Java. We do development on java 8. There is a ticket open related to this issue (to allow development on newer java #173) but it is not resolved yet.
as mentioned above, those are dependencies only available from OC server. Obviously your intellij/maven configuration does not allow maven to fetch them. Alternatively, if you download them directly, you should be able to manually add them. Internet search for "manually install maven dependency" should give you an idea how to do it.
this can be done by changing datainfo.properties file after first deployment (it is described in docs Project in IDE > Debug section) |
Beta Was this translation helpful? Give feedback.
-
For the dependencies, I installed the local ojdbc manually, but I cannot find the two mockrunner files, so can I ignore these two and all the others? Otherwise, can you send me all the links if I need download and install locally. For the database port, I find six datainfo.properties files in the project, but from docs Project in IDE > Debug section, I do not need to change anything in these files, am I right? |
Beta Was this translation helpful? Give feedback.
-
For manually downloading dependencies, you can browse them via this URL: OC still keeps this artifact repository open for everybody. But make sure that you install them properly, because from your screenshot it looks like the odbc dependency is still not recognised (missing). Regarding datainfo.properties. Normally you do not want to modify the source files. When you compile and pack the LibreClinica into LibreClinica.war archive, the default version of datainfo.properties will be packed as well and after deployment in tomcat webapps folder you just copy that file (LibreClinica/WEB-INF/Classes/datainfo.properties) into folder that you create in TOMCAT_HOME/libreclinica.config/ And this is the file where you modify the configuration to pass your DB environment. This way we can keep config files that are in sources clean from any specific deployment environment details. |
Beta Was this translation helpful? Give feedback.
-
I installed ojdbc this way instead of using 'mavel install', it should be correct now? In the same way, I installed mockrunners from your link, but have to change the scope from 'test' to 'system', otherwise, it reports errors, it now looks like: is this the right way to do? Or I should use 'maven install'? Please advise me. And all other errors in pom file of project and odm dirs can be ignored? Or What I need to do? |
Beta Was this translation helpful? Give feedback.
-
I follow the docs and when I first execute Run > Debug, it reports an error before deploy it to tomcat, the screenshot is like: What is this problem and where is the org.cdisc.ns.odm.v130_api? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
This comment has been minimized.
This comment has been minimized.
-
The red xml elements reads "Element schemaDirectory is not allowed here". |
Beta Was this translation helpful? Give feedback.
-
After change to tomcat 8, I run the project successfully. Thanks all of your help! |
Beta Was this translation helpful? Give feedback.
-
Does the LibreClinica support multi-lingual? How to change it? |
Beta Was this translation helpful? Give feedback.
-
I'd like to know is there an up-to-date springboot version of LibreClinca which I can open and run in my IntelliJ IDEA.
Beta Was this translation helpful? Give feedback.
All reactions