[ https://issues.apache.org/jira/browse/WW-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17594330#comment-17594330 ]
Yasser Zamani commented on WW-5217: ----------------------------------- thanks for reaching out! Looks like you're affected by [https://github.com/orphan-oss/ognl/issues/81.] But could you please check from which jar and version your mentioned OgnlContext class comes from?! because I see that in ognl repository this class never have an empty constructor in the first place! I'm wondering how new OgnlContext() i.e. an empty constructor works for you. Have you downgraded ognl by droping jar file manually? > new OgnlContext() is removed > ---------------------------- > > Key: WW-5217 > URL: https://issues.apache.org/jira/browse/WW-5217 > Project: Struts 2 > Issue Type: Bug > Components: Expression Language > Reporter: Alireza Fattahi > Priority: Major > > We used the OGNL in our classes as below > > {code:java} > OgnlExpression ognlExpression = new OgnlExpression(expressionString); > ognlExpression.getValue(new OgnlContext(), rootObject);{code} > > The OgnlExpression is a simple wrapper. > > > {code:java} > public class OgnlExpression{ > private Object expression; > private static final Logger LOG = > LoggerFactory.getLogger(OgnlExpression.class); > public OgnlExpression( String expressionString ) > throws OgnlException > { > super(); > expression = Ognl.parseExpression( expressionString ); > } > public Object getExpression() > { > return expression; > } > public Object getValue( OgnlContext context, Object rootObject ) > throws OgnlException > { > LOG.debug("parse the expression with OGNL"); > return Ognl.getValue( getExpression(), context, rootObject ); > } > public void setValue( OgnlContext context, Object rootObject, Object > value ) > throws OgnlException > { > Ognl.setValue(getExpression(), context, rootObject, value); > } > {code} > > After upgrade to version 6, the `new OgnlContext()` constructor seems to be > removed. I test the `new OgnlContext(null,null,null)` but got illegal > argument exception. > -- This message was sent by Atlassian Jira (v8.20.10#820010)