Hello Bruno, I found the problem
it was caused by a clash between pinpointing ext-scripting onto the entire projects path and the classloader hierarchy. Myfaces tried to load the class internally which then should have been served originally from spring and cglib, and since ext-scripting had higher priority it took over and served the class falsely.

I cannot fix that for now, but for such cases I added a bypass:

Following: use
    <context-param>
<description>a comma separated whitelist of root packages which are compiled those and nothing else will be compiled during all compile stages, all other files stay permanently as they are
        </description>

<param-name>org.apache.myfaces.extensions.scripting.PGK_WHITELIST</param-name>
        <param-value>uk.ac.ebi.intact.editor.component</param-value>
    </context-param>


to pinpoint ext-scripting to the packages hosting the reloadable artifacts then it should start to work (do not forget to fetch the latest version from the trunk or 1.0 branch - I fixed another bug regarding whitelisting along the way)


Werner

Am 18.05.10 20:19, schrieb Bruno Aranda:
I will try to have a smaller app, but cannot promise anything as it is not a
priority (just yet!). Thanks Werner :)

Bruno

On 18 May 2010 19:08, Werner Punz<[email protected]>  wrote:

Bruno, can you isolate the problem to a small sample
so that I can have a look at it on friday?

Werner


Am 18.05.10 20:04, schrieb Werner Punz:

  Actually not yet, unless you want to use those beans dynamically via
ext-script, that is not yet supported (only pure jsf beans are)
I will look into the issue on friday however, when I am going to pick up
the work on Ext-Scripting again.
Normally I cannot really think of an issue here, because all
Ext-Scripting does is mistly to provide its own el resolver
which only triggers if the class is a dynamic one, if not it resolves to
the other resolvers in the chain. There is no real magic going on
which interferes on class level which should prevent cglib to work.


Werner



Am 18.05.10 16:54, schrieb Bruno Aranda:

Hi,

I am testing the ext-scripting module, which is really a great time
saver :)
However, there seems to be some problems with Spring bean proxies that
I use
in my project as managed beans.

For instance, I have a PublicationController, that extends an
AnnotationController. Spring creates a CGLIB proxy of the former, and
then I
get this exception when using ext-scripting. Any ideas?

at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: Cannot convert

uk.ac.ebi.intact.editor.controller.publication.publicationcontrol...@3d3bd50eof

type class

uk.ac.ebi.intact.editor.controller.publication.PublicationController$$EnhancerByCGLIB$$e33d8a6b

to class
uk.ac.ebi.intact.editor.controller.shared.AnnotatedObjectController
at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:397)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:222)
at

org.apache.myfaces.view.facelets.el.TagValueExpression.getValue(TagValueExpression.java:84)

at

javax.faces.component._ComponentAttributesMap.get(_ComponentAttributesMap.java:246)

at

org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver$CompositeComponentAttributesMapWrapper.get(CompositeComponentELResolver.java:236)

at javax.el.MapELResolver.getValue(MapELResolver.java:196)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
at

org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142)

at

org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.ELResolverProxy.getValue(ELResolverProxy.java:49)

at com.sun.el.parser.AstValue.getValue(AstValue.java:116)
at com.sun.el.parser.AstValue.getValue(AstValue.java:163)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219)
at

org.apache.myfaces.view.facelets.el.LocationValueExpression.getValue(LocationValueExpression.java:89)

at

org.apache.myfaces.view.facelets.el.TagValueExpression.getValue(TagValueExpression.java:84)

at
javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:243)
at javax.faces.component.UIData.getValue(UIData.java:1085)
at javax.faces.component.UIData.createDataModel(UIData.java:1033)
at javax.faces.component.UIData.getDataModel(UIData.java:1010)
at javax.faces.component.UIData.getRowCount(UIData.java:442)
at

org.apache.myfaces.renderkit.ErrorPageWriter$ExtendedComponentTreeVisitCallback.visit(ErrorPageWriter.java:905)

at

org.apache.myfaces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:139)

at javax.faces.component.UIComponent.visitTree(UIComponent.java:750)
at javax.faces.component.UIData.visitTree(UIData.java:1224)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:763)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:763)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at

org.apache.myfaces.renderkit.ErrorPageWriter._writeExtendedComponentTree(ErrorPageWriter.java:678)

at

org.apache.myfaces.renderkit.ErrorPageWriter.debugHtml(ErrorPageWriter.java:324)

at

org.apache.myfaces.view.facelets.tag.ui.UIDebug.writeDebugOutput(UIDebug.java:127)

at

org.apache.myfaces.view.facelets.tag.ui.UIDebug.encodeBegin(UIDebug.java:114)

at javax.faces.component.UIComponent.encodeAll(UIComponent.java:605)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
at

org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1139)

at

org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:231)

at

org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:86)

at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:210)
... 62 more

Any ideas? Thanks!

Bruno










Reply via email to