Peter,

Thanks for the suggestions!  The error came back after I continued building
that page and one of your methods did work.  I tried upgrading javassist but
that didnt relieve the error and I am using jetty through eclipse with no
try/catch blocks.  Finally I removed the block of my code that seemed to be
erroring out into a private method and everything works fine.  Obviously not
ideal but it will work until t5(or javassist) is a bit more stable in this
area.  Thanks!

Zack


Peter Stavrinides wrote:
> 
> When using Java 6 with Javassist you will come across these problems
> eventually, we have been using it for nearly a year and the good news is
> that it can work reliably. We had to suffer somewhat until we found some
> workarounds though, so anyone with this setup please take note of the
> following:
> 
> - Get the newest version of Javassist, it is a lot better... you can
> override any Tapestry default library by simply including the dependency
> explicitly in your POM.
> - Avoid using try catch if possible in Tapestry render phase methods, this
> is one of the main culprits, if you can use "Throws xyzException" instead
> then use it... also using onException in your page classes can help
> mitigate this by handling some of these error conditions.
> - Granted it is not always possible to avoid a try catch in those methods,
> but often by extracting that portion of your code into a private method
> you can also avoid the transformation errors.
> - For publishing a war before deploying:  If you use eclipse, prefer it
> for compilation, rather than maven/ant command line tools... the command
> line compiler is old and often breaks with Javassist and JDK 1.6...
> eclipse is smarter though and wont.  
> 
> Hope this info helps someone, we are now running in production using
> Tapestry 5 and JDK 6, and all is well.
> 
> Best wishes
> Peter
> 
> ----- Original Message -----
> From: "zack1403" <[EMAIL PROTECTED]>
> To: users@tapestry.apache.org
> Sent: Saturday, 10 May, 2008 6:12:16 AM GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: TransformationException/ClassNotFoundException
> 
> 
> Actually I found an unlikely workaround (for my case at least).  All I did
> was move the entire ContactUpload property to the top of the class.  For
> whatever reason the error went away.  I am really not familiar with
> Javassist but at least there is a workaround to this.  Of course I am open
> to any solution that would prevent this in the future.
> 
> Zack
> 
> 
> Filip S. Adamsen-2 wrote:
>> 
>> For what it's worth I saw the same errors earlier while using the 
>> @Cached annotation. Removing the annotation made the errors go away. 
>> Following the advice in the linked mail, on the other hand, doesn't help.
>> 
>> But it doesn't happen all the time - I use @Cached lots, and it was only 
>> two specific instances that didn't work. But then again both of those 
>> were inside loops, which is a problem according to the mail.
>> 
>> So, would the solution be a downgrade of Javassist, if that's even
>> possible?
>> 
>> -Filip
>> 
>> On 2008-05-09 23:28, Josh Canfield wrote:
>>> This is what I found about it from googling...
>>> http://article.gmane.org/gmane.comp.java.tapestry.user/59171
>>> 
>>> I don't have personal experience with the problem, just remembered it
>>> being mentioned.
>>> 
>>> On Fri, May 9, 2008 at 2:11 PM, zack1403 <[EMAIL PROTECTED]> wrote:
>>>> I am running java 1.6.0_03 on Ubuntu 7.  5.0.11 is my tapestry version.
>>>>
>>>> Hmm that would make sense then.  Do you know of a workaround?
>>>>
>>>> Thanks for the quick reply,
>>>> Zack
>>>>
>>>>
>>>> joshcanfield wrote:
>>>>> Are you running with Java6? I believe at one point there was a defect
>>>>> in a version of javaassist that would cause the
>>>>> ArrayIndexOutOfBoundsException you are seeing. What version of
>>>>> Tapestry are you running?
>>>>>
>>>>> Josh
>>>>>
>>>>>
>>>>> On Fri, May 9, 2008 at 1:50 PM, zack1403 <[EMAIL PROTECTED]>
>>>>> wrote:
>>>>>> Hi All,
>>>>>>
>>>>>> Im getting a very wierd error that isnt very descriptive.  When just
>>>>>> loading
>>>>>> this page: http://pastebin.com/m141bdd4d, I get this error:
>>>>>> http://pastebin.com/m5f42dd31.
>>>>>>
>>>>>> If I refresh the error page I get a new error:
>>>>>> http://pastebin.com/m1859133b
>>>>>>
>>>>>> Removing the ContactUpload property seems to make it work but so does
>>>>>> commenting out line 33.  The error just doesnt seem to make sense to
>>>>>> me.
>>>>>> Any ideas?
>>>>>>
>>>>>> Thanks,
>>>>>> Zack
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/TransformationException-ClassNotFoundException-tp17156180p17156180.html
>>>>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> TheDailyTube.com. Sign up and get the best new videos on the internet
>>>>> delivered fresh to your inbox.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/TransformationException-ClassNotFoundException-tp17156180p17156492.html
>>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>> 
>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 

-- 
View this message in context: 
http://www.nabble.com/TransformationException-ClassNotFoundException-tp17156180p17189710.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to