I drop the database, the runtime properties file does not even exist. but even so far its not working. @dkayiwa
@achilep can you try running with this standalone package ??
@mozzy please what are the step ? thanks
just download that package , you extract it ,
@mozzy how do i use it to test the changes i’m making on the openmrs-core ? thanks
you simply replace the core war file in that package ,with the core war file you have built/compiled. the file should be under tomcat/webapps
great work , ill drop some comments.
better if you can list the Prs here
Thanks @achilep for the work you are doing. Can you test each library upgrade by running it with the reference application? You can download the reference application modules from here: https://ci.openmrs.org/build/result/artifactUrlRedirect.action?planKey=REFAPP-OMODDISTRO&buildNumber=9990&artifactName=referenceapplication-addons-snapshot
Ok ,thanks @dkayiwa i will retest all the library with the reference application .
thanks @dkayiwa i saw some PR were merged, thanks i will collect all the other one, and post its here . thank you
I’m still testing the others.
I was doing some research on the task below.
migrate to use JPA instead of raw Hibernate. The rationale for this is less to enable supporting other JPA providers and more because Hibernate’s new feature development is primarily focused on being a proper implementation of the JPA spec. So, for example JQL gets more attention than HQL these days and the Hibernate Criteria API has been “deprecated” in favour of the JPA version (it’s not going away anytime soon; it’s just not receiving new features).
and here is what I could find
The migration of this project consists of following steps:
1 Entirely remove Hibernate dependency from the Maven con- figuration file.
2.Modify Spring configuration files to bootstrap the JPA entity manager factory instead of the Hibernate session factory.
3.Change Hibernate-specific entity annotations.
4.Replace classes from the native Hibernate API, such as Query or Session , with its standard counterparts.
5Rewrite HQL queries because their syntax in some aspects dif- fers from the JPA QL.
6.Create persistence.xml configuration file and properly define a new persistence unit and its properties.
hello please i am still working on this PR :
if I manage to get through this problem then I could finish the conversion of the tests
@Rule public TemporaryFolder folder= new TemporaryFolder();
public abstract class BaseContextSensitiveTest extends AbstractJUnit4SpringContextTests
The TemporaryFolder does not exist and has no equivalence in junit 5.
Is the same problem with PowerMockRunner there is not PowerMockExtension in junit 5.
for this one AbstractJUnit4SpringContextTests ,i try to use jupiter.SpringExtension but i did not succeed .
any help will be welcome.
thanks a lot for your work on this so far
- Have you looked at https://junit.org/junit5/docs/current/user-guide/#writing-tests-built-in-extensions-TempDirectory I believe that would be the equivalent of TemporaryFolder.
Another thing we could do which is what I was wondering: if you look at https://junit.org/junit5/docs/current/user-guide/#migrating-from-junit4-rule-support we could depend on the migration package
junit-jupiter-migrationsupport. This would allow us to gradually migrate. So maybe we would be closer to merge you first commit with this. And then gradually remove the
@EnableRuleMigrationSupport from tests relying on for example
Currently the PR is pretty big. So I would suggest to try to keep it smaller. So we do not accidentally break anything.
RunWithis replaced with
ExtendWithso there should be a different Runner coming from PowerMock that implements the Junit Jupiter exention. I have not checked though.
BaseContextSensitiveTestI would need to spend more time looking into what your current issue is.
Hope that helps at least a bit for some of the issues. Please let me know
thank you @teleivo , since yesterday I am actually making good use of your advice, its helped me a lot, I have arrange the PR as you commented, I agree that we merge the work that has already done so far before we can continue.
I currently have a problem on updating this library org.glassfish.jaxb:jaxb-runtime:2.3.2 --> 3.0.0-M4 , I use java 8 in my computer and its build without problem, when I push online java 8 build without problem but java 9,10.11 , 12,13, and 14 gives me this error: https://pastebin.com/raw/ufYniyEJ ,
this is the PR :https://github.com/openmrs/openmrs-core/pull/3250
@achilep I think you need to add this dependency:
<dependencies> <dependency> <groupId>jakarta.xml.bind</groupId> <artifactId>jakarta.xml.bind-api</artifactId> <version>2.3.3</version> </dependency> </dependencies>
See here. Incidentally, we might see if things work using the
com.sun.xml.bind:jaxb-impl artifact named there as that, rather than the Glassfish implementation, appears to be the reference implementation for JAX-B now.