ColdFusion ImagePaste 500 error - function

I just started getting a 500 error on a site using the cf ImagePaste() function.
<cfscript> ImagePaste(image, watermark, 0, 0); </cfscript>
<cfset ImagePaste(image, watermark, 0, 0) />
I've tried it both ways above
The full source of the function is below - it works fine with the imagepaste commented out.
<cffunction name="watermark" access="public"
description="adds the carproof logo to a jpeg" output="yes" returntype="any">
<cfargument name="path" required="yes" type="string" default="" />
<cfargument name="filename" required="yes" type="string" />
<cfimage source="#path##filename#" name="image">
<cfimage source="#basepath#../Images/carproof-watermark.png"
name="watermark">
<!---cfscript> ImagePaste(image, watermark, 1, 1); </cfscript--->
<cfimage action="write" destination="#path##filename#"
source="#image#" overwrite="yes" />
</cffunction>
Here is the error I get:
500
ROOT CAUSE:
coldfusion.runtime.EventHandlerException: Event handler exception.
at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:251)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:278)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
at coldfusion.CfmServlet.service(CfmServlet.java:198)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: java.lang.ExceptionInInitializerError
at coldfusion.image.Image.paste(Image.java:2307)
at coldfusion.runtime.CFPage.ImagePaste(CFPage.java:5877)
at cffile2ecfm1620657721$funcWATERMARK.runFunction(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/Assets/CFC/file.cfm:19)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471)
at cffile2ecfm1620657721$funcUPLOAD.runFunction(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/Assets/CFC/file.cfm:91)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471)
at cfimage2dupload2dtest2ecfm664365309.runPage(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/Assets/XHTML/image-upload-test.cfm:10)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:483)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)
at cfindex2ecfm1182266435.runPage(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/index.cfm:27)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:483)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)
at cfApplication2ecfc1506803272$funcONREQUEST.runFunction(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/Application.cfc:130)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:448)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:74)
at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:243)
... 27 more
Caused by: java.lang.NullPointerException
at com.sun.media.jai.util.PropertyUtil.getString(PropertyUtil.java:159)
at javax.media.jai.JaiI18N.getString(JaiI18N.java:22)
at javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:357)
at javax.media.jai.JAI.<clinit>(JAI.java:560)
... 63 more
javax.servlet.ServletException: ROOT CAUSE:
coldfusion.runtime.EventHandlerException: Event handler exception.
at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:251)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:278)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
at coldfusion.CfmServlet.service(CfmServlet.java:198)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: java.lang.ExceptionInInitializerError
at coldfusion.image.Image.paste(Image.java:2307)
at coldfusion.runtime.CFPage.ImagePaste(CFPage.java:5877)
at cffile2ecfm1620657721$funcWATERMARK.runFunction(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/Assets/CFC/file.cfm:19)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471)
at cffile2ecfm1620657721$funcUPLOAD.runFunction(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/Assets/CFC/file.cfm:91)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471)
at cfimage2dupload2dtest2ecfm664365309.runPage(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/Assets/XHTML/image-upload-test.cfm:10)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:483)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)
at cfindex2ecfm1182266435.runPage(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/index.cfm:27)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:483)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)
at cfApplication2ecfc1506803272$funcONREQUEST.runFunction(/var/www/vhosts/newride.ca/subdomains/admin/httpdocs/Application.cfc:130)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:448)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:74)
at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:243)
... 27 more
Caused by: java.lang.NullPointerException
at com.sun.media.jai.util.PropertyUtil.getString(PropertyUtil.java:159)
at javax.media.jai.JaiI18N.getString(JaiI18N.java:22)
at javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:357)
at javax.media.jai.JAI.<clinit>(JAI.java:560)
... 63 more
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:70)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

tested other image functions, some
work & some don't:
Many image functions use JAI. So given the message Could not initialize class javax.media.jai.JAI it makes sense those functions would not work either. First I would make sure the class path did not get mucked up (missing jar, too many jars, etc..). That is the most common cause of problems.
But java.lang.NoClassDefFoundError errors are a pain to figure out. Just guesswork, but looking closer it might be initialization problem Caused by: java.lang.ExceptionInInitializerError. I know JAI reads some property files from the jars when starting up. Maybe they are not accessible for some reason (missing, permissions, ..)? I am not running Centos. So that is my best guess for now.

Might be time to offload image manipulation to a 3rd party binary.
Imagemagick, pil, gd etc.
Are you running CF on OS X? (as we do)
The JAI library that ships with OS X's Java is an older version compared to the latest on my Windows machine. Some image editing features, for us, simply dont work on our Mac dev environments, but work perfectly in their Windows equivalents.

Related

Liberty Server :It is not valid to call the 'commit' method on a nontransacted session

I'm moving from WAS8 to Liberty. Following is my code:
connection = factory.createConnection();
session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
When I run my application it gives error saying:
DetailedIllegalStateException: JMSCC0014: It is not valid to call the 'commit' method on a nontransacted session.
Server.xml
<variable name="wmqJmsClient.rar.location"
value="${server.config.dir}/wmq/wmq.jmsra.rar"/>
<jmsConnectionFactory jndiName="jms/xyz/QCF" >
<properties.wmqJms
transportType="CLIENT"
hostName="host3153.GOT.NET"
port="1414"
channel="CLIENTS.xyz"
queueManager="host141Q"/>
<connectionManager maxPoolSize="10"/>
</jmsConnectionFactory>
<jmsQueue id="jms/queue1" jndiName="jms/xyz/queue/response">
<properties.wmqJms
baseQueueName="host1533A.RESP"
baseQueueManagerName="host141Q" CCSID="1208" expiry="APP" failIfQuiesce="true" persistence="APP" priority="APP" putAsyncAllowed="ENABLED" readAheadAllowed="ENABLED" readAheadClosePolicy="ALL" receiveConversion="QMGR" targetClient="JMS" receiveCCSID="1208" />
</jmsQueue>
<jmsQueue id="jms/queue2" jndiName="jms/xyz/queue/transportAssignment/request">
<properties.wmqJms
baseQueueName="host1533A.RQST"
baseQueueManagerName="host141Q" CCSID="1208" expiry="APP" failIfQuiesce="true" persistence="APP" priority="APP" putAsyncAllowed="ENABLED" readAheadAllowed="ENABLED" readAheadClosePolicy="ALL" receiveConversion="QMGR" targetClient="JMS" receiveCCSID="1208" />
</jmsQueue>

I am trying to do the function add one month to the current month in JSP and show the result in textbook in html

This is my input box that should show date in one month.
<div class="form-group">
<label for="datum_uplate">Datum isteka:</label>
<input type="date" class="form-control" id="datum_isteka" name="datum_isteka" >
This is my jsp code, I don't want to use javascript for security reasons.
<%
LocalDateTime.now().plusMonths(1);
int months = int.Parse("datum_isteka".toString());
LocalDateTime newDate = LocalDateTime.now().plusMonths(months);
%>
And when I launch my tomcat this is what comes up:
Type Exception Report
Message java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:176)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:380)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Root Cause
java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
java.net.URLClassLoader.findClass(URLClassLoader.java:381)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:129)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:60)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:171)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:380)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Note The full stack trace of the root cause is available in the server logs.
You are getting the error because of the below line:
int months = int.Parse("datum_isteka".toString());
The syntax that you are using will not work in Java.
If I am thinking correct, you are trying to get the input value and want evaluate in the jsp, which not possible because jsp code will executed way before you can see the html content in browser.
If you don't want use JavaScript in your code then to get the textbox value you need to submit the page like below:
<!-- here I am using post method, coz I dont want users to see the content in the browser -->
<form method="post" action="index.jsp">
<div class="form-group">
<label for="datum_uplate">Datum isteka:</label>
<input type="date" class="form-control" id="datum_isteka" name="datum_isteka" >
<input type="submit" value="Get Months">
</form>
<%
// to get the you use the java code
if (request.getParameter("datum_isteka") != null ) {
LocalDateTime.now().plusMonths(1);
//int months = int.Parse("datum_isteka".toString());
int months = Integer.parseInt(request.getParameter("datum_isteka")); // here you may need to handle empty string, `parseInt` method will throw error if the given value is empty, i.e; `datum_isteka` textbox value.
LocalDateTime newDate = LocalDateTime.now().plusMonths(months);
}
%>
Now the newDate will have the required value.

Connect to remote API using ColdFusion cfhttp

I am trying to connect to the emma api using ColdFusion. Using the below code. Trying to get a listing of all members in an account as per api docs doing the below. I keep getting status code of 404 on the below call. Any ideas on what I am missing here?
<cfset account_id= '123'/>
<cfset public_key = 'abc'/>
<cfset private_key = 'xyz' />
<cfset the_url = 'https://app.e2ma.net/#account_id#/members/' />
<cfhttp url="#the_url#" method="get" result="Results" timeout="999">
<cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded" />
<cfhttpparam type="header" name="Accept" value="application/json" />
<cfhttpparam type="header" name="public_api_key" value="#public_key#" >
<cfhttpparam type="header" name="private_api_key" value="#private_key#" >
</cfhttp>
<cfdump var="#Results#"/>
Here are the results of the cfdump:
It looks like you're using the wrong endpoint. In their documentation they say the following:
The endpoint for all of our API calls is https://api.e2ma.net/
In your code you're using app.e2ma.net, this should be api.e2ma.net instead.
Also the path for the URL you're requesting doesn't include a trailing slash in their documentation (GET /#account_id/members is what they have). You may also want to update that.

Spring integration tcp outbound and http inbound don t work properly

Hey I am sitting in front of Spring Integration for several days without speedy progress. Hope you can help me:
My trace:
Client.Input (POJO)
-> Client.[tcp-outbound].defaultserializer
-> Server.[tcp-inbound].defaultserializer
-> Server.[http-outbound] -> transform(POJO-to-Json)
-> Spring MVC Controller : return same POJO (automatic transform to json)
-> Server -> transform(Json-to-POJO)
-> Server -> defaultserializer
-> Client -> defaultserializer
Here the configuration:
Client-Side:
<int:channel id="input" />
<int-ip:tcp-connection-factory id="client"
type="client"
host="192.168.178.28"
port="5678"
serializer="javaSerializer"
deserializer="javaDeserializer"/>
<int-ip:tcp-outbound-gateway id="outboundGateway"
request-channel="input"
connection-factory="client"
request-timeout="10000"
reply-timeout="10000"/>
Server-Side:
<int-ip:tcp-connection-factory id="connectionFactory"
type="server"
port="6000"
serializer="javaSerializer"
deserializer="javaDeserializer"/>
<int-ip:tcp-inbound-gateway id="inboundGateway"
connection-factory="connectionFactory"
request-channel="requestChannel"
reply-channel="outboundChannel"/>
<int:channel id="requestChannel" />
<int:channel id="toMvcChannel" />
<int:channel id="toTcpChannel" />
<int:channel id="outboundChannel" />
<int:object-to-json-transformer input-channel="requestChannel"
output-channel="toMvcChannel"/>
<int:header-enricher input-channel="toMvcChannel">
<int:header name="Content-Type" value="application/json" />
</int:header-enricher>
<int-http:outbound-gateway
url="http://localhost:10100/arx/dataset/receiveGateway"
request-channel="toMvcChannel"
reply-channel="toTcpChannel"/>
<int:json-to-object-transformer input-channel="toTcpChannel"
output-channel="outboundChannel"/>
SimpleGateway:
public interface SimpleGateway {
public DefinitionServer send(DefinitionServer definition);}
I cannot understand why I get the error message below on Client side ON RECEIVE (last step in the routing):
No converter found capable of converting from type [java.lang.String] to type [...DefinitionServer]
Thanks in advance!

Show request in Camel route

Is there any way to log request from body in camel route?
<camel:log message="RequestType [${request.body.request}]" loggingLevel="INFO" />
Error in logs:
Caused by: org.apache.camel.language.simple.types.SimpleParserException: Unknown function: request.body.request
This is working part, but dunno how to get into field :
<camel:log message="RequestType ${in.body}" loggingLevel="INFO" />
<camel:log message="RequestType2 [${body}]" loggingLevel="INFO" />
Request field for sure it's not empty becaue later I'm checking it:
<camel:ognl>request.body.request instanceof ...
Try with
<camel:log message="RequestType [${body.request}]" loggingLevel="INFO" />
The camel:log is using the simple language which you can read more about here: http://camel.apache.org/simple