Hi,

I am new to learn the LambdaExpression , and I am trying to run a test with
JDK7 on Tomcat_8_0_15 server

protected void doGet... {
             ELProcessor elp = new ELProcessor();
            sos.println("Test: " + (LambdaExpression) elp.eval("()->64"));
}

But I always get this error

java.lang.ClassCastException: java.lang.Long incompatible with
javax.el.LambdaExpression



I have also tried passing an empty array in the invoke() per the API

Object[] empty_array = {};
sos.println("Test: " + ((LambdaExpression)
elp.eval("()->64")).invoke(empty_array));

Same Exception,
java.lang.ClassCastException: java.lang.Long incompatible with
javax.el.LambdaExpression


Can someone help and tell me what I am doing wrong.


Thanks,

Reply via email to