3 Replies Latest reply on Feb 12, 2008 8:11 AM by Shane Bryzak

    Retrofitting SEAM to existing JSF project

    Ted Liefeld Newbie

      Hi,

      I am trying to retrofit SEAM into an existing project and haven't been able to find any description how to do so. The existing project is

      JSF + facelets + hibernate+ maven

      deployed on Tomcat 6.

      I have tried copying the JPA example (adding SEAM filter & listener to web.xml, jar files, seam.properties, components.xml) but can only seem to generate the following error

      java.lang.NullPointerException
      at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
      at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)

      Is there some documentation on how to add SEAM to an existing project?

      Thanks

        • 1. Re: Retrofitting SEAM to existing JSF project
          Ted Liefeld Newbie

          should have mentioned earlier, also using RichFaces & Ajax4JSF in the legacy application. The full stack trace I see is

          java.lang.NullPointerException
          org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
          org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
          javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
          com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
          com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:72)
          org.ajax4jsf.context.AjaxContext.getCurrentInstance(AjaxContext.java:101)
          org.ajax4jsf.application.AjaxViewHandler.createView(AjaxViewHandler.java:83)
          com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:201)
          com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
          com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
          javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
          org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
          edu.mit.broad.util.HibernateSessionRequestFilter.doFilter(HibernateSessionRequestFilter.java:30)
          edu.mit.broad.security.AuthenticationFilter.doFilter(AuthenticationFilter.java:59)

          note

          • 2. Re: Retrofitting SEAM to existing JSF project
            Nicklas Karlsson Master

            I would consider starting a fresh project using the Eclipse JBoss Tools plugins and copy&paste the code into that...

            • 3. Re: Retrofitting SEAM to existing JSF project
              Shane Bryzak Master

              It looks like Seam isn't being initialized. I suggest that you use a debugger to check that SeamListener.contextInitialized() is being called.