Wierd ClassCastException on WebAPI calls

On certain browsers and client’s I’ve seen a wierd ClassCastException thrown from the server.
The status returned is 500.
But this happens only on certain clients in IE8 and Android ICS.
It works fine with Chrome, Firefox etc.

May be its related to accept header and the mimeType its sending for text/html. But this is only a wild guess.
Will be good to fix before the 2.13 release.

···

Regards,
Saptarshi PURKAYASTHA

Hi Sap,

Do you have a stacktrace or something we can use as a starting point?

···


Morten

On Mon, Oct 14, 2013 at 12:57 PM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

On certain browsers and client’s I’ve seen a wierd ClassCastException thrown from the server.
The status returned is 500.
But this happens only on certain clients in IE8 and Android ICS.
It works fine with Chrome, Firefox etc.

May be its related to accept header and the mimeType its sending for text/html. But this is only a wild guess.
Will be good to fix before the 2.13 release.


Regards,
Saptarshi PURKAYASTHA


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Apache Tomcat/7.0.30 - Error report Here is a stack trace of Saptarshi's problem (also happens on my IE)

Apache Tomcat/7.0.30 - Error report

  HTTP Status 500 - Request processing failed; nested exception is
  java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources
  cannot be cast to org.hisp.dhis.common.IdentifiableObject

···

------------------------------------------------------------------------

*type* Exception report

*message* _Request processing failed; nested exception is java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject_

*description* _The server encountered an internal error that prevented it from fulfilling this request._

*exception*

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
  org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:55)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:113)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
  org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
  org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
  org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
  org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

*root cause*

java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject
  org.hisp.dhis.api.view.AbstractGridView.renderMergedOutputModel(AbstractGridView.java:113)
  org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263)
  org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
  org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
  org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
  org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:55)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:113)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
  org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
  org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
  org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
  org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
  org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

*note* _The full stack trace of the root cause is available in the Apache Tomcat/7.0.30 logs._

------------------------------------------------------------------------

      Apache Tomcat/7.0.30

On 14.10.2013 13:30, Morten Olav Hansen wrote:

Hi Sap,

Do you have a stacktrace or something we can use as a starting point?

--
Morten

On Mon, Oct 14, 2013 at 12:57 PM, Saptarshi Purkayastha > <sunbiz@gmail.com <mailto:sunbiz@gmail.com>> wrote:

    On certain browsers and client's I've seen a wierd
    ClassCastException thrown from the server.
    The status returned is 500.
    But this happens only on certain clients in IE8 and Android ICS.
    It works fine with Chrome, Firefox etc.

    May be its related to accept header and the mimeType its sending
    for text/html. But this is only a wild guess.
    Will be good to fix before the 2.13 release.

    ---
    Regards,
    Saptarshi PURKAYASTHA

    _______________________________________________
    Mailing list: https://launchpad.net/~dhis2-devs
    <https://launchpad.net/~dhis2-devs>
    Post to : dhis2-devs@lists.launchpad.net
    <mailto:dhis2-devs@lists.launchpad.net>
    Unsubscribe : https://launchpad.net/~dhis2-devs
    <https://launchpad.net/~dhis2-devs>
    More help : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

That looks really strange. What is the request you are doing? is it just /api? Resources are definitely not a idObject

···


Morten

On Mon, Oct 14, 2013 at 2:46 PM, Lars Kristian Roland lars@roland.bz wrote:

  Here is a stack trace of Saptarshi's problem (also happens on my IE)

HTTP Status 500 - Request processing failed; nested exception is java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject


type Exception report

message Request processing failed; nested exception is java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject

description The server encountered an internal error that prevented it from fulfilling this request.

exception

	org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:55) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

	java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject org.hisp.dhis.api.view.AbstractGridView.renderMergedOutputModel(AbstractGridView.java:113) org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263) org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208) org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:55) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.30 logs.


Apache Tomcat/7.0.30

  On 14.10.2013 13:30, Morten Olav Hansen wrote:

Hi Sap,

      Do you have a stacktrace or something we can use as a starting point?
_______________________________________________ Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

        Morten

      On Mon, Oct 14, 2013 at 12:57 PM, Saptarshi Purkayastha <sunbiz@gmail.com> wrote:
              On certain browsers and client's I've seen a wierd ClassCastException thrown from the server.

              The status returned is 500.

              But this happens only on certain clients in IE8 and Android ICS.

              It works fine with Chrome, Firefox etc.



              May be its related to accept header and the mimeType its sending for text/html. But this is only a wild guess.

              Will be good to fix before the 2.13 release.



              ---

              Regards,

              Saptarshi PURKAYASTHA
        _______________________________________________

        Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

        Post to     : dhis2-devs@lists.launchpad.net

        Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/%7Edhis2-devs)

        More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

See attached pic. It is towards apps.dhis2.org/dev/api/resources

Clicking refresh in the browser (spooky), brings a different page. Not quite as expected either, but with no exception:

{“resources”:[{“name”:“AttributeTypes”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:"http://apps.dhis2.org/dev/api/attributeTypes"},{“name”:“Categories”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/dimensions”},{“name”:“CategoryCombos”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/categoryCombos”},{“name”:“CategoryOptionCombos”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/categoryOptionCombos”},{“name”:“CategoryOptions”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/categoryOptions”},{“name”:“Charts”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/charts”},{“name”:“Concepts”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/concepts”},{“name”:“Constants”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/constants”},{“name”:“Dashboards”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/dashboards”},{“name”:“DataDictionaries”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/dataDictionaries”},{“name”:“DataElementGroupSets”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/dimensions”},{“name”:“DataElementGroups”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/dataElementGroups”},{“name”:“DataElementOperands”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/dataElementOperands”},{“name”:“DataElements”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/dataElements”},{“name”:“DataSets”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/dataSets”},{“name”:“Dimensions”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/dimensions”},{“name”:“Documents”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/documents”},{“name”:“IndicatorGroupSets”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/indicatorGroupSets”},{“name”:“IndicatorGroups”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/indicatorGroups”},{“name”:“IndicatorTypes”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/indicatorTypes”},{“name”:“Indicators”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/indicators”},{“name”:“Interpretations”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:“http://apps.dhis2.org/dev/api/interpretations”},{“name”:“MapLayers”,“methods”:[“GET”],“mediaTypes”:[“text/html”,“application/json”,“application/xml”,“application/javascript”],“href”:"http://apps.dhis2.org/dev/api/mapLayers

yea, its just /api/resources
If you have access to one of the uio desktops and try the IE8 in that, you can replicate it as well

···

Regards,
Saptarshi PURKAYASTHA


From: mortenoh@gmail.com
Date: Mon, 14 Oct 2013 14:49:32 +0200
To: lars@roland.bz
CC: dhis2-devs@lists.launchpad.net
Subject: Re: [Dhis2-devs] Wierd ClassCastException on WebAPI calls

That looks really strange. What is the request you are doing? is it just /api? Resources are definitely not a idObject


Morten

On Mon, Oct 14, 2013 at 2:46 PM, Lars Kristian Roland lars@roland.bz wrote:

  Here

is a stack trace of Saptarshi’s problem (also happens on my IE)

HTTP Status 500 - Request processing failed; nested exception

is java.lang.ClassCastException:
org.hisp.dhis.api.webdomain.Resources cannot be cast to
org.hisp.dhis.common.IdentifiableObject


type Exception report

  **message**           Request processing failed; nested exception

is java.lang.ClassCastException:
org.hisp.dhis.api.webdomain.Resources cannot be cast to
org.hisp.dhis.common.IdentifiableObject

  **description**           The server encountered an internal error

that prevented it from fulfilling this request.

  **exception**
	org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:55)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

	java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject
org.hisp.dhis.api.view.AbstractGridView.renderMergedOutputModel(AbstractGridView.java:113)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:55)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

note The full stack trace of the root cause is
available in the Apache Tomcat/7.0.30 logs.


Apache Tomcat/7.0.30

  On

14.10.2013 13:30, Morten Olav Hansen wrote:

Hi Sap,

      Do you have a stacktrace or something we can use as a

starting point?

        Morten
      On Mon, Oct 14, 2013 at 12:57 PM, > > Saptarshi Purkayastha <sunbiz@gmail.com> wrote:
              On certain browsers and client's I've

seen a wierd ClassCastException thrown from the
server.

              The status returned is 500.

              But this happens only on certain clients in IE8 and

Android ICS.

              It works fine with Chrome, Firefox etc.



              May be its related to accept header and the mimeType

its sending for text/html. But this is only a wild
guess.

              Will be good to fix before the 2.13 release.



              ---

              Regards,

              Saptarshi PURKAYASTHA
        _______________________________________________

        Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)

        Post to     : dhis2-devs@lists.launchpad.net

        Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)

        More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
_______________________________________________
Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

Downloading IE8 from http://www.modern.ie/en-us/virtualization-tools#downloads now

···


Morten

On Mon, Oct 14, 2013 at 4:50 PM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

yea, its just /api/resources
If you have access to one of the uio desktops and try the IE8 in that, you can replicate it as well


Regards,
Saptarshi PURKAYASTHA


From: mortenoh@gmail.com

Date: Mon, 14 Oct 2013 14:49:32 +0200
To: lars@roland.bz
CC: dhis2-devs@lists.launchpad.net

Subject: Re: [Dhis2-devs] Wierd ClassCastException on WebAPI calls

That looks really strange. What is the request you are doing? is it just /api? Resources are definitely not a idObject


Morten

On Mon, Oct 14, 2013 at 2:46 PM, Lars Kristian Roland lars@roland.bz wrote:

  Here is a stack trace of Saptarshi's problem (also happens on my IE)

HTTP Status 500 - Request processing failed; nested exception is java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject


type Exception report

  **message**           Request processing failed; nested exception is java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject

  **description**           The server encountered an internal error that prevented it from fulfilling this request.

  **exception**
	org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:55) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

	java.lang.ClassCastException: org.hisp.dhis.api.webdomain.Resources cannot be cast to org.hisp.dhis.common.IdentifiableObject org.hisp.dhis.api.view.AbstractGridView.renderMergedOutputModel(AbstractGridView.java:113) org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263) org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208) org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:55) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.30 logs.


Apache Tomcat/7.0.30

  On 14.10.2013 13:30, Morten Olav Hansen wrote:

Hi Sap,

      Do you have a stacktrace or something we can use as a starting point?

        Morten
      On Mon, Oct 14, 2013 at 12:57 PM, Saptarshi Purkayastha <sunbiz@gmail.com> wrote:
              On certain browsers and client's I've seen a wierd ClassCastException thrown from the server.

              The status returned is 500.

              But this happens only on certain clients in IE8 and Android ICS.

              It works fine with Chrome, Firefox etc.



              May be its related to accept header and the mimeType its sending for text/html. But this is only a wild guess.

              Will be good to fix before the 2.13 release.



              ---

              Regards,

              Saptarshi PURKAYASTHA
        _______________________________________________

        Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)

        Post to     : dhis2-devs@lists.launchpad.net

        Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)

        More help   : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
_______________________________________________ Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp