Class not found running ResourceDocCreatorTest

4 views
Skip to first unread message

Lluis Martinez

unread,
Apr 1, 2015, 5:22:17 PM4/1/15
to d...@openmrs.org
I want to add search handlers info to the WS docs, in order to see how it works I execute ResourceDocCreatorTest and get the following error:

java.lang.NoClassDefFoundError: org/openmrs/TestOrder
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2398)
at java.lang.Class.getDeclaredConstructors(Class.java:1838)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:227)
...

There are 3 versions of TestOrder in the workspace (1.9.2, 1.10.1 and 1.11.0) by the way. Ideas?

Cheers

Wyclif Luyima

unread,
Apr 2, 2015, 3:33:14 PM4/2/15
to Developers
Hi Lluis,

Are running into this while running unit tests?

Wyclif

--
OpenMRS Developers: http://om.rs/dev
Post: d...@openmrs.org | Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions: http://om.rs/id
 
*** THIS GROUP WILL BE MOVED to OpenMRS Talk effective 10 April 2015 at 19:00 UTC. Please visit https://talk.openmrs.org/t/openmrs-developers-group-changes-2015-04-10/1508 for details and to make necessary changes.



--
Wyclif Luyima
Regenstrief Institute Inc.

Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed to you from medical records with confidentiality protected by federal and state laws. Federal regulations and State laws prohibit you from making further disclosure of such information without the specific written consent of the person to whom the information pertains or as otherwise permitted by such regulations. A general authorization for the release of medical or other information is not sufficient for this purpose.

If you have received this message in error, please notify the sender by return e-mail and delete the original message. Any retention, disclosure, copying, distribution or use of this information by anyone other than the intended recipient is strictly prohibited.

Lluis Martinez

unread,
Apr 2, 2015, 5:15:10 PM4/2/15
to d...@openmrs.org
Hi Wyclif,

Yes, it was running unit tests on ResourceDocCreatorTest. All its methods have an Ignore annotation, and with good reason.
As a workaround, I copied this class to /webservices.rest-omod-1.10 and it worked (but don't ask me why). 

Cheers




To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@openmrs.org.

Wyclif Luyima

unread,
Apr 2, 2015, 8:10:39 PM4/2/15
to Developers
My assumption is that the unit test should be run via maven so that the maven placeholders for the versions are replaced, that way the correct classes get loaded.

Wyclif

Lluis Martinez

unread,
Apr 6, 2015, 7:13:40 PM4/6/15
to d...@openmrs.org
Hi Wyclif

Thanks for your answer. Running mvn clean install failed with the same error. 
Anyway, moving the class to another omod worked and I did export the wiki output which was my goal.

Cheers
2015-04-07 01_08_48-C__Windows_system32_cmd.exe.png
Reply all
Reply to author
Forward
0 new messages