Closed KaiHufenbach closed 10 years ago
So you are setting an attribute with BigDecimal? Something is broken in your enviroment as Atmosphere receive that value from the browser as a String. Can you turn the log to trace and paste it here?
that was fast :-)
6868 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
6868 [localhost-startStop-1] INFO org.atmosphere.cpr.DefaultAnnotationProcessor - AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
6868 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.BroadcasterListenerServiceProcessor associated with interface org.atmosphere.config.service.BroadcasterListenerService
6868 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.AsyncSupportListenerServiceProcessor associated with interface org.atmosphere.config.service.AsyncSupportListenerService
6868 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.WebSocketProcessorServiceProcessor associated with interface org.atmosphere.config.service.WebSocketProcessorService
6868 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.EndpointMapperServiceProcessor associated with interface org.atmosphere.config.service.EndpoinMapperService
6868 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.AtmosphereInterceptorServiceProcessor associated with interface org.atmosphere.config.service.AtmosphereInterceptorService
6868 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.BroadcasterFactoryServiceProcessor associated with interface org.atmosphere.config.service.BroadcasterFactoryService
6868 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.BroadcasterCacheServiceProcessor associated with interface org.atmosphere.config.service.BroadcasterCacheService
6868 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.AsyncSupportServiceProcessor associated with interface org.atmosphere.config.service.AsyncSupportService
6869 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.BroadcasterCacheInspectorServiceProcessor associated with interface org.atmosphere.config.service.BroadcasterCacheInspectorService
6869 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.WebSocketProtocolServiceProcessor associated with interface org.atmosphere.config.service.WebSocketProtocolService
6869 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.AtmosphereHandlerServiceProcessor associated with interface org.atmosphere.config.service.AtmosphereHandlerService
6869 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.AtmosphereServiceProcessor associated with interface org.atmosphere.config.service.AtmosphereService
6869 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.MeteorServiceProcessor associated with interface org.atmosphere.config.service.MeteorService
6869 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.BroadcastFilterServiceProcessor associated with interface org.atmosphere.config.service.BroadcasterFilterService
6869 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.ManagedServiceProcessor associated with interface org.atmosphere.config.service.ManagedService
6869 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.BroadcasterServiceProcessor associated with interface org.atmosphere.config.service.BroadcasterService
6869 [localhost-startStop-1] TRACE org.atmosphere.cpr.AnnotationHandler - Processor class org.atmosphere.annotation.WebSocketHandlerServiceProcessor associated with interface org.atmosphere.config.service.WebSocketHandlerService
6870 [localhost-startStop-1] DEBUG org.atmosphere.cpr.AtmosphereFramework - Scanning all classes on the classpath
6870 [localhost-startStop-1] WARN org.atmosphere.cpr.DefaultAnnotationProcessor - Unable to detect annotations. Application may fail to deploy.
6871 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting atmosphere handlers /WEB-INF/classes/
6953 [localhost-startStop-1] TRACE org.atmosphere.cpr.AtmosphereFramework -
java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
at org.atmosphere.cpr.AtmosphereFramework.detectSupportedFramework(AtmosphereFramework.java:1119)
at org.atmosphere.cpr.AtmosphereFramework.loadConfiguration(AtmosphereFramework.java:1095)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:654)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:561)
at org.atmosphere.cpr.AtmosphereServlet.configureFramework(AtmosphereServlet.java:88)
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:77)
at org.atmosphere.cpr.MeteorServlet.init(MeteorServlet.java:122)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
6954 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting WebSocketHandler in /WEB-INF/classes/
6966 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
6974 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Installing Default AtmosphereInterceptor
6975 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.DefaultHeadersInterceptor : Default Response's Headers Interceptor
6976 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
6976 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
6976 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
6976 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
6978 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
6978 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
6978 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
6982 [localhost-startStop-1] WARN org.atmosphere.cpr.AtmosphereFramework - No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache
6982 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Broadcaster Polling Wait Time 100
6982 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Shared ExecutorService supported: true
6982 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - HttpSession supported: false
6982 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
6982 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
6982 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Using Broadcaster: org.atmosphere.cpr.DefaultBroadcaster
6982 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using async support: org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket running under container: Apache Tomcat/7.0.47
6983 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere Framework 2.0.3 started.
6983 [localhost-startStop-1] INFO org.atmosphere.cpr.AtmosphereFramework -
For Atmosphere Framework Commercial Support, visit
http://www.async-io.org/ or send an email to support@async-io.org
6983 [localhost-startStop-1] INFO org.atmosphere.cpr.MeteorServlet - Installed Filter/Meteor org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter mapped to /*
6986 [localhost-startStop-1] TRACE org.atmosphere.cpr.DefaultBroadcasterFactory - About to create /*
6986 [localhost-startStop-1] TRACE org.atmosphere.cpr.DefaultBroadcasterFactory - Looking in the store using /* returned null
7005 [localhost-startStop-1] TRACE org.atmosphere.util.ServletProxyFactory - Method setHeader not supported
7011 [localhost-startStop-1] TRACE org.atmosphere.cpr.DefaultBroadcaster - /* new lifecycle policy: NEVER
7011 [localhost-startStop-1] TRACE org.atmosphere.cpr.DefaultBroadcasterFactory - About to create /*
7011 [localhost-startStop-1] TRACE org.atmosphere.cpr.DefaultBroadcasterFactory - Looking in the store using /* returned null
7012 [localhost-startStop-1] TRACE org.atmosphere.cpr.DefaultBroadcasterFactory - Broadcaster /* was created
Name: /*
AtmosphereResource: 0
BroadcasterCache org.atmosphere.cache.DefaultBroadcasterCache@32eb4188
46784 [http-bio-8080-exec-3] TRACE org.atmosphere.cpr.AtmosphereFramework - Query String translated to headers {}
46785 [http-bio-8080-exec-3] WARN org.atmosphere.cpr.AtmosphereFramework - Failed using comet support: org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket, error: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.You must use the atmosphere-native-runtime dependency in order to use native Comet Support
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat7.jar Is the NIO or APR Connector enabled?
46785 [http-bio-8080-exec-3] ERROR org.atmosphere.cpr.AtmosphereFramework - If you have more than one Connector enabled, make sure they both use the same protocol, e.g NIO/APR or HTTP for all. If not, org.atmosphere.container.BlockingIOCometSupport will be used and cannot be changed.
46785 [http-bio-8080-exec-3] TRACE org.atmosphere.cpr.AtmosphereFramework - Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.You must use the atmosphere-native-runtime dependency in order to use native Comet Support
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat7.jar
java.lang.IllegalStateException: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.You must use the atmosphere-native-runtime dependency in order to use native Comet Support
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat7.jar
at org.atmosphere.container.Tomcat7CometSupport.<clinit>(Tomcat7CometSupport.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.atmosphere.cpr.DefaultAsyncSupportResolver.newCometSupport(DefaultAsyncSupportResolver.java:252)
at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolveWebSocket(DefaultAsyncSupportResolver.java:315)
at org.atmosphere.cpr.DefaultAsyncSupportResolver.resolve(DefaultAsyncSupportResolver.java:301)
at org.atmosphere.cpr.AtmosphereFramework.autoDetectContainer(AtmosphereFramework.java:1471)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:658)
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:561)
at org.atmosphere.cpr.AtmosphereServlet.configureFramework(AtmosphereServlet.java:88)
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:77)
at org.atmosphere.cpr.MeteorServlet.init(MeteorServlet.java:122)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
46787 [http-bio-8080-exec-3] WARN org.atmosphere.cpr.AtmosphereFramework - Using org.atmosphere.container.Tomcat7BIOSupportWithWebSocket
46791 [http-bio-8080-exec-3] TRACE org.atmosphere.util.DefaultEndpointMapper - Trying to map /[a-zA-Z0-9-&\.*_~=@;\\?]+ to /test/87/bla/all/all
46791 [http-bio-8080-exec-3] TRACE org.atmosphere.util.DefaultEndpointMapper - Trying to map /[a-zA-Z0-9-&\.*_~=@;\\?]+ to /test/87/bla/all
46792 [http-bio-8080-exec-3] TRACE org.atmosphere.util.DefaultEndpointMapper - Trying to map /[a-zA-Z0-9-&\.*_~=@;\\?]+ to /test/87/bla/all*
46792 [http-bio-8080-exec-3] TRACE org.atmosphere.util.DefaultEndpointMapper - Trying to map /[a-zA-Z0-9-&\.*_~=@;\\?]+ to /test/87/bla
46792 [http-bio-8080-exec-3] TRACE org.atmosphere.util.DefaultEndpointMapper - Trying to map /[a-zA-Z0-9-&\.*_~=@;\\?]+ to /test/87
46792 [http-bio-8080-exec-3] TRACE org.atmosphere.util.DefaultEndpointMapper - Trying to map /[a-zA-Z0-9-&\.*_~=@;\\?]+ to /test
46792 [http-bio-8080-exec-3] TRACE org.atmosphere.util.DefaultEndpointMapper - Mapped /[a-zA-Z0-9-&\.*_~=@;\\?]+ to AtmosphereHandlerWrapper{ atmosphereHandler=ReflectorServletProcessor, broadcaster=
Name: /*
AtmosphereResource: 0
BroadcasterCache org.atmosphere.cache.DefaultBroadcasterCache@32eb4188 }
46896 [http-bio-8080-exec-3] TRACE org.atmosphere.cpr.AtmosphereFramework - Query String translated to headers {}
Nov 08, 2013 1:04:10 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet MeteorServlet threw exception
java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.String
at org.atmosphere.cpr.AtmosphereRequest.getHeader(AtmosphereRequest.java:311)
at org.atmosphere.cpr.AtmosphereRequest.getHeader(AtmosphereRequest.java:291)
at org.atmosphere.cpr.AtmosphereFramework.configureRequestResponse(AtmosphereFramework.java:1639)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1683)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:198)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:184)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)
at io.vaado.tech.struts.interceptor.RestStyleInterceptor.intercept(RestStyleInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:161)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at io.vaado.tech.struts.interceptor.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:112)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:563)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:155)
at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:132)
at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:359)
at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:204)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:239)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:164)
at org.atmosphere.container.BlockingIOCometSupport.service(BlockingIOCometSupport.java:99)
at org.atmosphere.container.Tomcat7BIOSupportWithWebSocket.doService(Tomcat7BIOSupportWithWebSocket.java:67)
at org.atmosphere.container.TomcatWebSocketUtil.doService(TomcatWebSocketUtil.java:95)
at org.atmosphere.container.Tomcat7BIOSupportWithWebSocket.service(Tomcat7BIOSupportWithWebSocket.java:62)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1705)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:198)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:184)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Nov 08, 2013 1:04:10 AM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Exception occurred during processing request: java.math.BigDecimal cannot be cast to java.lang.String
java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.String
at org.atmosphere.cpr.AtmosphereRequest.getHeader(AtmosphereRequest.java:311)
at org.atmosphere.cpr.AtmosphereRequest.getHeader(AtmosphereRequest.java:291)
at org.atmosphere.cpr.AtmosphereFramework.configureRequestResponse(AtmosphereFramework.java:1639)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1683)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:198)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:184)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)
at io.vaado.tech.struts.interceptor.RestStyleInterceptor.intercept(RestStyleInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:161)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at io.vaado.tech.struts.interceptor.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:112)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:563)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:155)
at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:132)
at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:359)
at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:204)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:239)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:164)
at org.atmosphere.container.BlockingIOCometSupport.service(BlockingIOCometSupport.java:99)
at org.atmosphere.container.Tomcat7BIOSupportWithWebSocket.doService(Tomcat7BIOSupportWithWebSocket.java:67)
at org.atmosphere.container.TomcatWebSocketUtil.doService(TomcatWebSocketUtil.java:95)
at org.atmosphere.container.Tomcat7BIOSupportWithWebSocket.service(Tomcat7BIOSupportWithWebSocket.java:62)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:1705)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:198)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:184)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
46905 [http-bio-8080-exec-3] TRACE org.atmosphere.cpr.AsynchronousProcessor - Action for 7ef026de-6496-4faf-9b8c-5ab341ac27f9 was Action{timeout=-1, type=CREATED} with transport null
46907 [http-bio-8080-exec-3] TRACE org.atmosphere.cpr.AsyncSupportListenerAdapter - Destroyed resource AtmosphereResource{
uuid=7ef026de-6496-4faf-9b8c-5ab341ac27f9,
transport=UNDEFINED,
isInScope=true,
isResumed=false,
isCancelled=false,
isSuspended=false,
broadcaster=/* size: 0,
atmosphereHandler=ReflectorServletProcessor,
action=Action{timeout=-1, type=CREATED}} for request 7ef026de-6496-4faf-9b8c-5ab341ac27f9
Perhaps its worth to mention: There is no meteor created in the struts action (test/87/bla). Edit: Even in an action with creation of a comet it fails :-(
Edit:
I think I found out why this happens:
Meteor uses the StrutsPrepareAndExecuteFilter as a parameter so getAttribute is passed to Struts (I do not know why):
StrutsRequestWrapper line 97:
if (stack != null) {
attribute = stack.findValue(key);
}
Which does OGNL stuff and ends up in:
OgnlOps line 287:
public static BigDecimal bigDecValue(Object value)
throws NumberFormatException
{
if (value == null) return BigDecimal.valueOf(0L);
Class c = value.getClass();
if (c == BigDecimal.class) return (BigDecimal) value;
if (c == BigInteger.class) return new BigDecimal((BigInteger) value);
if (c == Boolean.class) return BigDecimal.valueOf(((Boolean) value).booleanValue() ? 1 : 0);
if (c == Character.class) return BigDecimal.valueOf(((Character) value).charValue());
return new BigDecimal(stringValue(value, true));
}
Hum it seems Struts is faulty here...why does it chang ethe value from String to BigDecimal? I need to reproduce the issue.
You should have a glance at the StrutsRequestWrapper. (attached below) To avoid changing behaviour for getType() you can set:
<constant name="struts.disableRequestAttributeValueStackLookup" value="true"/>
in your struts.xml, but this will change the behaviour to plain JSP return (instead of rendered html), even if a struts action is sucessfully executed.
/**
* <!-- START SNIPPET: javadoc -->
*
* All Struts requests are wrapped with this class, which provides simple JSTL accessibility. This is because JSTL
* works with request attributes, so this class delegates to the value stack except for a few cases where required to
* prevent infinite loops. Namely, we don't let any attribute name with "#" in it delegate out to the value stack, as it
* could potentially cause an infinite loop. For example, an infinite loop would take place if you called:
* request.getAttribute("#attr.foo").
*
* <!-- END SNIPPET: javadoc -->
*
*/
public class StrutsRequestWrapper extends HttpServletRequestWrapper {
private static final String REQUEST_WRAPPER_GET_ATTRIBUTE = "__requestWrapper.getAttribute";
private final boolean disableRequestAttributeValueStackLookup;
/**
* The constructor
* @param req The request
*/
public StrutsRequestWrapper(HttpServletRequest req) {
this(req, false);
}
/**
* The constructor
* @param req The request
* @param disableRequestAttributeValueStackLookup flag for disabling request attribute value stack lookup (JSTL accessibility)
*/
public StrutsRequestWrapper(HttpServletRequest req, boolean disableRequestAttributeValueStackLookup) {
super(req);
this.disableRequestAttributeValueStackLookup = disableRequestAttributeValueStackLookup;
}
/**
* Gets the object, looking in the value stack if not found
*
* @param key The attribute key
*/
public Object getAttribute(String key) {
if (key == null) {
throw new NullPointerException("You must specify a key value");
}
if (disableRequestAttributeValueStackLookup || key.startsWith("javax.servlet")) {
// don't bother with the standard javax.servlet attributes, we can short-circuit this
// see WW-953 and the forums post linked in that issue for more info
return super.getAttribute(key);
}
ActionContext ctx = ActionContext.getContext();
Object attribute = super.getAttribute(key);
if (ctx != null && attribute == null) {
boolean alreadyIn = isTrue((Boolean) ctx.get(REQUEST_WRAPPER_GET_ATTRIBUTE));
// note: we don't let # come through or else a request for
// #attr.foo or #request.foo could cause an endless loop
if (!alreadyIn && !key.contains("#")) {
try {
// If not found, then try the ValueStack
ctx.put(REQUEST_WRAPPER_GET_ATTRIBUTE, Boolean.TRUE);
ValueStack stack = ctx.getValueStack();
if (stack != null) {
attribute = stack.findValue(key);
}
} finally {
ctx.put(REQUEST_WRAPPER_GET_ATTRIBUTE, Boolean.FALSE);
}
}
}
return attribute;
}
}
Where I'm lost is Atmosphere doesn't set any BigDecimal, but String. So it seems Struts reset the value from a String to a BigDecimal...that makes no sense. I can catch the exception, but clearly I need to understand why Struts is wrongly resetting the value.
Well..
Atmosphere does not read directly. It uses the underlying filter. Struts does not change the value, it just wraps the return value in the method I gave you. Try changing the parameter in the post before, you will see the magic happen.
Is there a possibility to access the values directly or: call ..toString() on the values :-)
But a BigDecimal.toString will gives all kind of shitty results. The fact that the property is wrapped makes no sense for other Framework IMO. Who wrote that crazy code :-)
hmmm...
do you have to use the underlying filter for request to params? I mean you are the first one who gets the request, so you could save the params and access them directly...
Based on the stack trace, the request is wrapped much before Atmosphere gets invoked. So I could navigate the request's wrap, but still Struts is quite broken IMO
You should... otherwise you are not guaranteed, that frameworks might override getters (like Struts...)
Kind of agree...but Atmosphere is used in a lot of framework and never faced such craziness....will take a look.
Ok fixed. Try 2.0.4-SNAPSHOT or 2.1.0-SNAPSHOT
On Version 2.0.3 native. Same Issue with 2.1.0
Using Meteor with Meteor Servlet and Struts2.
Line 311 in AtmosphereRequest causes the error:
if (s.startsWith(X_ATMOSPHERE) && isNotNoOps()) { name = (String) b.request.getAttribute(s); }