Make sure com.mycompany.model.User has non-args public constructor. On Thu, Jul 8, 2010 at 12:49, Halil Karakose <halilkarak...@gmail.com>wrote:
> Changing javassist jar didn't work. I still receive the errors. > > By the way, the exception is thrown by > "org.hibernate.tuple.entity.PojoEntityTuplizer". > Is there a incompatibility with the hibernate jars? > > One more issue is that the logging level of the stack trace is in WARN > level. And I still haven't encountered anything weird in runtime. > > On Thu, Jul 1, 2010 at 9:50 AM, Joachim Van der Auwera <joac...@progs.be > >wrote: > > > I think you should update the javassist in jboss/server/default/lib/ > > folder. > > > > Joachim > > > > > > On 07/01/2010 08:08 AM, Halil Karakose wrote: > > > >> Hi, > >> I receive an error in my Tapestry webapp. I use Tapestry 5.1.0.5 and > Jboss > >> 4.2.3-GA. > >> > >> > >> *Scenario 1:* > >> My web application contains javassist 3.9.0.GA in WEB-INF/lib folder. > And > >> there is also another javassist.jar(3.6.0.GA) file inside > >> jboss/server/default/lib folder. > >> > >> During deployment of the web application, I receive such an exception: > >> > >> 22:12:28,373 WARN buildProxyFactory > >> [org.hibernate.tuple.entity.PojoEntityTuplizer] could not create proxy > >> factory for:com.mycompany.model.User > >> org.hibernate.HibernateException: Javassist Enhancement failed: > >> com.mycompany.model.User > >> at > >> > >> > org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:145) > >> at > >> > >> > org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:42) > >> at > >> > >> > org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162) > >> at > >> > >> > org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135) > >> at > >> > >> > org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55) > >> at > >> > >> > org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56) > >> at > >> > >> > org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302) > >> Caused by: java.lang.RuntimeException: > java.lang.IllegalArgumentException: > >> Can not set static javassist.util.proxy.MethodFilter field > >> com.mycompany.model.User_$$_javassist_5._method_filter to > >> org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer$1 > >> at javassist.util.proxy.ProxyFactory.setField(ProxyFactory.java:356) > >> at > >> javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:339) > >> at > >> javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:312) > >> at > >> javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:271) > >> at > >> > >> > org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:138) > >> ... 171 more > >> > >> > >> This error doesn't prevent deployment. And I have no idea what the > impact > >> of > >> this error is or will be. I can select, and insert via webapp. > >> > >> > >> *Scenario 2:* > >> If I exclude javassist 3.9.0.GA from my Tapestry webapp and leave > jboss's > >> javassist.jar in place, the application deploys without exception. But, > in > >> this case, I encounter an exception in runtime: > >> > >> org.apache.tapestry5.internal.services.TransformationException: > >> javassist.CannotCompileException: broken method > >> > >> InternalClassTransformation[ > >> > >> public com.mycompany.webapp.pages.PasswordHint extends > >> com.mycompany.webapp.pages.BasePage > >> > >> > >> > >> add method: private void _$write_logger_2(org.slf4j.Logger $1) > >> > >> throw new java.lang.RuntimeException("Field > >> com.mycompany.webapp.pages.PasswordHint.logger is read-only."); > >> > >> > >> > >> replace write logger: _$write_logger_2(); > >> .......... > >> > >> > >> I am now following scenario 1, and I have not faced anything weird in > >> runtime? Any suggestions are appreciated:), > >> > >> > >> Thanks... > >> > > > -- Dmitry Gusev AnjLab Team http://anjlab.com