Skip to content

Commit

Permalink
TRUNK-6187 ClassCastException: com.sun.proxy.$Proxy183 cannot be cast…
Browse files Browse the repository at this point in the history
… to org.openmrs.api.impl.UserServiceImpl

The OpenMRS database setup wizard fails with this error:

WARN - InitializationFilter$InitializationCompletion$1.run(1820) |2023-09-28T13:18:26,152| Unable to complete the startup.
java.lang.ClassCastException: com.sun.proxy.$Proxy183 cannot be cast to org.openmrs.api.impl.UserServiceImpl
	at org.openmrs.web.filter.initialization.InitializationFilter$InitializationCompletion$1.run(InitializationFilter.java:1798) [openmrs-web-2.7.0-SNAPSHOT.jar:?]
	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_352]
  • Loading branch information
dkayiwa committed Sep 28, 2023
1 parent 0b0ae76 commit 452a088
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1795,8 +1795,7 @@ && getRuntimePropertiesFile().setReadable(true)) {
props.setProperty(UserService.ADMIN_PASSWORD_LOCKED_PROPERTY, "false");
Context.setRuntimeProperties(props);

((UserServiceImpl) Context.getUserService()).changePassword(
Context.getAuthenticatedUser(), wizardModel.adminUserPassword);
Context.getUserService().changePassword("test", wizardModel.adminUserPassword);

if (initValue == null) {
props.remove(UserService.ADMIN_PASSWORD_LOCKED_PROPERTY);
Expand Down

0 comments on commit 452a088

Please sign in to comment.