Re: Transformation Exception

2010-05-20 Thread Matheus Eduardo Machado Moreira
   Greg,

   I had a similar error and fixed it updating the Javassist dependency (now
my project depends on javassist:javassit:3.9.0.GA - the old one was
jboss:javassist:3.6.0). Co-workers told me that they used to follow certain
"code conventions" that prevented Javassist to write wrong transformations
(eg. using getter/setter instead of direct property access, don't put a lot
of code inside onActivate() - put the logic on a private method and call the
method inside onActivate()).

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

"Violence is the last refuge of the incompetent."
   Salvor Hardin (The Foundation, Isaac Asimov)


2010/5/20 Greg Pagendam-Turner 

> Thanks Howard,
>
> I changed the project to compile as jdk 1.5 and removed any @Override
> annotations. The code compiles but still generates the same error under
> tomcat6. I get the same error under Jetty 7. The solution for me is to run
> Jetty 6 in production which doesn't seem to produce any of these errors.
>
> I understand that JavaAssist will be removed from Tapestry 5.2. Any idea on
> when it will be released yet?
>
> Also, I've written my first ajax component and am really starting to see
> the potential of the Tapestry model.
>
> Regards,
>
> Greg.
>
>
>
> On 19/05/2010 3:48 PM, Howard Lewis Ship wrote:
>
>> Your best bet for dealing with these issues is to first try compiling
>> for JDK 1.5, even if you are deploying on 1.6.  You can see why we're
>> working to take Javassist out of the picture!
>>
>> On Tue, May 18, 2010 at 6:26 PM, Greg Pagendam-Turner
>>   wrote:
>>
>>
>>> Guys,
>>>
>>> I'm getting a transformation exception for one of my pages. It only
>>> occurs
>>> in tomcat6 in production but not under jetty in development.
>>>
>>> I'd appreciate any ideas on how to track this down please.
>>>
>>>
>>>  An unexpected application exception has occurred.
>>>
>>>   * java.lang.RuntimeException
>>> java.lang.ClassNotFoundException: caught an exception while
>>> obtaining a class file for
>>> com.liftyourgame.application.pages.EditGoal
>>>   * java.lang.ClassNotFoundException
>>> caught an exception while obtaining a class file for
>>> com.liftyourgame.application.pages.EditGoal
>>>
>>> exception
>>> org.apache.tapestry5.internal.services.TransformationException: 4
>>>
>>>   * org.apache.tapestry5.internal.services.TransformationException
>>> 4
>>>
>>> transformation
>>>
>>> InternalClassTransformation[
>>> public com.liftyourgame.application.pages.EditGoal extends
>>> java.lang.Object
>>>implements org.apache.tapestry5.runtime.Component,
>>> org.apache.tapestry5.runtime.RenderCommand
>>>
>>> add default method: public void postRenderCleanup()
>>> 
>>>
>>> add default method: public void
>>> setupRender(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> beginRender(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> beforeRenderTemplate(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> afterRenderTemplate(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> beforeRenderBody(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> afterRenderBody(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> afterRender(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> cleanupRender(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public boolean
>>> dispatchComponentEvent(org.apache.tapestry5.runtime.ComponentEvent $1)
>>> 
>>>
>>> add default method: public
>>> org.apache.tapestry5.ComponentResources
>>> getComponentResources()
>>> 
>>>
>>> add default method: public void containingPageDidLoad()
>>> 
>>>
>>> add default method: public void containingPageDidDetach()
>>> 
>>>
>>> add default method: public void containingPageDidAttach()
>>> 
>>>
>>> add default method: public void restoreStateBeforePageAttach()
>>> 
>>>
>>> add field: protected final
>>> org.apache.tapestry5.internal.InternalComponentResources _$resources;
>>>
>>> replace method: public final
>>> org.apache.tapestry5.ComponentResources
>>> getComponentResources()
>>> return _$resources;
>>>
>>> add method: private void _$w

Re: Transformation Exception

2010-05-19 Thread Greg Pagendam-Turner

Thanks Howard,

I changed the project to compile as jdk 1.5 and removed any @Override 
annotations. The code compiles but still generates the same error under 
tomcat6. I get the same error under Jetty 7. The solution for me is to 
run Jetty 6 in production which doesn't seem to produce any of these errors.


I understand that JavaAssist will be removed from Tapestry 5.2. Any idea 
on when it will be released yet?


Also, I've written my first ajax component and am really starting to see 
the potential of the Tapestry model.


Regards,

Greg.


On 19/05/2010 3:48 PM, Howard Lewis Ship wrote:

Your best bet for dealing with these issues is to first try compiling
for JDK 1.5, even if you are deploying on 1.6.  You can see why we're
working to take Javassist out of the picture!

On Tue, May 18, 2010 at 6:26 PM, Greg Pagendam-Turner
  wrote:
   

Guys,

I'm getting a transformation exception for one of my pages. It only occurs
in tomcat6 in production but not under jetty in development.

I'd appreciate any ideas on how to track this down please.


  An unexpected application exception has occurred.

   * java.lang.RuntimeException
 java.lang.ClassNotFoundException: caught an exception while
 obtaining a class file for com.liftyourgame.application.pages.EditGoal
   * java.lang.ClassNotFoundException
 caught an exception while obtaining a class file for
 com.liftyourgame.application.pages.EditGoal

 exception
 org.apache.tapestry5.internal.services.TransformationException: 4

   * org.apache.tapestry5.internal.services.TransformationException
 4

 transformation

 InternalClassTransformation[
 public com.liftyourgame.application.pages.EditGoal extends
java.lang.Object
implements org.apache.tapestry5.runtime.Component,
org.apache.tapestry5.runtime.RenderCommand

 add default method: public void postRenderCleanup()
 

 add default method: public void
setupRender(org.apache.tapestry5.MarkupWriter $1,
org.apache.tapestry5.runtime.Event $2)
 

 add default method: public void
beginRender(org.apache.tapestry5.MarkupWriter $1,
org.apache.tapestry5.runtime.Event $2)
 

 add default method: public void
beforeRenderTemplate(org.apache.tapestry5.MarkupWriter $1,
org.apache.tapestry5.runtime.Event $2)
 

 add default method: public void
afterRenderTemplate(org.apache.tapestry5.MarkupWriter $1,
org.apache.tapestry5.runtime.Event $2)
 

 add default method: public void
beforeRenderBody(org.apache.tapestry5.MarkupWriter $1,
org.apache.tapestry5.runtime.Event $2)
 

 add default method: public void
afterRenderBody(org.apache.tapestry5.MarkupWriter $1,
org.apache.tapestry5.runtime.Event $2)
 

 add default method: public void
afterRender(org.apache.tapestry5.MarkupWriter $1,
org.apache.tapestry5.runtime.Event $2)
 

 add default method: public void
cleanupRender(org.apache.tapestry5.MarkupWriter $1,
org.apache.tapestry5.runtime.Event $2)
 

 add default method: public boolean
dispatchComponentEvent(org.apache.tapestry5.runtime.ComponentEvent $1)
 

 add default method: public org.apache.tapestry5.ComponentResources
getComponentResources()
 

 add default method: public void containingPageDidLoad()
 

 add default method: public void containingPageDidDetach()
 

 add default method: public void containingPageDidAttach()
 

 add default method: public void restoreStateBeforePageAttach()
 

 add field: protected final
org.apache.tapestry5.internal.InternalComponentResources _$resources;

 replace method: public final org.apache.tapestry5.ComponentResources
getComponentResources()
 return _$resources;

 add method: private void _$write_currentLocale(java.util.Locale $1)
 throw new java.lang.RuntimeException("Field
com.liftyourgame.application.pages.EditGoal._currentLocale is read-only.");

 replace write _currentLocale: _$write_currentLocale();

 add method: private void
_$write_resources(org.apache.tapestry5.ComponentResources $1)
 throw new java.lang.RuntimeException("Field
com.liftyourgame.application.pages.EditGoal._resources is read-only.");

 replace write _resources: _$write_resources();

 add method: private void
_$write_actionDAO(com.liftyourgame.data.ActionDAO $1)
 throw new java.lang.RuntimeException("Field
com.liftyourgame.application.pages.EditGoal.actionDAO is read-only.");

 replace write actionDAO: _$write_actionDAO();

 add method: private void
_$write_goalDAO(com.liftyourgame.data.GoalDAO $1)
 throw new java.lang.RuntimeException("Field
com.liftyourgame.application.pages.EditGoal.goalDAO is read-only.");

 replace write goalDAO: _$write_goalDAO();

 add method: private void
_$write_form(org

Re: Transformation Exception

2010-05-18 Thread Howard Lewis Ship
Your best bet for dealing with these issues is to first try compiling
for JDK 1.5, even if you are deploying on 1.6.  You can see why we're
working to take Javassist out of the picture!

On Tue, May 18, 2010 at 6:26 PM, Greg Pagendam-Turner
 wrote:
> Guys,
>
> I'm getting a transformation exception for one of my pages. It only occurs
> in tomcat6 in production but not under jetty in development.
>
> I'd appreciate any ideas on how to track this down please.
>
>
>  An unexpected application exception has occurred.
>
>   * java.lang.RuntimeException
>     java.lang.ClassNotFoundException: caught an exception while
>     obtaining a class file for com.liftyourgame.application.pages.EditGoal
>   * java.lang.ClassNotFoundException
>     caught an exception while obtaining a class file for
>     com.liftyourgame.application.pages.EditGoal
>
>     exception
>         org.apache.tapestry5.internal.services.TransformationException: 4
>
>   * org.apache.tapestry5.internal.services.TransformationException
>     4
>
>     transformation
>
>         InternalClassTransformation[
>         public com.liftyourgame.application.pages.EditGoal extends
> java.lang.Object
>            implements org.apache.tapestry5.runtime.Component,
> org.apache.tapestry5.runtime.RenderCommand
>
>         add default method: public void postRenderCleanup()
>         
>
>         add default method: public void
> setupRender(org.apache.tapestry5.MarkupWriter $1,
> org.apache.tapestry5.runtime.Event $2)
>         
>
>         add default method: public void
> beginRender(org.apache.tapestry5.MarkupWriter $1,
> org.apache.tapestry5.runtime.Event $2)
>         
>
>         add default method: public void
> beforeRenderTemplate(org.apache.tapestry5.MarkupWriter $1,
> org.apache.tapestry5.runtime.Event $2)
>         
>
>         add default method: public void
> afterRenderTemplate(org.apache.tapestry5.MarkupWriter $1,
> org.apache.tapestry5.runtime.Event $2)
>         
>
>         add default method: public void
> beforeRenderBody(org.apache.tapestry5.MarkupWriter $1,
> org.apache.tapestry5.runtime.Event $2)
>         
>
>         add default method: public void
> afterRenderBody(org.apache.tapestry5.MarkupWriter $1,
> org.apache.tapestry5.runtime.Event $2)
>         
>
>         add default method: public void
> afterRender(org.apache.tapestry5.MarkupWriter $1,
> org.apache.tapestry5.runtime.Event $2)
>         
>
>         add default method: public void
> cleanupRender(org.apache.tapestry5.MarkupWriter $1,
> org.apache.tapestry5.runtime.Event $2)
>         
>
>         add default method: public boolean
> dispatchComponentEvent(org.apache.tapestry5.runtime.ComponentEvent $1)
>         
>
>         add default method: public org.apache.tapestry5.ComponentResources
> getComponentResources()
>         
>
>         add default method: public void containingPageDidLoad()
>         
>
>         add default method: public void containingPageDidDetach()
>         
>
>         add default method: public void containingPageDidAttach()
>         
>
>         add default method: public void restoreStateBeforePageAttach()
>         
>
>         add field: protected final
> org.apache.tapestry5.internal.InternalComponentResources _$resources;
>
>         replace method: public final org.apache.tapestry5.ComponentResources
> getComponentResources()
>         return _$resources;
>
>         add method: private void _$write_currentLocale(java.util.Locale $1)
>         throw new java.lang.RuntimeException("Field
> com.liftyourgame.application.pages.EditGoal._currentLocale is read-only.");
>
>         replace write _currentLocale: _$write_currentLocale();
>
>         add method: private void
> _$write_resources(org.apache.tapestry5.ComponentResources $1)
>         throw new java.lang.RuntimeException("Field
> com.liftyourgame.application.pages.EditGoal._resources is read-only.");
>
>         replace write _resources: _$write_resources();
>
>         add method: private void
> _$write_actionDAO(com.liftyourgame.data.ActionDAO $1)
>         throw new java.lang.RuntimeException("Field
> com.liftyourgame.application.pages.EditGoal.actionDAO is read-only.");
>
>         replace write actionDAO: _$write_actionDAO();
>
>         add method: private void
> _$write_goalDAO(com.liftyourgame.data.GoalDAO $1)
>         throw new java.lang.RuntimeException("Field
> com.liftyourgame.application.pages.EditGoal.goalDAO is read-only.");
>
>         replace write goalDAO: _$write_goalDAO();
>
>         add method: private void
> _$write_form(org.apache.tapestry5.corelib.components.Form $1)
>         throw new java.lang.RuntimeException("Field
> com.liftyourgame.application.pages.EditGoal._form is read-only.");
>
>         replace write _form: _$write_form();
>
>         extend method: public void containingPageDidLoad()
>         _form = (org.apache.tapestry5.corelib.components.Form)
> _$resources.getEmbeddedComponent("goalForm");
>
>         extend method: public boolean
> dispa