{"id":12675,"date":"2013-08-09T23:06:00","date_gmt":"2013-08-09T22:06:00","guid":{"rendered":"https:\/\/touk.pl\/blog\/?guid=df150009de5601800dfddc089fb63298"},"modified":"2022-08-02T12:44:08","modified_gmt":"2022-08-02T10:44:08","slug":"unable-to-instantiate-default-tuplizer","status":"publish","type":"post","link":"https:\/\/touk.pl\/blog\/2013\/08\/09\/unable-to-instantiate-default-tuplizer\/","title":{"rendered":"Unable to instantiate default tuplizer"},"content":{"rendered":"<p>I wrote few hbm mappings for domain classes in my recent project, and I got exception like that:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]<\/pre>\n<p>Of course my first thought was googling for it and I found interesting answers. Most commons causes of this exception are:<\/p>\n<ul>\n<li>missing getters or setters, what&#8217;s more, even a typo or wrong letter case (like getParentproject instead of getParentProject when field in class and mapping file is defined as parentProject)<\/li>\n<li>missing default constructor<\/li>\n<li>missing dependency for javassist library<\/li>\n<\/ul>\n<div>My files seemed to be correctly defined, so it had to be missing dependency.<\/div>\n<div>\n<p>To fix it I&#8217;ve added these lines to my pom.xml:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;org.javassist&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;javassist&lt;\/artifactId&gt;\r\n    &lt;version&gt;3.18.0-GA&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n<\/pre>\n<\/div>\n<p>Well, it shouldn&#8217;t be a surprise because in full stacktrafe from this error there is an entry:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter<\/pre>\n<p>What explicitly indicates where is the root of this problem ;)<\/p>\n<p>(And BTW: in my recent project I&#8217;m stuck with quite old version of Hibernate &#8211; 3.6.3)<\/p>\n","protected":false},"excerpt":{"rendered":"I wrote few hbm mappings for domain classes in my recent project, and I got exception like that:org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]Of course my first thought was googl&#8230;\n","protected":false},"author":48,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[43,68,107],"_links":{"self":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/12675"}],"collection":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/comments?post=12675"}],"version-history":[{"count":3,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/12675\/revisions"}],"predecessor-version":[{"id":14826,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/12675\/revisions\/14826"}],"wp:attachment":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/media?parent=12675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/categories?post=12675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/tags?post=12675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}