users@glassfish.java.net

Jboss ExpressionFactory in Glassfish V2ur2

From: <glassfish_at_javadesktop.org>
Date: Mon, 08 Sep 2008 04:45:46 PDT

hello, i'm having troubles deploying a web application which uses facelets, richfaces, spring and hibernate in glassfish.
The error generated by glassfish is:

Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/RichBollette'
Error Instantiating ExpressionFactory
java.lang.ClassNotFoundException: org.jboss.el.ExpressionFactoryImpl
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at com.sun.faces.config.ConfigureListener.installExpressionFactory(ConfigureListener.java:1521)
        at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1540)
        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:403)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4523)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5184)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:326)
        at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:58)
        at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:304)
        at com.sun.appserv.management.util.misc.RunnableBase._submit(RunnableBase.java:176)
        at com.sun.appserv.management.util.misc.RunnableBase.submit(RunnableBase.java:192)
        at com.sun.enterprise.web.VirtualServer.startChildren(VirtualServer.java:1672)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1231)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:955)
        at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:58)
        at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:304)
        at com.sun.appserv.management.util.misc.RunnableBase._submit(RunnableBase.java:176)
        at com.sun.appserv.management.util.misc.RunnableBase.submit(RunnableBase.java:192)
        at com.sun.enterprise.web.EmbeddedWebContainer$WebEngine.startChildren(EmbeddedWebContainer.java:453)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1231)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:533)
        at org.apache.catalina.startup.Embedded.start(Embedded.java:936)
        at com.sun.enterprise.web.WebContainer.start(WebContainer.java:873)
        at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:790)
        at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:84)
        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442)
        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:411)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)


The application works fine with the standard el-ri.jar, so I guess it's only a classpath problem. In my web.xml I've added these lines, as suggested at http://www.ilikespam.com/blog/el-function-parameters-with-jboss-el:

<!-- jboss el expressions allow method params -->
    <context-param>
        <param-name>com.sun.faces.expressionFactory</param-name>
        <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
    </context-param>

I've tried first to add jboss-el.jar to the webapplication with no luck, then I've put it directly in $GLASSFISH_HOME\domains\domain1\lib but, again, no luck.

I'm using netbeans 6.1.

I suppose that at deployment time glassfish tries to initialize the JSF environment with a different classloader, whose classpath I don't know how to configure in netbeans. Is it correct or am I missing something?

thanks
Pierangelo Terzulli
[Message sent by forum member 'pierigno' (pierigno)]

http://forums.java.net/jive/thread.jspa?messageID=297777