You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2015/09/05 11:16:04 UTC

Re: Stream Cache / spool file deletion when marshaling to JSON with Jackson

Hi

Which http component do you use for rest-dsl and how is that setup?
Are you using servlet / jetty or restlet etc?

On Mon, Aug 31, 2015 at 10:35 PM, Karts <ka...@gmail.com> wrote:
> Hi,
>
> We just upgraded to Camel 2.15.3 but this issue still remains unfortunately.
>
> Stack trace from 2.15.3 is below:
>
> java.io.FileNotFoundException:
> /tmp/camel/camel-tmp-3b981524-ca86-4989-b74e-1f5655381add/cos8487311535309884732.tmp
> (No such file or directory)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.<init>(FileInputStream.java:146)
>         at
> org.apache.camel.converter.stream.FileInputStreamCache.createInputStream(FileInputStreamCache.java:133)
>         at
> org.apache.camel.converter.stream.FileInputStreamCache.getInputStream(FileInputStreamCache.java:127)
>         at
> org.apache.camel.converter.stream.FileInputStreamCache.read(FileInputStreamCache.java:122)
>         at java.io.InputStream.read(InputStream.java:170)
>         at java.io.InputStream.read(InputStream.java:101)
>         at org.restlet.engine.io.IoUtils.copy(IoUtils.java:106)
>         at
> org.restlet.representation.InputRepresentation.write(InputRepresentation.java:148)
>         at
> org.restlet.engine.adapter.ServerCall.writeResponseBody(ServerCall.java:519)
>         at
> org.restlet.engine.adapter.ServerCall.sendResponse(ServerCall.java:463)
>         at
> org.restlet.ext.servlet.internal.ServletCall.sendResponse(ServletCall.java:430)
>         at
> org.restlet.engine.adapter.ServerAdapter.commit(ServerAdapter.java:196)
>         at
> org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:153)
>         at
> org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1118)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>         at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
>         at
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
>         at
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
>         at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
>         at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
>         at
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
>         at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
>         at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
>         at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>         at org.eclipse.jetty.server.Server.handle(Server.java:497)
>         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
>         at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
>         at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
>         at java.lang.Thread.run(Thread.java:744)
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Stream-Cache-spool-file-deletion-when-marshaling-to-JSON-with-Jackson-tp5769699p5771105.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Re: Stream Cache / spool file deletion when marshaling to JSON with Jackson

Posted by Karts <ka...@gmail.com>.
Confirmed this is working fine now on Camel 2.16. Thanks!



--
View this message in context: http://camel.465427.n5.nabble.com/Stream-Cache-spool-file-deletion-when-marshaling-to-JSON-with-Jackson-tp5769699p5772690.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Stream Cache / spool file deletion when marshaling to JSON with Jackson

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah okay I found room for improvement
https://issues.apache.org/jira/browse/CAMEL-9115

You can try build from source and try 2.15.4-SNAPSHOT

On Sat, Sep 5, 2015 at 3:22 PM, Karts <ka...@gmail.com> wrote:
> Our restConfiguration is as follows:
>
> <restConfiguration component="restlet" host="{{Host}}" contextPath="myPath"
> />
>
> And we have Restlet simply as:
>
>
>         <bean id="RestletComponent" class="org.restlet.Component" />
>
>         <bean id="RestletComponentService"
> class="org.apache.camel.component.restlet.RestletComponent">
>                 <constructor-arg ref="RestletComponent" />
>
>                 <property name="synchronous" value="true" />
>         </bean>
>
>
> The war file sits in a Jetty 9 container.
>
> Thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Stream-Cache-spool-file-deletion-when-marshaling-to-JSON-with-Jackson-tp5769699p5771274.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Re: Stream Cache / spool file deletion when marshaling to JSON with Jackson

Posted by Karts <ka...@gmail.com>.
Our restConfiguration is as follows:

<restConfiguration component="restlet" host="{{Host}}" contextPath="myPath"
/>

And we have Restlet simply as:

	
	<bean id="RestletComponent" class="org.restlet.Component" />

	<bean id="RestletComponentService"
class="org.apache.camel.component.restlet.RestletComponent">
		<constructor-arg ref="RestletComponent" />
		
		<property name="synchronous" value="true" /> 
	</bean>
	

The war file sits in a Jetty 9 container.

Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Stream-Cache-spool-file-deletion-when-marshaling-to-JSON-with-Jackson-tp5769699p5771274.html
Sent from the Camel - Users mailing list archive at Nabble.com.