net.sf.hibernate.MappingException: No persister for: [Ljava.lang.Object;

Hibernate JIRA | pierre-yves | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    When trying to delete with a query (session.delete(queryString);) I got the error message : net.sf.hibernate.MappingException: No persister for: [Ljava.lang.Object; at com.fnac.goods.labelling.dao.fndref.HierarchyDaoImpl.deleteArticleLink(HierarchyDaoImpl.java:273) at java.lang.reflect.Method.invoke(Native Method) at org.codehaus.nanning.Mixin$InvocationImpl.invokeNext(Mixin.java:119) at fr.ibm.calypso.dao.dbms.session.DatabaseSessionInterceptor.invoke(DatabaseSessionInterceptor.java:79) at org.codehaus.nanning.Mixin$InvocationImpl.invokeNext(Mixin.java:116) at org.codehaus.nanning.Mixin.invokeMethod(Mixin.java:194) at org.codehaus.nanning.AspectInstance.invoke(AspectInstance.java:87) at $Proxy1.deleteArticleLink(Unknown Source) at com.fnac.goods.labelling.dao.fndref.HierarchyDaoImplTest.testDeleteArticle(HierarchyDaoImplTest.java:155) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167) Caused by: net.sf.hibernate.MappingException: No persister for: [Ljava.lang.Object; at net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:420) at net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2302) at net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2309) at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:898) at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1459) at com.fnac.goods.labelling.dao.fndref.HierarchyDaoImpl.deleteArticleLink(HierarchyDaoImpl.java:269) ... 18 more This is quite confusing, since the problem was actually that the qery was return a list of array, and it had nothing to do with the mapping. ( because I did a "from A, B where .." in my query. I was resolved by doing a simple "select A from A,B where..." since I wanted to delete some A). I think it would be nice to have an explicit error message :o)

    Hibernate JIRA | 1 decade ago | pierre-yves
    net.sf.hibernate.MappingException: No persister for: [Ljava.lang.Object;
  2. 0

    When trying to delete with a query (session.delete(queryString);) I got the error message : net.sf.hibernate.MappingException: No persister for: [Ljava.lang.Object; at com.fnac.goods.labelling.dao.fndref.HierarchyDaoImpl.deleteArticleLink(HierarchyDaoImpl.java:273) at java.lang.reflect.Method.invoke(Native Method) at org.codehaus.nanning.Mixin$InvocationImpl.invokeNext(Mixin.java:119) at fr.ibm.calypso.dao.dbms.session.DatabaseSessionInterceptor.invoke(DatabaseSessionInterceptor.java:79) at org.codehaus.nanning.Mixin$InvocationImpl.invokeNext(Mixin.java:116) at org.codehaus.nanning.Mixin.invokeMethod(Mixin.java:194) at org.codehaus.nanning.AspectInstance.invoke(AspectInstance.java:87) at $Proxy1.deleteArticleLink(Unknown Source) at com.fnac.goods.labelling.dao.fndref.HierarchyDaoImplTest.testDeleteArticle(HierarchyDaoImplTest.java:155) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167) Caused by: net.sf.hibernate.MappingException: No persister for: [Ljava.lang.Object; at net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:420) at net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2302) at net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2309) at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:898) at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1459) at com.fnac.goods.labelling.dao.fndref.HierarchyDaoImpl.deleteArticleLink(HierarchyDaoImpl.java:269) ... 18 more This is quite confusing, since the problem was actually that the qery was return a list of array, and it had nothing to do with the mapping. ( because I did a "from A, B where .." in my query. I was resolved by doing a simple "select A from A,B where..." since I wanted to delete some A). I think it would be nice to have an explicit error message :o)

    Hibernate JIRA | 1 decade ago | pierre-yves
    net.sf.hibernate.MappingException: No persister for: [Ljava.lang.Object;

    Root Cause Analysis

    1. net.sf.hibernate.MappingException

      No persister for: [Ljava.lang.Object;

      at net.sf.hibernate.impl.SessionFactoryImpl.getPersister()
    2. net.sf.hibernate
      SessionImpl.delete
      1. net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:420)
      2. net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2302)
      3. net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2309)
      4. net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:898)
      5. net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1459)
      5 frames
    3. com.fnac.goods
      HierarchyDaoImpl.deleteArticleLink
      1. com.fnac.goods.labelling.dao.fndref.HierarchyDaoImpl.deleteArticleLink(HierarchyDaoImpl.java:269)
      1 frame
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    5. org.codehaus.nanning
      Mixin$InvocationImpl.invokeNext
      1. org.codehaus.nanning.Mixin$InvocationImpl.invokeNext(Mixin.java:119)
      1 frame
    6. fr.ibm.calypso
      DatabaseSessionInterceptor.invoke
      1. fr.ibm.calypso.dao.dbms.session.DatabaseSessionInterceptor.invoke(DatabaseSessionInterceptor.java:79)
      1 frame
    7. org.codehaus.nanning
      AspectInstance.invoke
      1. org.codehaus.nanning.Mixin$InvocationImpl.invokeNext(Mixin.java:116)
      2. org.codehaus.nanning.Mixin.invokeMethod(Mixin.java:194)
      3. org.codehaus.nanning.AspectInstance.invoke(AspectInstance.java:87)
      3 frames
    8. Unknown
      $Proxy1.deleteArticleLink
      1. $Proxy1.deleteArticleLink(Unknown Source)
      1 frame
    9. com.fnac.goods
      HierarchyDaoImplTest.testDeleteArticle
      1. com.fnac.goods.labelling.dao.fndref.HierarchyDaoImplTest.testDeleteArticle(HierarchyDaoImplTest.java:155)
      1 frame
    10. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    11. JUnit
      TestCase.run
      1. junit.framework.TestCase.runTest(TestCase.java:154)
      2. junit.framework.TestCase.runBare(TestCase.java:127)
      3. junit.framework.TestResult$1.protect(TestResult.java:106)
      4. junit.framework.TestResult.runProtected(TestResult.java:124)
      5. junit.framework.TestResult.run(TestResult.java:109)
      6. junit.framework.TestCase.run(TestCase.java:118)
      6 frames
    12. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)
      3 frames