hmm, wonder if it is linked to the value you try to evaluate (which doesn't
respect EL spec even if in CDI spec - don't ask please ;)).. See
https://issues.jboss.org/browse/CDITCK-462 /
http://lists.jboss.org/pipermail/cdi-dev/2015-January/006009.html




Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-09-28 18:17 GMT+02:00 Xavier Dury <[email protected]>:

> Hi Romain,
>
> I tried with org.apache.tomcat:tomcat-jasper-el:8.5.5 but it does not
> parse my expression until I change ".transient" by ".isTransient()" and
> then it gives the same error: javax.el.PropertyNotFoundException:
> ELResolver cannot handle a null base Object with identifier 'javax'.
>
> Does the EL context need something else than adding the
> BeanManager.getELResolver()  to be able to resolve some implicit objects? I
> don't understand why it works with ri-1.0.
>
> Xavier
>
>
> From: Romain Manni-Bucau <[email protected]>
> Sent: Wednesday, September 28, 2016 4:02 PM
> To: [email protected]
> Subject: Re: OpenEJB and EL
>
> Hi Xavier
>
> On the phone so hard to give you a link bit try using tomcat el impl of
> tomcat 8.5
>
> Le 28 sept. 2016 15:29, "Xavier Dury" <[email protected]> a écrit :
>
> > Hi,
> >
> > I am using OpenEJB for my tests and need support for EL expressions in my
> > own code.
> >
> > By default, if I do something like this (pay attention to the
> expression):
> >
> > ExpressionFactory factory = beanManager.wrapExpressionFactory(
> > ExpressionFactory.newInstance());
> > StandardELContext elContext = new StandardELContext(factory);
> > elContext.addELResolver(beanManager.getELResolver());
> > ValueExpression expression = factory.createValueExpression(elContext,
> > "#{javax.enterprise.context.conversation.transient}", Boolean.class);
> > expression.getValue(elContext);
> >
> > and only add org.apache.tomee:openejb-core:7.0.1 to my project then I
> get
> > javax.el.ELException: Unable to find ExpressionFactory of type:
> > org.apache.el.ExpressionFactoryImpl
> >
> > if I add org.glassfish:javax.el:3.0.0 then I get javax.el.
> PropertyNotFoundException:
> > ELResolver cannot handle a null base Object with identifier 'javax'
> >
> > if I switch the EL library to com.sun.el:el-ri:1.0 (+ META-INF/javax.el.
> ExpressionFactory
> > < com.sun.el.ExpressionFactoryImpl) then my expression can be evaluated
> > but I can't use any new feature of 3.0 (like lambdas)
> >
> > So, either my dependencies are wrong or I am not correctly initializing
> my
> > factory.
> >
> > Does anybody have an idea?
> >
> > Thanks,
> >
> > Xavier
>
>

Reply via email to