After a jboss restart and clean deploy, the application is deployed fine. Below is what I did:
- javassist.jar is removed from JBOSS_HOME/server/default/lib folder. - javassist-3.9.0-GA.jar is put inside JBOSS_HOME/server/default/lib folder. - javassist-3.9.0-GA.jar is removed from WEB-INF/lib directory. Thanks for your response. On Fri, Jul 9, 2010 at 11:12 AM, Halil Karakose <halilkarak...@gmail.com>wrote: > Actually this is the default Appfuse User class. And the class has no-arg > constructor. > > I've been debuggin jboss now. During jboss startup, > javassist.util.proxy.ProxyFactory.setField() method throws the exception in > the following highlighted line. > > private void setField(String fieldName, Object value) { > if(thisClass != null && value != null) > > try { Field f = thisClass.getField(fieldName); > SecurityActions.setAccessible(f, true); > *f.set(null, value);* > SecurityActions.setAccessible(f, false); > } > catch(Exception e) { > throw new RuntimeException(e); > } > } > * > Values Of setField() Parameters:* > value= instance of > "org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer" > fieldName="_method_filter" > > In the highlighted line, JavassistLazyInitializer cannot be set to null. > > If I set a breakpoint to the highlighted line and set the > JavassistLazyInitializer instance to null, exception does not occur. > > On Thu, Jul 8, 2010 at 11:58 AM, Dmitry Gusev <dmitry.gu...@gmail.com>wrote: > >> 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 >> > >