Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error While Installation #17

Open
gaurav1792 opened this issue Dec 26, 2014 · 5 comments
Open

Error While Installation #17

gaurav1792 opened this issue Dec 26, 2014 · 5 comments

Comments

@gaurav1792
Copy link

I am getting some error while installation which are
Please help me how to resolve them

/**/

Tests run: 55, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] The openEHR Reference Java Implementation .......... SUCCESS [ 1.768 s]
[INFO] openEHR Measurement Service Implementation ......... SUCCESS [ 4.627 s]
[INFO] openEHR Reference Model Core ....................... SUCCESS [ 7.326 s]
[INFO] openEHR Minimum Terminology Service ................ SUCCESS [ 4.527 s]
[INFO] openEHR Reference Model Domain ..................... SUCCESS [ 6.917 s]
[INFO] openEHR Archetype Object Model ..................... SUCCESS [ 5.835 s]
[INFO] openEHR Archetype Profile .......................... SUCCESS [ 4.396 s]
[INFO] java ADL Parser .................................... FAILURE [ 59.394 s]
[INFO] java dADL Parser ................................... SKIPPED
[INFO] ADL Serializer ..................................... SKIPPED
[INFO] openEHR OET Template Parser and Flattener .......... SKIPPED
[INFO] XML Serializer ..................................... SKIPPED
[INFO] openEHR Reference Model Object Builder ............. SKIPPED
[INFO] openEHR RM XML Data Binding Component .............. SKIPPED
[INFO] java dADL Binding .................................. SKIPPED
[INFO] openEHR RM Skeleton Instance Generator ............. SKIPPED
[INFO] Archetype Validator ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:35 min
[INFO] Finished at: 2014-12-26T19:40:34+05:30
[INFO] Final Memory: 88M/234M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12.4:test (default-test) on project rm-builder: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\gd\Desktop\java-libs-master\java-libs-master\rm
-builder\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR] mvn -rf :rm-builder
/**/

.

@ppazos
Copy link
Contributor

ppazos commented Dec 26, 2014

Please attach the specific errors.

@gaurav1792
Copy link
Author

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12.4:test (default-test) on project rm-builder:


Test set: org.openehr.build.FindMatchingRMClassTest

Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.156 sec <<< FAILURE!
testMatchItemList(org.openehr.build.FindMatchingRMClassTest) Time elapsed: 0.047 sec <<< FAILURE!
junit.framework.ComparisonFailure: failed to match ItemList expected: but was:


at junit.framework.Assert.assertEquals(Assert.java:81)
at org.openehr.build.FindMatchingRMClassTest.assertMatchedRMClass(FindMatchingRMClassTest.java:166)
at org.openehr.build.FindMatchingRMClassTest.testMatchItemList(FindMatchingRMClassTest.java:94)

@dngferreira
Copy link

This problem is related to the changes on HashMap in Java8.
Some Info
If you just change the class org.openehr.build.RMObjectBuilder typeMap and upperCaseMap to LinkedHashMap instead of HashMap, the test run and the code runs.

There are other places where the order of the HashMaps seem to be important but the problem is never adressed in the test.
I'm preparing a pull request to fix this problem but I'm still new to the code and haven't found all the places where the HashMap order is important.
You could just replace all HashMap instances for LinkedHashMap but it seems a bit drastic.

@btan
Copy link

btan commented Jun 19, 2016

Yes, it is related with HashMap in Java8, it is due to the order of iteration is dependent on the historical insertion order of the hash map in previous java version.
In RMObjectBuilder.java file, change the following codes to LinkedHashMap:
typeMap = new LinkedHashMap<String, Class>();
upperCaseMap = new LinkedHashMap<String, Class>();

Then, you can run mvn clean install without error, after running in specific project folder firstly in "adl-serializer"
adl-serializer>mvn clean install

@gardes
Copy link
Member

gardes commented Jun 20, 2016

I agree, this needs to be changed.
There is a pull request already by Duarte Ferreira (https://github.com/dngferreira) at #19 - more comments there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants