Hi 
So after much debugging I found that:
 
1.    Our class is available in the WebappClassLoader because 
classLoader.loadClass(“com.algorithmics.opvantage.model.domain.Event”) returns 
the class. The problem is that the bytecode enhancement for ongl uses javassist 
to find the class and if the class is not already in the HiveMindClassPool 
cache then an attempt to create a new javassist.CtClassType.CtClassType but 
doesn’t use classLoader.loadClass but rather 
classLoader.getResource(“com/algorithmics/opvantage/model/domain/Event.class”) 
which of course doesn’t exist because these classes are compiled at app 
startup. Is there some way to add our classes to the HiveMindClassPool at 
startup? If we could do that then I think all would work as expected.  




2.    Also the error about not finding the 
com.algorithmics.opvantage.model.domain.Event while being a problem doesn’t 
actually stop the rendering the page because once the bytecode enhancement 
fails it falls back to the old ongl way of resolving. 

The problem being in ExpressionEvaluatorImpl line 141 the context that is 
passed has no root set(it should be the page) so the dynamic 
sharedPickerProperty in content.domain[sharedPickerProperty] fails with ognl 
null source error. I guess that is a bug. Also if failsafe is allowed shouldn’t 
the error level of bytecode enhancement be WARN and not ERROR(when using 
content.domain.startDate the page renders but these exceptions are in the 
logs!)?
 
Thanks in advance
Howard
 
 
 
 
On Tue, 12 May 2009 16:49:57 GMT,  <hls...@gmail.com> wrote:
> 
>It would be helpful to see the Domain class. Perhaps there's an
>overloaded method that's confusing the OGNL code. As you can see, it's
>trying to generate bytecode for your expression, but failing for some
>reason. Classloader issues can get very tricky inside this kind of
>code.
 
On Tue, May 12, 2009 at 8:12 AM,  <howard.kel...@algorithmics.com> wrote:
> 
> Hi
> Ognl in 4.1.6 is behaving rather strangely(I believe this must be a bug)! 
> We're trying
>to upgrade from 4.0.2.
> Here's a simplified version of what's happening in an insert component. 
> value="ognl:content.domain['startDate']"
>renders correctly however value="ognl:content.domain[sharedPickerProperty]" 
>where sharedPickerProperty
>is a property of the page and has initial-value="literal:startDate" results in
> org.apache.tapestry.services.impl.HiveMindExpressionCompiler] 
> context=/opvantage - Error
>generating OGNL getter for expression content.domain[sharedPickerProperty] 
>with root $domainbase...@3c1[edit:Event]
>and body:
> { return 
> ((com.algorithmics.opvantage.model.domain.Event)(($DomainBase_42)$2).getContent().getDomain()).getStartDate();}
> org.apache.hivemind.ApplicationRuntimeException: Unable to add method 
> java.lang.Object
>get(ognl.OgnlContext, java.lang.Object) to class $ASTChain_121354aa5aa: 
>[source error] no
>such class: com.algorithmics.opvantage.model.domain.Event
> 
> Now obviously com.algorithmics.opvantage.model.domain.Event does exist 
> because content.domain['startDate']
>works!
> How can we get around this because in a dynamic application like ours we 
> don't have the
>luxury of doing content.domain.startDate/content.domain['startDate'] because 
>we don't know
>what the property name is at .page creation.
> Any help would be greatly appreciated.
> Thanks in advance
> Howard
> 
> 
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary 
> to Algorithmics
>Incorporated and its affiliates ("Algorithmics"). If received in error, use is 
>prohibited.
>Please destroy, and notify sender. Sender does not waive confidentiality or 
>privilege. Internet
>communications cannot be guaranteed to be timely, secure, error or virus-free. 
>Algorithmics
>does not accept liability for any errors or omissions. Any commitment intended 
>to bind Algorithmics
>must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
> 
 
 
 
-- 
Howard M. Lewis Ship
 
Creator of Apache Tapestry
Director of Open Source Technology at Formos
 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 
 
 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary 
to Algorithmics
Incorporated and its affiliates ("Algorithmics"). If received in error, use is 
prohibited.
Please destroy, and notify sender. Sender does not waive confidentiality or 
privilege. Internet
communications cannot be guaranteed to be timely, secure, error or virus-free. 
Algorithmics
does not accept liability for any errors or omissions. Any commitment intended 
to bind Algorithmics
must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------

 

 


 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary 
to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received 
in error, use is prohibited. Please destroy, and notify sender. Sender does not 
waive confidentiality or privilege. Internet communications cannot be 
guaranteed to be timely, secure, error or virus-free. Algorithmics does not 
accept liability for any errors or omissions. Any commitment intended to bind 
Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------

Reply via email to