Copy link to clipboard
Copied
Hi,
Recently, i ran the update process from Update10 to Update11 for our CF 2018 Enterprise.
However, we found that some (almost all) calls to REST services failed and throw the "java.lang.IllegalArgumentException: argument type mismatch" exception.
To isolate the error from our entire implementation I made a simple implementation to reproduce the error:
REST Service component (api.cfc)
component rest = true {
/**
*
* @httpmethod POST
* @consumes application/json
* @produces application/json
*
*/
remote Input function echo(required Input payload) {
return payload;
}
}Component (Input.cfc)
component {
property type = string name = content required = true;
}
I ran an HTTP POST through Postman and got the following exception (exception.logs):
"Error","http-nio-8500-exec-8","05/26/21","09:12:36","","HTTP 500 Internal Server Error"
coldfusion.rest.method.dispatch.CFRestException: HTTP 500 Internal Server Error
at coldfusion.rest.method.dispatch.CFRestException.handleException(CFRestException.java:103)
at coldfusion.rest.method.dispatch.CFInvoker.dispatch(CFInvoker.java:98)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:308)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:291)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1140)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:403)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
at coldfusion.rest.servlet.CFRestServletContainer.service(CFRestServletContainer.java:148)
at coldfusion.rest.servlet.CFRestServletContainer.service(CFRestServletContainer.java:84)
at coldfusion.rest.servlet.CFRestServlet.serviceUsingAlreadyInitializedContainers(CFRestServlet.java:1393)
at coldfusion.rest.servlet.CFRestServlet.invoke(CFRestServlet.java:933)
at coldfusion.rest.servlet.RestFilter.invoke(RestFilter.java:61)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:96)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.rest.servlet.RestWrapRequestFilter.invoke(RestWrapRequestFilter.java:46)
at coldfusion.rest.servlet.CFRestServlet.invoke(CFRestServlet.java:526)
at coldfusion.rest.servlet.CFRestServlet.service(CFRestServlet.java:517)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at coldfusion.rest.method.dispatch.CFExecutionFilter.invoke(CFExecutionFilter.java:47)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:594)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.rest.method.dispatch.CFInvoker.dispatch(CFInvoker.java:90)
... 53 more
And the Postman output:
So, i decided to switch to Update 10, run the same code, and as expected, it worked!
Postman output
Is this the right place to post these types of errors and get an immediate fix from Adobe's support team?
I would appreciate your time and help.
ICL
Copy link to clipboard
Copied
This is a good place to post them, but not a good place to get an immediate fix from Adobe. If you want Adobe to fix the problem, go to https://tracker.adobe.com/ (I think).
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Hi Dave, thanks for your reply.
Have you experienced a similar problem? Any ideas you can share with me to solve it?
ICL
Copy link to clipboard
Copied
Not really. It looks like your Java error says the REST API itself is returning a 500 error. Not sure why that would happen, but again I think going to the bug tracker is probably your best option.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
To "I Castillo", I concur with Dave's responses, but I will add that I think there may be other things to consider before filing a bug report.
Let's see if any of this may get you further, or may give you more to share if you file a bug report.
Copy link to clipboard
Copied
I have a suggestion for the likely cause of the error and another for improvement.
Likely cause of error: ColdFusion expecting the caller to specify the http method. That is, something like
remote Input function echo(required Input payload) httpMethod="POST" {
...
}
Suggestion for improvement (which might or might not be relevant to the issue):
/* Component (Input.cfc) */
component accessors=true {
property type = "string" name = "content" required = true;
}
Copy link to clipboard
Copied
Hi @I Castillo , problem solved?
Copy link to clipboard
Copied
Hi BKBK,
I really appreciate your interest in the subject.
Let me tell you that we have decided to suspend the ColdFusion update for the moment. Later, when we finish the functionalities requested by the client, we will return to consider the update issue. As soon as we have news, I will let you know by this means.
ICL
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more