-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.2.10 EE GA1, 6.2.X EE, 7.0.0 M4
-
Fix Version/s: 6.2.3 CE GA4, 6.2.X EE, 7.0.0 M4
-
Component/s: Portal Configuration, Portal Configuration > Portal Instances
-
Branch Version/s:6.2.x
-
Backported to Branch:Committed
-
Story Points:16
-
Fix Priority:5
-
Git Pull Request:
Steps to reproduce
On ee-6.2.x:
1) Set ldap.password.policy.enabled=true
2) Log in as default admin and go to control-panel->configuration->portal instances
3) Create a new portal instance (entered values are not relevant)
4) Try to delete the created instance
Expected behavior: The instance is deleted.
Issue: In the GUI Portal Instances is temporarily unavailable error-message is shown. In the log, the following Stacktrace can be seen:
09:03:57,306 ERROR [http-nio-8443-exec-55][render_portlet_jsp:132] null
java.lang.NullPointerException
at com.liferay.portal.systemevent.SystemEventAdvice.isValid(SystemEventAdvice.java:292)
at com.liferay.portal.systemevent.SystemEventAdvice.before(SystemEventAdvice.java:123)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:44)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
On master:
PPLSI.getDefaultPasswordPolicy() returns null if LDAP pwd policy is enabled, which is intended, but on current master I wasn't able to turn it on. I tried the mentioned property and tried to set it from control panel manually. However DefaultLDAPSettings.isPasswordPolicyEnabled() always returned false.
Thus, the orignal issue on master can be reproduced with the following Beanshell script.
import com.liferay.portal.service.*; try { policy = PasswordPolicyLocalServiceUtil.deletePasswordPolicy(null); } catch (Exception e) { e.printStackTrace(); }
Thereafter it throws the same exception:
java.lang.NullPointerException at com.liferay.portal.systemevent.SystemEventAdvice.isValid(SystemEventAdvice.java:287) at com.liferay.portal.systemevent.SystemEventAdvice.before(SystemEventAdvice.java:123) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:44) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173) at com.sun.proxy.$Proxy124.deletePasswordPolicy(Unknown Source) at com.liferay.portal.service.PasswordPolicyLocalServiceUtil.deletePasswordPolicy(PasswordPolicyLocalServiceUtil.java:135) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeStaticMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source)
Notes for QA
When testing on master, the provided Beanshell script is expected to throw an NPE in PasswordPolicyLocalServiceImpl.deletePasswordPolicy(). Neverthless, NPE in SystemEventAdvice.isValid() is what the fix eliminates.
- relates
-
LPE-13431 Unable to delete portal instance when "ldap.password.policy.enabled" is set to "true"
-
- Closed
-