net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL)

Atlassian JIRA | Guilherme Nedel [Atlassian] | 5 years ago
  1. 0

    {code} 2011-10-26 14:22:25,766 ERROR [http-8080-6] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- referer: http://localhost:8080/dashboard.action | url: /json/addspacetofavourites.action | userName: admin2 org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL); nested exception is net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) Caused by: net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) at net.sf.hibernate.loader.Loader.getInstanceClass(Loader.java:660) at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:573) at net.sf.hibernate.loader.Loader.getRow(Loader.java:505) at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:218) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:285) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:941) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:961) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:59) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:51) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:413) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2129) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1999) at net.sf.hibernate.impl.SessionImpl.get(SessionImpl.java:1935) at org.springframework.orm.hibernate.HibernateTemplate$1.doInHibernate(HibernateTemplate.java:461) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.get(HibernateTemplate.java:455) at org.springframework.orm.hibernate.HibernateTemplate.get(HibernateTemplate.java:449) at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAbstractPageDao.getAbstractPageById(HibernateAbstractPageDao.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy37.getAbstractPageById(Unknown Source) at com.atlassian.confluence.pages.DefaultPageManager.getAbstractPage(DefaultPageManager.java:114) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy38.getAbstractPage(Unknown Source) at com.atlassian.confluence.labels.service.AbstractLabelsCommand.getEntity(AbstractLabelsCommand.java:45) at com.atlassian.confluence.labels.service.AddLabelsCommandImpl.isAuthorizedInternal(AddLabelsCommandImpl.java:62) at com.atlassian.confluence.core.service.AbstractServiceCommand$ServiceCommandState$6.authorize(AbstractServiceCommand.java:264) at com.atlassian.confluence.core.service.AbstractServiceCommand.isAuthorized(AbstractServiceCommand.java:54) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy671.isAuthorized(Unknown Source) at com.atlassian.confluence.labels.actions.AddSpaceToFavouriteAjaxAction.isPermitted(AddSpaceToFavouriteAjaxAction.java:56) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:44) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.setup.webwork.BootstrapAwareInterceptor.intercept(BootstrapAwareInterceptor.java:26) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.user.actions.UserAwareInterceptor.intercept(UserAwareInterceptor.java:58) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.pages.actions.CommentAwareInterceptor.intercept(CommentAwareInterceptor.java:43) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:106) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.spaces.actions.SpaceAwareInterceptor.intercept(SpaceAwareInterceptor.java:68) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.actions.LastModifiedInterceptor.intercept(LastModifiedInterceptor.java:38) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.ConfluenceAutowireInterceptor.intercept(ConfluenceAutowireInterceptor.java:38) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.xwork.interceptors.TransactionalInvocation.invokeAndHandleExceptions(TransactionalInvocation.java:76) at com.atlassian.xwork.interceptors.TransactionalInvocation.invokeInTransaction(TransactionalInvocation.java:61) at com.atlassian.xwork.interceptors.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:56) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.xwork.SetupIncompleteInterceptor.intercept(SetupIncompleteInterceptor.java:40) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:115) at com.atlassian.confluence.servlet.ConfluenceServletDispatcher.serviceAction(ConfluenceServletDispatcher.java:53) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.security.websudo.MessagesDecoratorFilter.doFilter(MessagesDecoratorFilter.java:49) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:84) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:54) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.jmx.JmxFilter.doFilter(JmxFilter.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:19) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:40) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.ThreadLocalCacheFilter.doFilter(ThreadLocalCacheFilter.java:22) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:44) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:211) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98) at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:30) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:34) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:22) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:80) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.confluence.extra.webdav.servlet.filter.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:427) at com.atlassian.confluence.extra.webdav.servlet.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:34) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:58) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:52) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:25) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) 2011-10-26 14:22:25,837 INFO [http-8080-6] [atlassian.confluence.status.SystemErrorInformationLogger] writeToLog Request Unique ID : d0361648-ee42-4317-bcf2-4e4cafa4331c -------------------------- JVM Stats -------------------------- allocatedHeap = 430637056 availablePermGen = 150201160 usedMemory = 272085152 totalMemory = 430637056 freeMemory = 158551904 maxPermGen = 268435456 usedPermGen = 118234296 freeMemoryInMegabytes = 151 freeAllocatedHeap = 158551904 availableHeap = 205148000 usedMemoryInMegabytes = 259 maxHeap = 477233152 usedHeap = 272085152 totalMemoryInMegabytes = 410 -------------------------- Request Information -------------------------- URL: http://localhost:8080/500page.jsp Scheme: http Server: localhost Port: 8080 URI: /500page.jsp Context Path: Servlet Path: /500page.jsp Path Info: null Query String: null -------------------------- Attributes -------------------------- javax.servlet.forward.request_uri: /json/addspacetofavourites.action javax.servlet.forward.context_path: javax.servlet.forward.servlet_path: /json/addspacetofavourites.action javax.servlet.forward.path_info: /500page.jsp os_securityfilter_already_filtered: true javax.servlet.jsp.jspException: org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL); nested exception is net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) com.atlassian.seraph.auth.LoginReason: OK com.atlassian.confluence.security.websudo.MessagesDecoratorFilter__already_filtered__: true atlassian.core.seraph.original.url: /json/addspacetofavourites.action javax.servlet.error.status_code: 500 javax.servlet.error.servlet_name: action __sitemesh__using_stream: false com.atlassian.gzipfilter.GzipFilter_already_filtered: true loginfilter.already.filtered: true com.atlassian.confluence.web.ConfluenceJohnsonFilter_already_filtered: true Confluence-Request-Time: 1319646145746 javax.servlet.error.message: com.atlassian.core.filters.HeaderSanitisingFilter_already_filtered: true __cleanup_recursion_counter: 0 webwork.valueStack: com.opensymphony.xwork.util.OgnlValueStack@3bd24b4f com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter_already_filtered: true sessioninview.FILTERED: true __sitemesh__filterapplied: true javax.servlet.error.exception: org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL); nested exception is net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) javax.servlet.error.request_uri: /json/addspacetofavourites.action -------------------------- Parameters -------------------------- atl_token : 96af1072f7fb0ec0ab4e1e2eb9e85b1d08e83d02 key : epac caused by: org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL); nested exception is net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:587) caused by: net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) at net.sf.hibernate.loader.Loader.getInstanceClass(Loader.java:660) {code} Steps to reproduce: 1. go to dashboard 2. mark a space as favourites by clicking on the star 3. click the star again to unselect it 4. go to the my tab, the space still remains selected 5. refresh the dashboard, the space still remains as a favourite Workaround listed in this [document|http://confluence.atlassian.com/display/CONFKB/Spaces+Cannot+Be+Unmarked+as+Favourites] can be used to bypass issue: 1. Visit the space. 2. Locate the pull down menu on the top right hand corner and select {{Browse}} >> {{Advanced}}. 3. In the Advanced console, locate the {{Remove Space}} from {{Favourites}} menu (bottom left) and click it.

    Atlassian JIRA | 5 years ago | Guilherme Nedel [Atlassian]
    net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL)
  2. 0

    {code} 2011-10-26 14:22:25,766 ERROR [http-8080-6] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- referer: http://localhost:8080/dashboard.action | url: /json/addspacetofavourites.action | userName: admin2 org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL); nested exception is net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) Caused by: net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) at net.sf.hibernate.loader.Loader.getInstanceClass(Loader.java:660) at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:573) at net.sf.hibernate.loader.Loader.getRow(Loader.java:505) at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:218) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:285) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:941) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:961) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:59) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:51) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:413) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2129) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1999) at net.sf.hibernate.impl.SessionImpl.get(SessionImpl.java:1935) at org.springframework.orm.hibernate.HibernateTemplate$1.doInHibernate(HibernateTemplate.java:461) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.get(HibernateTemplate.java:455) at org.springframework.orm.hibernate.HibernateTemplate.get(HibernateTemplate.java:449) at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAbstractPageDao.getAbstractPageById(HibernateAbstractPageDao.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy37.getAbstractPageById(Unknown Source) at com.atlassian.confluence.pages.DefaultPageManager.getAbstractPage(DefaultPageManager.java:114) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy38.getAbstractPage(Unknown Source) at com.atlassian.confluence.labels.service.AbstractLabelsCommand.getEntity(AbstractLabelsCommand.java:45) at com.atlassian.confluence.labels.service.AddLabelsCommandImpl.isAuthorizedInternal(AddLabelsCommandImpl.java:62) at com.atlassian.confluence.core.service.AbstractServiceCommand$ServiceCommandState$6.authorize(AbstractServiceCommand.java:264) at com.atlassian.confluence.core.service.AbstractServiceCommand.isAuthorized(AbstractServiceCommand.java:54) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy671.isAuthorized(Unknown Source) at com.atlassian.confluence.labels.actions.AddSpaceToFavouriteAjaxAction.isPermitted(AddSpaceToFavouriteAjaxAction.java:56) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:44) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.setup.webwork.BootstrapAwareInterceptor.intercept(BootstrapAwareInterceptor.java:26) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.user.actions.UserAwareInterceptor.intercept(UserAwareInterceptor.java:58) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.pages.actions.CommentAwareInterceptor.intercept(CommentAwareInterceptor.java:43) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:106) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.spaces.actions.SpaceAwareInterceptor.intercept(SpaceAwareInterceptor.java:68) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.actions.LastModifiedInterceptor.intercept(LastModifiedInterceptor.java:38) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.ConfluenceAutowireInterceptor.intercept(ConfluenceAutowireInterceptor.java:38) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.xwork.interceptors.TransactionalInvocation.invokeAndHandleExceptions(TransactionalInvocation.java:76) at com.atlassian.xwork.interceptors.TransactionalInvocation.invokeInTransaction(TransactionalInvocation.java:61) at com.atlassian.xwork.interceptors.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:56) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.xwork.SetupIncompleteInterceptor.intercept(SetupIncompleteInterceptor.java:40) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:115) at com.atlassian.confluence.servlet.ConfluenceServletDispatcher.serviceAction(ConfluenceServletDispatcher.java:53) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.security.websudo.MessagesDecoratorFilter.doFilter(MessagesDecoratorFilter.java:49) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:84) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:54) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.jmx.JmxFilter.doFilter(JmxFilter.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:19) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:40) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.ThreadLocalCacheFilter.doFilter(ThreadLocalCacheFilter.java:22) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:44) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:211) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98) at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:30) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:34) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:22) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:80) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.confluence.extra.webdav.servlet.filter.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:427) at com.atlassian.confluence.extra.webdav.servlet.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:34) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:58) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:52) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:25) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) 2011-10-26 14:22:25,837 INFO [http-8080-6] [atlassian.confluence.status.SystemErrorInformationLogger] writeToLog Request Unique ID : d0361648-ee42-4317-bcf2-4e4cafa4331c -------------------------- JVM Stats -------------------------- allocatedHeap = 430637056 availablePermGen = 150201160 usedMemory = 272085152 totalMemory = 430637056 freeMemory = 158551904 maxPermGen = 268435456 usedPermGen = 118234296 freeMemoryInMegabytes = 151 freeAllocatedHeap = 158551904 availableHeap = 205148000 usedMemoryInMegabytes = 259 maxHeap = 477233152 usedHeap = 272085152 totalMemoryInMegabytes = 410 -------------------------- Request Information -------------------------- URL: http://localhost:8080/500page.jsp Scheme: http Server: localhost Port: 8080 URI: /500page.jsp Context Path: Servlet Path: /500page.jsp Path Info: null Query String: null -------------------------- Attributes -------------------------- javax.servlet.forward.request_uri: /json/addspacetofavourites.action javax.servlet.forward.context_path: javax.servlet.forward.servlet_path: /json/addspacetofavourites.action javax.servlet.forward.path_info: /500page.jsp os_securityfilter_already_filtered: true javax.servlet.jsp.jspException: org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL); nested exception is net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) com.atlassian.seraph.auth.LoginReason: OK com.atlassian.confluence.security.websudo.MessagesDecoratorFilter__already_filtered__: true atlassian.core.seraph.original.url: /json/addspacetofavourites.action javax.servlet.error.status_code: 500 javax.servlet.error.servlet_name: action __sitemesh__using_stream: false com.atlassian.gzipfilter.GzipFilter_already_filtered: true loginfilter.already.filtered: true com.atlassian.confluence.web.ConfluenceJohnsonFilter_already_filtered: true Confluence-Request-Time: 1319646145746 javax.servlet.error.message: com.atlassian.core.filters.HeaderSanitisingFilter_already_filtered: true __cleanup_recursion_counter: 0 webwork.valueStack: com.opensymphony.xwork.util.OgnlValueStack@3bd24b4f com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter_already_filtered: true sessioninview.FILTERED: true __sitemesh__filterapplied: true javax.servlet.error.exception: org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL); nested exception is net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) javax.servlet.error.request_uri: /json/addspacetofavourites.action -------------------------- Parameters -------------------------- atl_token : 96af1072f7fb0ec0ab4e1e2eb9e85b1d08e83d02 key : epac caused by: org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL); nested exception is net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:587) caused by: net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL) at net.sf.hibernate.loader.Loader.getInstanceClass(Loader.java:660) {code} Steps to reproduce: 1. go to dashboard 2. mark a space as favourites by clicking on the star 3. click the star again to unselect it 4. go to the my tab, the space still remains selected 5. refresh the dashboard, the space still remains as a favourite Workaround listed in this [document|http://confluence.atlassian.com/display/CONFKB/Spaces+Cannot+Be+Unmarked+as+Favourites] can be used to bypass issue: 1. Visit the space. 2. Locate the pull down menu on the top right hand corner and select {{Browse}} >> {{Advanced}}. 3. In the Advanced console, locate the {{Remove Space}} from {{Favourites}} menu (bottom left) and click it.

    Atlassian JIRA | 5 years ago | Guilherme Nedel [Atlassian]
    net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL)
  3. 0

    Hello folks, I did not find anything related to this issue on the net so I put it here: Provided are two classes A and B wich are in a 1.) many-to-many relationship 2.) with an association class Association which contains some forther attributes 2.) and is navigable from A to B and from B to A I thried to implement this in hibernate and it works well as long as the navigation goes only in one direction meaning: there is 1.) a public Collection getABAssociatins() method in the A class 2.) a public B getB() method in the Association class At the point where I try to include backwards navigation I run into the following error stack: net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: test.A (loaded object was of wrong class) at net.sf.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:300) at net.sf.hibernate.loader.Loader.getRow(Loader.java:278) at net.sf.hibernate.loader.Loader.doFind(Loader.java:159) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:602) at net.sf.hibernate.loader.OneToManyLoader.initialize(OneToManyLoader.java:102) at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:2897) at net.sf.hibernate.collection.PersistentCollection.getInitialValue(PersistentCollection.java:128) at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:74) at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:177) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1959) at net.sf.hibernate.loader.Loader.doFind(Loader.java:196) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:602) at net.sf.hibernate.loader.OneToManyLoader.initialize(OneToManyLoader.java:102) at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:2897) at net.sf.hibernate.collection.PersistentCollection.getInitialValue(PersistentCollection.java:128) at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:74) at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:177) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1959) at net.sf.hibernate.loader.Loader.doFind(Loader.java:196) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:587) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:42) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:396) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1889) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1757) at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1688) at test.testEnitityToObjectToEntityReferenzes(HibernateTest.java:315) I suppose hibernat does not support this kind of usage (or am I doing something wrong???) and would like to propose this for an improvement. Kindest Regards Alexander Thomas

    Hibernate JIRA | 1 decade ago | alexander thomas
    net.sf.hibernate.WrongClassException: Object with id: 21 was not of the specified subclass: test.A (loaded object was of wrong class)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I have 2 classes, Product (for core product info) and DisplayProduct (has extra fields) which is a subclass of Product. Display product is read only & used as a data aggregation class, i *could* load the product instance & then copy to a DisplayProduct instance, but it means 2x overhead for something desired to be an optimisation, i.e. not a great solution. What happens is the loader gets confused & after loading an instance of one class, i can not load an instance of the other, yes they are both mapped to one table, share the same key & one is a subclass, but they are not the same object in the context of the application. I get the following error: <snip> net.sf.hibernate.WrongClassException: Object with id: XXX was not of the specified subclass: com.woolly.store.product.DisplayProduct (loaded object was of wrong class) at net.sf.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:531) </snip> samplecode from classes: class Product { private String code; private String description; ... //getters/setters etc ... } and; class DisplayProduct extends Product { private List images; private BigDecimal price; ... //getters/setters etc ... } If i map both of these classes to the same table; <class name="Product" table="str_products"> <id name="code" unsaved-value="null"> <generator class="assigned"/> </id> <version name="version" type="int"/> <property name="name"/> <property name="description"/> <property name="taxCode"/> ... </class> and <class name="DisplayProduct" table="str_products" mutable="false"> <id name="code" unsaved-value="null"> <generator class="assigned"/> </id> <property name="name"/> <property name="description"/> <property name="taxCode"/> ... </class> I have tried switching off the secondary level cache, but the problem seems to run deeper than this. (assuming that setting hibernate.cache.use_second_level_cache=false to do this.) Ideas?

    Hibernate JIRA | 1 decade ago | Dave Birch
    net.sf.hibernate.WrongClassException: Object with id: XXX was not of the specified subclass: com.woolly.store.product.DisplayProduct (loaded object was of wrong class)
  6. 0

    I am having problem using Lightweight design pattern. I must admit that I am completely new to Hibernate but it seems to me like this is a bug of Hibernate. Here are my mappings: ### FileInfo.hbm.xml ### <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.redstarshop.data.FileInfo" table="files"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> </class> </hibernate-mapping> ### File.hbm.xml ### <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.redstarshop.data.File" table="files" polymorphism="explicit"> <id name="id" column="id" type="long"> <generator class="native"/> </id> <property name="name" column="name"/> <property name="contentType" column="content_type" not-null="true"/> <property name="length" not-null="true" column="content_length"/> <property name="lastModified" column="last_modified" not-null="true"/> <property name="content" not-null="true"/> </class> </hibernate-mapping> ### End of mappings ### Now, loading FileInfo (lightweight) entity works fine. But if I try to load File (heavyweight) entity (after FileInfo was loaded and cached) with the same id as loaded FileInfo, using either: session.load(File.class, id) or session.find("from com.redstarshop.data.File as c where c.id = ?", id, Hibernate.LONG) I always get net.sf.hibernate.WrongClassException: Object with id: 12 was not of the specified subclass: com.redstarshop.data.File (loaded object was of wrong class) at net.sf.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:300) at net.sf.hibernate.loader.Loader.getRow(Loader.java:278) at net.sf.hibernate.loader.Loader.doFind(Loader.java:159) at net.sf.hibernate.loader.Loader.find(Loader.java:620) at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1318) at com.redstarshop.util.Utils.findOne(Utils.java:46) at com.redstarshop.tapestry.FileService.service(FileService.java:116) at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:913) at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238) at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:341) at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:148) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:333) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:285) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1696) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:552) at org.mortbay.http.HttpContext.handle(HttpContext.java:1646) at org.mortbay.http.HttpServer.service(HttpServer.java:884) at org.mortbay.http.HttpConnection.service(HttpConnection.java:799) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:949) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:816) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:204) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:509) Following patch against 2.0.3 works fine for me (I patched loader to use fetched instance only if it is assignable to requested type). ### Begin of patch ### --- /cygdrive/c/java/hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-27 16:49:40.000000000 +0200 +++ hibernate-2.0.3/src/net/sf/hibernate/loader/Loader.java 2003-08-31 17:03:34.000000000 +0200 @@ -273,7 +273,7 @@ public abstract class Loader { //If the object is already loaded, return the loaded one object = session.getEntity(key); - if (object!=null) { + if (object!=null && persisters[i].getMappedClass().isAssignableFrom(object.getClass())) { //its already loaded so don't need to hydrate it instanceAlreadyLoaded(rs, i, persisters[i], suffixes[i], key, object, lockModes[i], session); } @@ -296,9 +296,6 @@ public abstract class Loader { private void instanceAlreadyLoaded(ResultSet rs, int i, Loadable persister, String suffix, Key key, Object object, LockMode lockMode, SessionImplementor session) throws HibernateException, SQLException { - if ( !persister.getMappedClass().isAssignableFrom( object.getClass() ) ) - throw new WrongClassException( "loaded object was of wrong class", key.getIdentifier(), persister.getMappedClass() ); - if ( LockMode.NONE!=lockMode && upgradeLocks() ) { //no point doing this if NONE was requested if ( ### End of patch ###

    Hibernate JIRA | 1 decade ago | Marko Nikolic
    net.sf.hibernate.WrongClassException: Object with id: 12 was not of the specified subclass: com.redstarshop.data.File (loaded object was of wrong class)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. net.sf.hibernate.WrongClassException

      Object with id: 21 was not of the specified subclass: com.atlassian.confluence.pages.AbstractPage (Discriminator: MAIL)

      at net.sf.hibernate.loader.Loader.getInstanceClass()
    2. net.sf.hibernate
      Loader.getInstanceClass
      1. net.sf.hibernate.loader.Loader.getInstanceClass(Loader.java:660)
      1 frame