meizzz
(Hugo Lourenço)
August 25, 2018, 3:04pm
#1
Hello,
I am failing to run a simple test, (log here ) , this is happening I think due to this exeption
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/C:/Users/Hugo/.m2/repository/org/openmrs/module/htmlformentryui-api/1.6.1/htmlformentryui-api-1.6.1.jar!/org/openmrs/module/htmlformentryui/HTMLFormEntryUIFrameworkIntegrationActivator.class];
But I use ‘htmlformentry-ui’ in my module and the server it does what i want, but when i created this test… If you happen to get same error or similar please share the solution
Best Regards
dkayiwa
(Daniel Kayiwa)
August 25, 2018, 8:53pm
#2
Which version of Java are you using to run the test?
dkayiwa
(Daniel Kayiwa)
August 26, 2018, 7:48am
#4
What does this command return? mvn -v
meizzz
(Hugo Lourenço)
August 26, 2018, 9:14am
#5
C:\WINDOWS\system32>mvn -v
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T08:58:13+01:00)
Maven home: C:\Program Files\apache-maven-3.5.2-bin\apache-maven-3.5.2\bin\..
Java version: 1.8.0_161, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_161\jre
Default locale: pt_PT, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
i just deleted my mvn folder, and still the same error, btw, I’m extending BaseModuleContextSensitiveTest on my test class, could the error came from here?
dkayiwa
(Daniel Kayiwa)
August 26, 2018, 6:13pm
#6
Which source and target does your maven-compiler-plugin have in the pom file.
meizzz
(Hugo Lourenço)
August 26, 2018, 6:55pm
#7
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
dkayiwa
(Daniel Kayiwa)
August 27, 2018, 8:41am
#8
And which openmrs platform version is your module referencing?
meizzz
(Hugo Lourenço)
August 27, 2018, 9:11am
#9
its reference application 2.8
dkayiwa
(Daniel Kayiwa)
August 27, 2018, 9:18am
#10
In your pom file? You could also take a look at this: platform module vs reference application module
meizzz
(Hugo Lourenço)
August 27, 2018, 9:27am
#11
on my pom file its 2.4,
<dependency>
<groupId>org.openmrs.distro</groupId>
<artifactId>referenceapplication</artifactId>
<version>2.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
dkayiwa
(Daniel Kayiwa)
August 27, 2018, 9:35am
#12
Did you take a look at the link for the different between openmrs platform and reference application modules?
meizzz
(Hugo Lourenço)
August 27, 2018, 10:00am
#13
yeah, platform is just core and the reference application uses the core api through the various modules…
I’m missing the point, could you tell me?
dkayiwa
(Daniel Kayiwa)
August 27, 2018, 10:06am
#14
So are you now better placed to answer my original question? “And which openmrs platform version is your module referencing?”
meizzz
(Hugo Lourenço)
August 27, 2018, 10:39am
#15
I’m sorry but my eyes are still sleeping
openmrsPlantaformVersion - 1.11.6
dkayiwa
(Daniel Kayiwa)
August 27, 2018, 11:15am
#16
Hopefully you are not deep in a dream!
So can you change the source and target to 7 and then compile again?
meizzz
(Hugo Lourenço)
August 27, 2018, 11:22am
#17
sure, but I got a question, this plugin “maven-compiler-plugin”, its on the omod pom its okay to be in there?
meizzz
(Hugo Lourenço)
August 27, 2018, 11:28am
#18
still the same error on running the tests, but cant use that as 7, I’ve got some lambdas on my module so i need java 8
dkayiwa
(Daniel Kayiwa)
August 27, 2018, 11:35am
#19
Then your openmrs platform version needs to be 2.0 and above because it is from then that we started supporting java 8
1 Like