org.hibernate.PropertyAccessException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Steps to reproduce: * user 4.2 RC1. Put the JAR and modify the configuration to use an Oracle database * make sure the data/extension and data/jobs dirs aren't present * start xwiki - the distribution wizard will kick in * click on Install and the Apply * you will see several error messages (in red, each with a stacktrace) * example of a stacktrace below {code} Failed to parse document [XWiki/WysiwygEditorConfig.xml] class org.xml.sax.SAXException: Failed to save document at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:275) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137) at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80) at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149) at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106) at org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135) at org.xwiki.job.AbstractJob.start(AbstractJob.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156) at java.lang.Thread.run(Thread.java:679) Caused by: class com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.WysiwygEditorConfig] Wrapped Exception: Error number 3235 in 3: Exception while searching attachments for documents xwiki:XWiki.WysiwygEditorConfig Wrapped Exception: Exception occurred inside setter of com.xpn.xwiki.doc.XWikiAttachment.author at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:856) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1404) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1447) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.getDatabaseDocument(DocumentImporterHandler.java:284) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:202) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137) at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80) at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149) at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106) at org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135) at org.xwiki.job.AbstractJob.start(AbstractJob.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156) at java.lang.Thread.run(Thread.java:679) Caused by: class com.xpn.xwiki.XWikiException: Error number 3235 in 3: Exception while searching attachments for documents xwiki:XWiki.WysiwygEditorConfig Wrapped Exception: Exception occurred inside setter of com.xpn.xwiki.doc.XWikiAttachment.author at com.xpn.xwiki.store.XWikiHibernateStore.loadAttachmentList(XWikiHibernateStore.java:1458) at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:756) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1404) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1447) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.getDatabaseDocument(DocumentImporterHandler.java:284) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:202) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137) at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80) at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149) at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106) at org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135) at org.xwiki.job.AbstractJob.start(AbstractJob.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156) at java.lang.Thread.run(Thread.java:679) Caused by: class org.hibernate.PropertyAccessException: Exception occurred inside setter of com.xpn.xwiki.doc.XWikiAttachment.author at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:89) at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:583) at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:229) at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3847) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:152) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982) at org.hibernate.loader.Loader.doQuery(Loader.java:857) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2542) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at com.xpn.xwiki.store.XWikiHibernateStore.loadAttachmentList(XWikiHibernateStore.java:1446) at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:756) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1404) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1447) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.getDatabaseDocument(DocumentImporterHandler.java:284) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:202) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137) at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80) at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149) at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106) at org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135) at org.xwiki.job.AbstractJob.start(AbstractJob.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156) at java.lang.Thread.run(Thread.java:679) Caused by: $throwable.class: null {code} * documents I get conflicts are: ** Panels.PanelsWizard.xml ** Panels.SyntaxHelp.xml ** XWiki.WatchListMessage.xml ** Stats.Style.xml ** XWiki.SearchAdmin.xml ** XWiki.SearchSuggestConfig.xml ** Blog.Categories.xml ** XWiki.OfficeImporterAdmin.xml ** AnnotationCode.AnnotaionConfig.xml ** AnnotationCode.Style.xml ** Invitation.WebHome.xml ** XWiki.AddeExtensions.xml ** and MORE Steps to reproduce II * start the wiki, but CANCEL the distribution wizard * import manually the 4.2 ui-all XAR using the old way. * you won't see errors, but the outcome is the same (empty Applications Panel) It seems that the Distribution Wizard revealed maybe some issues we had but didn't see them because old import doesn't display these information. So this is not caused by the Distribution Manager. I am sure this breaks a lot of stuff, but the most visible thing is the Application panel which is empty. Images attached, full server stacktrace attached
    via by Sorin Burjan,
  • Problems on Geronimo Appserver?
    via j-trac by jeremy_c
    ,
  • For some of our business classes we used a Mapping declaring the class to be lazy initialized and providing a proxy interface like e.g.: <class name="TestClassImpl" proxy="TestClass" table="testTable" lazy="true"> ... </class> Using classes mapped this way - e.g. as endpoint of a one to one relation - sporadically leads to exceptions like the following: org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of test.AbstractTestClass2Impl.testField at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:104) at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337) at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200) at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3514) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842) at org.hibernate.loader.Loader.doQuery(Loader.java:717) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2211) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095) at org.hibernate.loader.Loader.list(Loader.java:2090) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:804) Note that the application is residing in a different classloader than hibernate (and CGLIB...). Examining the situation we see that the value passed to the setter was a CGLIB proxy. Internally the proxy stores an array of interfaces the proxy should implement. In our situation this interface contains the HibernateProxy interface and our business interface provided as proxy interface in the mapping. In this interface array we checked the classloader of the interfaces. As expected the HibernateProxy interface is loaded by the system classloader and our interface was loaded by our custom classloader. However examining the actual interfaces of the proxy (with proxy.getClass().getInterfaces()[i].getClassLoader() for all i) shows that all interfaces are loaded with the system classloader. This causes the exception above. Doing some more experiments we experience that the problem does not occur all the time. Sometimes the actual proxy interfaces are as expected (the HibernateProxy interface is loaded by the system classloader and our interface was loaded by our custom classloader). We notice that each time the test failed the HibernateProxy was the first interface in the interface array stored in the proxy. Some experiments with the CGLIB (the Enhancer class) shows us that (if there is no superclass given) they use the classloader of the first passed interface as default classloader (compare method net.sf.cglib.proxy.Enhancer.getDefaultClassLoader()). Finally we find out that hibernate passes the proxy interfaces in an arbitrary order since they are using a HashSet for the proxy interfaces in the method org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PersistentClass persistentClass, Getter idGetter, Setter idSetter). This Hash set is passed to the method org.hibernate.proxy.pojo.cglib.CGLIB_ProxyFactory.postInstantiate(...). There it is simply converted to an Array (leading to a randomized order). As a workaround it is possible to patch the class org.hibernate.proxy.pojo.cglib.CGLIB_ProxyFactory and add reorganize the array if the HibernateProxy interface is the first one: this.interfaces = (Class[]) interfaces.toArray(NO_CLASSES); //----->PATCH<-------- if(this.interfaces.length > 1) { Class firstIfc = this.interfaces[0]; if(firstIfc.getName().startsWith("org.hibernate")) { this.interfaces[0] = this.interfaces[1]; this.interfaces[1] = firstIfc; System.err.println("Replace: " + firstIfc.getName() + " by " + this.interfaces[0].getName()); } } //-------------------- After applying this patch everything woks as expected. Compare with the discussion in: http://forum.hibernate.org/viewtopic.php?p=2334617#2334617
    via by Jan Wiemer,
  • For some of our business classes we used a Mapping declaring the class to be lazy initialized and providing a proxy interface like e.g.: <class name="TestClassImpl" proxy="TestClass" table="testTable" lazy="true"> ... </class> Using classes mapped this way - e.g. as endpoint of a one to one relation - sporadically leads to exceptions like the following: org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of test.AbstractTestClass2Impl.testField at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:104) at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337) at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200) at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3514) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842) at org.hibernate.loader.Loader.doQuery(Loader.java:717) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2211) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095) at org.hibernate.loader.Loader.list(Loader.java:2090) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:804) Note that the application is residing in a different classloader than hibernate (and CGLIB...). Examining the situation we see that the value passed to the setter was a CGLIB proxy. Internally the proxy stores an array of interfaces the proxy should implement. In our situation this interface contains the HibernateProxy interface and our business interface provided as proxy interface in the mapping. In this interface array we checked the classloader of the interfaces. As expected the HibernateProxy interface is loaded by the system classloader and our interface was loaded by our custom classloader. However examining the actual interfaces of the proxy (with proxy.getClass().getInterfaces()[i].getClassLoader() for all i) shows that all interfaces are loaded with the system classloader. This causes the exception above. Doing some more experiments we experience that the problem does not occur all the time. Sometimes the actual proxy interfaces are as expected (the HibernateProxy interface is loaded by the system classloader and our interface was loaded by our custom classloader). We notice that each time the test failed the HibernateProxy was the first interface in the interface array stored in the proxy. Some experiments with the CGLIB (the Enhancer class) shows us that (if there is no superclass given) they use the classloader of the first passed interface as default classloader (compare method net.sf.cglib.proxy.Enhancer.getDefaultClassLoader()). Finally we find out that hibernate passes the proxy interfaces in an arbitrary order since they are using a HashSet for the proxy interfaces in the method org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PersistentClass persistentClass, Getter idGetter, Setter idSetter). This Hash set is passed to the method org.hibernate.proxy.pojo.cglib.CGLIB_ProxyFactory.postInstantiate(...). There it is simply converted to an Array (leading to a randomized order). As a workaround it is possible to patch the class org.hibernate.proxy.pojo.cglib.CGLIB_ProxyFactory and add reorganize the array if the HibernateProxy interface is the first one: this.interfaces = (Class[]) interfaces.toArray(NO_CLASSES); //----->PATCH<-------- if(this.interfaces.length > 1) { Class firstIfc = this.interfaces[0]; if(firstIfc.getName().startsWith("org.hibernate")) { this.interfaces[0] = this.interfaces[1]; this.interfaces[1] = firstIfc; System.err.println("Replace: " + firstIfc.getName() + " by " + this.interfaces[0].getName()); } } //-------------------- After applying this patch everything woks as expected. Compare with the discussion in: http://forum.hibernate.org/viewtopic.php?p=2334617#2334617
    via by Jan Wiemer,
    • org.hibernate.PropertyAccessException: Exception occurred inside setter of com.xpn.xwiki.doc.XWikiAttachment.author at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:89) at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:583) at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:229) at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3847) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:152) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982) at org.hibernate.loader.Loader.doQuery(Loader.java:857) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2542) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at com.xpn.xwiki.store.XWikiHibernateStore.loadAttachmentList(XWikiHibernateStore.java:1446) at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:756) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1404) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1447) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.getDatabaseDocument(DocumentImporterHandler.java:284) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.saveDocument(DocumentImporterHandler.java:202) at org.xwiki.extension.xar.internal.handler.packager.xml.DocumentImporterHandler.endHandlerElement(DocumentImporterHandler.java:378) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:163) at org.xwiki.extension.xar.internal.handler.packager.xml.AbstractHandler.endElement(AbstractHandler.java:155) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.parseDocument(DefaultPackager.java:327) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:165) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXARToWiki(DefaultPackager.java:135) at org.xwiki.extension.xar.internal.handler.packager.DefaultPackager.importXAR(DefaultPackager.java:126) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:202) at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:137) at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:80) at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:149) at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:106) at org.xwiki.extension.job.internal.InstallJob.start(InstallJob.java:135) at org.xwiki.job.AbstractJob.start(AbstractJob.java:134) at org.xwiki.job.internal.DefaultJobManager.run(DefaultJobManager.java:156) at java.lang.Thread.run(Thread.java:679)
    No Bugmate found.