Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
java.lang.IllegalArgumentException in Json parameter api
Hi All,I have created the JSON web service which taking two parameter.While invoking service i am getting below issue.java.lang.IllegalArgumentException
at jodd.asm5.ClassReader.<init>(ClassReader.java:170) at jodd.asm5.ClassReader.<init>(ClassReader.java:153) at jodd.asm5.ClassReader.<init>(ClassReader.java:424) at jodd.paramo.Paramo.resolveParameters(Paramo.java:59) at com.liferay.portal.util.MethodParametersResolverImpl.resolveMethodParameters(MethodParametersResolverImpl.java:49)WE are using Liferay DXP 7.2 and Open JDK 11.After debugging i noticed Liferay use jodd.asm5
and I checked Jodd site https://jodd.org/download/ and they are not supporting it after Java 8.
Please tell if any body faced this issue and able to find solution.
at jodd.asm5.ClassReader.<init>(ClassReader.java:170) at jodd.asm5.ClassReader.<init>(ClassReader.java:153) at jodd.asm5.ClassReader.<init>(ClassReader.java:424) at jodd.paramo.Paramo.resolveParameters(Paramo.java:59) at com.liferay.portal.util.MethodParametersResolverImpl.resolveMethodParameters(MethodParametersResolverImpl.java:49)WE are using Liferay DXP 7.2 and Open JDK 11.After debugging i noticed Liferay use jodd.asm5
and I checked Jodd site https://jodd.org/download/ and they are not supporting it after Java 8.
Please tell if any body faced this issue and able to find solution.
I believe, you need to give more information to the users here.
How did you create the webservice? A rest service using Whiteboard? With the old CXF method? Using Service Builder? Something else?
What kind of parameters do you have?
Did you test it with Java 8? Does it work with Java 8?
How did you create the webservice? A rest service using Whiteboard? With the old CXF method? Using Service Builder? Something else?
What kind of parameters do you have?
Did you test it with Java 8? Does it work with Java 8?
Hi Christoph
We are not using CXF method.We are generating JSON Web service using service builder.
It's working fine in JAVA 8.But in JAVA 11 we facing IIlgealArgumetnException while invoking.
Thanks,
Pankaj Semwal
We are not using CXF method.We are generating JSON Web service using service builder.
It's working fine in JAVA 8.But in JAVA 11 we facing IIlgealArgumetnException while invoking.
Thanks,
Pankaj Semwal
Hmm.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.
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.
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?
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.
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?
Add method in ServiceIml class with two parameter
e.g
public class TestServiceImpl extends TestServiceBaseImpl {public JSONObject TestMethod(String param1, final String param2){
}}
e.g
public class TestServiceImpl extends TestServiceBaseImpl {public JSONObject TestMethod(String param1, final String param2){
}}
Thiago Leão Moreira, modified 5 Years ago.
Liferay Legend
Posts: 1449
Join Date: 10/10/07
Recent Posts
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™