You probably need to import services:

    <module name="org.glassfish.javax.el" services="import" />

Stuart

On Sun, Aug 28, 2016 at 8:40 PM, Carl Harris <ceharris414@me.com> wrote:
This may not be the right place to ask this question -- feel free to redirect me as appropriate.

I have a CDI extension packaged as a Wildfly module. The extension evaluates some EL expressions. In order to evaluate the expressions it calls javax.el.ExpressionFactory.newInstance() to get an ExpressionFactory. However, when calling this method an exception is thrown:

Caused by: javax.el.ELException: Provider com.sun.el.ExpressionFactoryImpl not found
        at javax.el.FactoryFinder.newInstance(FactoryFinder.java:102)
        at javax.el.FactoryFinder.find(FactoryFinder.java:186)
        at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:197)
        at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:168)
        at javax.el.ELUtil.<clinit>(ELUtil.java:99)
        ... 50 more
Caused by: java.lang.ClassNotFoundException: com.sun.el.ExpressionFactoryImpl from [Module \"javax.el.api:main\" from local module loader @18ef96 (finder: local module finder @6956de9 (roots: /tmp/wildfly-10.0.0.Final/modules,/tmp/wildfly-10.0.0.Final/modules/system/layers/base))]


I *think* the module descriptor has the right dependencies, but evidently I’m missing something.

<module xmlns="urn:jboss:module:1.0" name="org.soulwing.pinject" slot="main">
  <resources>
    <resource-root path="pinject-extension-1.2.0-SNAPSHOT.jar" />
  </resources>

  <dependencies>
    <module name="org.soulwing.pinject.api" />
    <module name="org.glassfish.javax.el" />
    <module name="javax.inject.api" />
    <module name="javax.enterprise.api"/>
    <module name="javax.mail.api" />
    <module name="javax.el.api" />
    <module name="javax.api" />
  </dependencies>

</module>

I’ve looked at some other Wildfly modules that use EL (e.g. Hibernate Validator), but I haven’t been able to discern what they’re doing differently.

carl


_______________________________________________
wildfly-dev mailing list
wildfly-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev