Announcement Announcement Module
Collapse
No announcement yet.
Prerequisit Question on SWF2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Prerequisit Question on SWF2

    I have a simple question. Does SWF2 require JEE5? I'm trying to setup SWF2 to work with WebSphere 6.0.x and am getting NoClassDefFoundError exception for ELContext class. This occurs when the servers start up and initializes the spring servlet. Below are the exceptions that I'm getting. Any help would be greatly appreciated.

    Code:
    java.lang.NoClassDefFoundError: javax/el/ELContext
    	at java.lang.Class.getDeclaredConstructors0(Native Method)
    	at java.lang.Class.privateGetDeclaredConstructors(Class.java:1747)
    	at java.lang.Class.getConstructor1(Class.java:2063)
    	at java.lang.Class.getConstructor(Class.java:1124)
    	at com.sun.faces.util.Util.createInstance(Util.java:1143)
    	at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:488)
    	at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:400)
    	at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:328)
    	at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1467)
    	at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:440)
    	at com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:123)
    	at com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:146)
    	at com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:940)
    	at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:893)
    	at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:167)
    	at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:391)
    	at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1249)
    	at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1067)
    	at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:547)
    	at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:751)
    	at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:913)
    	at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2058)
    	at com.ibm.ws.runtime.component.ComponentImpl$_AsynchInitializer.run(ComponentImpl.java:304)
    	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)
    AND

    Code:
    [7/15/08 14:27:42:113 EDT] 00000017 ServletWrappe E   SRVE0100E: Did not realize  init() exception thrown by servlet Spring MVC Dispatcher Servlet: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 107 in XML document from class path resource [pf-admin-spring-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:executor'.
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    	at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1467)
    	at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:440)
    	at com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:123)
    	at com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:146)
    	at com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:940)
    	at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:893)
    	at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:167)
    	at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:391)
    	at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1249)
    	at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1067)
    	at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:547)
    	at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:751)
    	at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:913)
    	at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2058)
    	at com.ibm.ws.runtime.component.ComponentImpl$_AsynchInitializer.run(ComponentImpl.java:304)
    	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)
    Last edited by mczauz; Jul 16th, 2008, 08:48 AM.

  • #2
    Ok, I've figured out the parsing exception. It had to do with incorrect schema. But I still can't figure out the java.lang.NoClassDefFoundError: javax/el/ELContext. It seems that this exception occurs as soon as I add the spring faces jar file. Any ideas? It it occurring during the execution of the ContextLoaderListener.

    Comment


    • #3
      As far as I know OGNL and JBoss-EL are supported. Which one do you use?

      - Peter

      Comment


      • #4
        Websphere 6 is only a J2EE 1.4 level server and therefore doesn't have the required unified EL JARs.

        You should be able to get it up and going with jboss-el jars instead.

        Comment


        • #5
          I've tried with both Jars: jboss-el-2.0.1.GA AND ognl-2.6.9.jar, but I'm still getting the same exception. The weird thing is that I took all the SWF 2 configuration out of my context file and only left the ContextLoaderListener configuration in the web.xml, and am still seeing the same exception. The only way for me to get rid of the exception is to remove the spring faces JAR file. Is there any specific configuration that needs to be applied to use either of the two EL jars? Based on the documentation is states that jboss-el will be used by default, but if OGNL is placed in the classpath, it will be used. Does any body have a sample project that uses SWF 2 and JSF that can be deployed on WebSphere 6 for me to take a look at it? Also, looking at the two jar files, none of them actually contain the class in question.

          Comment


          • #6
            The class in question is part of the Unified EL API which is in el-api.jar. This API jar is available at the java.net Maven repo here:

            http://download.java.net/maven/2/javax/el/el-api/

            With that said, the Unified EL API requires Java 5 in general (though there is an older version of el-api that runs on Java 1.4). Are you saying you are unable to deploy with no Unified EL jar file and OGNL in your classpath instead? Spring Faces should not require Java 5--the basic functionality should run on 1.4 and JSF 1.1.

            Keith
            Last edited by Keith Donald; Jul 17th, 2008, 02:54 PM.

            Comment


            • #7
              Spring Faces does need the EL API available, even if you are using OGNL as the Web Flow expression parser. You can find Java 1.4 compatible versions of the EL jars in the Facelets 1.0.1 distribution here:

              https://facelets.dev.java.net/files/...lets-1.0.1.zip

              Note that this does not mean you need to use Facelets 1.0.1, you just need the EL jars included there.

              Comment


              • #8
                I managed to deploy the booking-faces sample app on Websphere. At first I thought I'd managed it on 6.0 but now remember it was 6.1 (which includes Java 5 VM but is still J2EE1.4)

                I would suggest life is much easier if you can go to 6.1...

                Anyway, to get the sample app going I created a new web app project in Websphere and manually copied the content of the sample app into the relevant locations. (I couldn't just import the sample app into the workspace)

                Hope that helps...

                Comment

                Working...
                X