"Incompatible argument to function" error on SimpleCaptchaImpl after installing Liferay DXP 7.1 Fix Pack 17 or 7.2 Fix Pack 5
Written By
Alfonso Crisci
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- After installing Liferay DXP 7.1 Fix Pack 17 or Liferay DXP 7.2 Fix Pack 5, customers using Liferay may notice an error at startup:
ERROR [Start Level: Equinox Container: 03872104-7588-4c48-9e30-b4e53004033b][SimpleCaptchaImpl:93] bundle com.liferay.captcha.api:2.0.21 (362)[com.liferay.captcha.simplecaptcha.SimpleCaptchaImpl(1810)] : The activate method has thrown an exception
java.lang.VerifyError: (class: nl/captcha/gimpy/BlockGimpyRenderer, method: gimp signature: (Ljava/awt/image/BufferedImage;)V) Incompatible argument to function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at com.liferay.captcha.simplecaptcha.SimpleCaptchaImpl._getInstance(SimpleCaptchaImpl.java:500)
at com.liferay.captcha.simplecaptcha.SimpleCaptchaImpl.initGimpyRenderers(SimpleCaptchaImpl.java:321)
at com.liferay.captcha.simplecaptcha.SimpleCaptchaImpl.activate(SimpleCaptchaImpl.java:171)
at com.liferay.captcha.simplecaptcha.SimpleCaptchaImpl.activate(SimpleCaptchaImpl.java:183)
[...]
Environment
- Liferay DXP 7.1 Fix Pack 17+
- Liferay DXP 7.2 Fix Pack 5+
Resolution
- As a workaround, please use the below steps:
1) On the affected instance, navigate to Control Panel > System Settings > Security Tools > CAPTCHA
2) Take note and save all the configurations entered there
3) Click on the vertical ellipsis icon on top-right > Reset Default Values
4) Enter again the previously saved configurations and Save
This will override the field values with the defaults defined by your current patch level. (e.g. setting com.liferay.captcha.simplecaptcha.gimpy.BlockGimpyRenderer instead of nl.captcha.gimpy.BlockGimpyRenderer)
The previous captcha configuration is removed, but adding it again (now with the correct renderer class names) will eliminate the incompatibility issue when initializing the renderers at startups. The issue won't return, because the configuration record refers to the correct renderer class names.
- The error is a confirmed Liferay bug fixed at https://issues.liferay.com/browse/LPS-113813, the permanent solution will appear on 7.1 DXP Fix Pack 20 and 7.2 DXP Fix Pack 8.
Did this article resolve your issue ?