-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Problem with javassist
PostPosted: Sat May 07, 2011 8:38 pm 
Newbie

Joined: Sat May 07, 2011 8:28 pm
Posts: 1
I'm building a simple Hibernate web app and upon first request after startup I get the following exception even though I have all required libraries in place :

Code:
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
   org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:534)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:442)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

javax.servlet.ServletException: java.lang.ExceptionInInitializerError
   org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:911)
   org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840)
   org.apache.jsp.index_jsp._jspService(index_jsp.java:100)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

java.lang.ExceptionInInitializerError
   testapp.Utils.buildSessionFactory(Utils.java:16)
   testapp.Utils.<clinit>(Utils.java:8)
   org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
   org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:108)
   org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:133)
   org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80)
   org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)
   org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:485)
   org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:133)
   org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
   org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:286)
   org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
   testapp.Utils.buildSessionFactory(Utils.java:12)
   testapp.Utils.<clinit>(Utils.java:8)
   org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

java.lang.reflect.InvocationTargetException
   sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   java.lang.reflect.Constructor.newInstance(Unknown Source)
   org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:105)
   org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:133)
   org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80)
   org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)
   org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:485)
   org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:133)
   org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
   org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:286)
   org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
   testapp.Utils.buildSessionFactory(Utils.java:12)
   testapp.Utils.<clinit>(Utils.java:8)
   org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

java.lang.NoClassDefFoundError: javassist/util/proxy/MethodFilter
   org.hibernate.bytecode.javassist.BytecodeProviderImpl.getProxyFactoryFactory(BytecodeProviderImpl.java:49)
   org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactoryInternal(PojoEntityTuplizer.java:205)
   org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:183)
   org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:167)
   org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:77)
   sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   java.lang.reflect.Constructor.newInstance(Unknown Source)
   org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:105)
   org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:133)
   org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80)
   org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)
   org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:485)
   org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:133)
   org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
   org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:286)
   org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
   testapp.Utils.buildSessionFactory(Utils.java:12)
   testapp.Utils.<clinit>(Utils.java:8)
   org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter
   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
   org.hibernate.bytecode.javassist.BytecodeProviderImpl.getProxyFactoryFactory(BytecodeProviderImpl.java:49)
   org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactoryInternal(PojoEntityTuplizer.java:205)
   org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:183)
   org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:167)
   org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:77)
   sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   java.lang.reflect.Constructor.newInstance(Unknown Source)
   org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:105)
   org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:133)
   org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80)
   org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)
   org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:485)
   org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:133)
   org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
   org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:286)
   org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
   testapp.Utils.buildSessionFactory(Utils.java:12)
   testapp.Utils.<clinit>(Utils.java:8)
   org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


I've searched the web and everyone who had this problem simply forgot to include javassist in classpath, which is not a problem in my case.


Top
 Profile  
 
 Post subject: Re: Problem with javassist
PostPosted: Sun May 08, 2011 6:12 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
maybe you have the wrong version, or you have some duplicate libraries.
Post version numbers and scan your jars using the command line tool jboss tattletale.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.