[GeoNetwork-users] Changing user password throws exception

When I try to change password (after clicking link in mail) after forgetting
it I get this exception:

2016-02-24 14:29:56,488 ERROR [jeeves.service] - Exception when executing
service
2016-02-24 14:29:56,495 ERROR [jeeves.service] - (C) Exc :
java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
2016-02-24 14:29:56,496 ERROR [jeeves] - Error occurred within a transaction
java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
  at
org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:90)
  at org.fao.geonet.util.PasswordUtil.encoder(PasswordUtil.java:131)
  at
org.fao.geonet.services.password.Change.serviceSpecificExec(Change.java:98)
  at
org.fao.geonet.services.NotInReadOnlyModeService.exec(NotInReadOnlyModeService.java:27)
  at jeeves.server.dispatchers.ServiceInfo.execService(ServiceInfo.java:226)
  at
jeeves.server.dispatchers.ServiceInfo.noTransactionExec(ServiceInfo.java:141)
  at jeeves.server.dispatchers.ServiceInfo.access$000(ServiceInfo.java:45)
  at
jeeves.server.dispatchers.ServiceInfo$1.doInTransaction(ServiceInfo.java:120)
  at
jeeves.server.dispatchers.ServiceInfo$1.doInTransaction(ServiceInfo.java:117)
  at
jeeves.transaction.TransactionManager.runInTransaction(TransactionManager.java:63)
  at jeeves.server.dispatchers.ServiceInfo.execServices(ServiceInfo.java:114)
  at
jeeves.server.dispatchers.ServiceManager.dispatch(ServiceManager.java:442)
  at
jeeves.server.dispatchers.ServiceManager.dispatch(ServiceManager.java:384)
  at jeeves.server.JeevesEngine.dispatch(JeevesEngine.java:600)

I tried googling, but can't really find cause of this.

In PasswordUtil.java (line: 130) I also tried returning:
(PasswordEncoder)Class.forName("org.springframework.security.crypto.password.StandardPasswordEncoder").newInstance();

instead of:
WebApplicationContext appcontext =
WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
return (PasswordEncoder) appcontext.getBean(ENCODER_ID);

but then I get not valid token. Anyone else with same problem?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Changing-user-password-throws-exception-tp5252530.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Bug is already opened from few months ago:
https://github.com/geonetwork/core-geonetwork/issues/1310
<https://github.com/geonetwork/core-geonetwork/issues/1310&gt;

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Changing-user-password-throws-exception-tp5252530p5252735.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.