Reply To: No registered org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider could handle

Splash Forums Rewrite Users No registered org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider could handle Reply To: No registered org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider could handle

#24520

Hi there Antonu,

Sorry for the late reply. I’ve been on vacation and we had a problem with our forum’s notification emails recently.

To begin to attempt to answer this question, I believe you are correct that Tomcat 6 probably bundles a version of the ExpressionFactory that is incompatible with Rewrite. We reference the EL2.2 specification API in our integration-cdi module, so if Tomcat 6 does not supply that API, this could cause problems. This class is responsible for creating the provider.

package org.ocpsoft.rewrite.cdi.expressions;

import javax.el.ExpressionFactory;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.BeanManager;

/**
 * Responsible for producing the {@link ExpressionFactory}
 *
 * @author Stuart Douglas
 * @author Pete Muir
 */
class ExpressionFactoryProducer {

    @Produces
    @Composite
    @ApplicationScoped
    ExpressionFactory createExpressionFactory(BeanManager beanManager) {
        return beanManager.wrapExpressionFactory(ExpressionFactory.newInstance());
    }

}

I believe that CDI actually requires this version of the API to use some features of EL, but I could be wrong. What happens if you try to include an EL implementation of your own? I believe this S.O. question provides a solution – http://stackoverflow.com/questions/2333605/using-el-2-2-with-tomcat-6-0-24

I hope this helps!
~Lincoln