java.lang.IllegalArgumentException in Json parameter apijava.lang.IllegalArgumentException in Json parameter apihttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1190260402024-03-28T15:26:24Z2024-03-28T15:26:24ZRE: java.lang.IllegalArgumentException in Json parameter apiThiago Leão Moreirahttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1199157202020-09-08T00:00:32Z2020-09-08T00:00:32ZIt is a bug. I just reported it on <a href="https://issues.liferay.com/browse/LPS-120538">https://issues.liferay.com/browse/LPS-120538</a>Thiago Leão Moreira2020-09-08T00:00:32ZRE: java.lang.IllegalArgumentException in Json parameter apiPankaj Kumarhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1190415762020-04-25T14:50:43Z2020-04-25T14:50:43ZAdd method in ServiceIml class with two parameter <br />e.g<br />public class TestServiceImpl extends TestServiceBaseImpl {public JSONObject TestMethod(String param1, final String param2){<br />}}Pankaj Kumar2020-04-25T14:50:43ZRE: java.lang.IllegalArgumentException in Json parameter apiChristoph Rabelhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1190412292020-04-25T13:51:44Z2020-04-25T13:51:44ZHmm.It seems, Liferay uses Jodd 3.6.X and that's pretty old, so it is quite possible it won't work with Java 11 at all. I fear, this issue isn't easily solved. Liferay probably needs to upgrade Jodd anyway, but even if they do, they will only do it for 7.3 or 7.4.<br />Also, it seems even the most current version of Jodd doesn't fully support Java 11. So, even were they to upgrade it, there might still be issues.<br /><br />But I have used Liferay 7 and Java 11 already, so it should work in general. What kind of parameters do you have for your functions? I mean, I know that trivial parameters work. Could you show us the method signature that doesn't work?Christoph Rabel2020-04-25T13:51:44ZRE: java.lang.IllegalArgumentException in Json parameter apiPankaj Kumarhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1190388842020-04-25T10:25:35Z2020-04-25T10:25:35Z<strong>Hi Christoph</strong><br /><em><strong><span style="font-size: 16px;">We are not using CXF method.We are </span></strong><strong>generating</strong><strong><span style="font-size: 16px;"> JSON Web service using service builder.</span></strong></em><br /><em><strong><span style="font-size: 16px;">It's working fine in JAVA 8.But in JAVA 11 we facing IIlgealArgumetnException while invoking.</span></strong></em><br /><em><strong><span style="font-size: 16px;"></span></strong></em><em><strong><span style="font-size: 16px;">Thanks,</span></strong></em><br /><em><strong><span style="font-size: 16px;">Pankaj Semwal</span></strong></em><em><span style="font-size: 16px;"><strong><span style="font-size: 16px;"> </span></strong></span></em>Pankaj Kumar2020-04-25T10:25:35ZRE: java.lang.IllegalArgumentException in Json parameter apiChristoph Rabelhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1190378612020-04-25T08:45:01Z2020-04-25T08:45:01ZI believe, you need to give more information to the users here.<br />How did you create the webservice? A rest service using Whiteboard? With the old CXF method? Using Service Builder? Something else?<br />What kind of parameters do you have?<br />Did you test it with Java 8? Does it work with Java 8?Christoph Rabel2020-04-25T08:45:01Zjava.lang.IllegalArgumentException in Json parameter apiPankaj Kumarhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1190260392020-04-24T15:46:48Z2020-04-24T15:46:48ZHi All,I have created the JSON web service which taking two parameter.While invoking service i am getting below issue.<u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: #0066cc">java.lang.IllegalArgumentException</span></span></span></u><br /><u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: #0066cc"></span></span></span></u><span style="font-size: 12px;"><span style="font-family: Consolas"></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black"> at jodd.asm5.ClassReader.<init>(</span></span></span><u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: #0066cc">ClassReader.java:170</span></span></span></u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black">)</span></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black"> at jodd.asm5.ClassReader.<init>(</span></span></span><u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: #0066cc">ClassReader.java:153</span></span></span></u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black">)</span></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black"> at jodd.asm5.ClassReader.<init>(</span></span></span><u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: #0066cc">ClassReader.java:424</span></span></span></u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black">)</span></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black"> at jodd.paramo.Paramo.resolveParameters(</span></span></span><u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: #0066cc">Paramo.java:59</span></span></span></u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black">)</span></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black"> at com.liferay.portal.util.MethodParametersResolverImpl.resolveMethodParameters(</span></span></span><u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: #0066cc">MethodParametersResolverImpl.java:49</span></span></span></u><span style="font-size: 12px;"><span style="font-family: Consolas"><span style="color: black">)</span></span></span><span style="font-size: 12px;"><span style="font-family: Consolas"></span></span>WE a