net.sf.hibernate.WrongClassException: Object with id: 12 was not of the specified subclass: com.redstarshop.data.File (loaded object was of wrong class)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Hibernate JIRA by Marko Nikolic, 1 year ago
Object with id: 12 was not of the specified subclass: com.redstarshop.data.File (loaded object was of wrong class)
via Hibernate JIRA by Marko Nikolic, 1 year ago
Object with id: 12 was not of the specified subclass: com.redstarshop.data.File (loaded object was of wrong class)
via Hibernate JIRA by Sam Perman, 1 year ago
Object with id: 1346 was not of the specified subclass: my.BarImpl(loaded object was of wrong class)
via Hibernate JIRA by Sam Perman, 1 year ago
Object with id: 1346 was not of the specified subclass: my.BarImpl(loaded object was of wrong class)
via Hibernate JIRA by alexander thomas, 1 year ago
Object with id: 21 was not of the specified subclass: test.A (loaded object was of wrong class)
via Hibernate JIRA by alexander thomas, 1 year ago
Object with id: 21 was not of the specified subclass: test.A (loaded object was of wrong class)
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.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.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)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.