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