0 Replies Latest reply on Oct 7, 2008 1:11 AM by rcrowell

    debug.seam, jndi problems

    rcrowell

      I am having a very difficult time getting debug.seam to work correctly, and can't get jndi lookups working either.  I'm trying to add seam to an existing application that already uses JSF.  It's running on jboss-4.2.2.GA.  I am using seam version 2.0.2.SP1.


      I have seam installed.  When I start up jboss I receive the Welcome to Seam 2.0.2.SP1 message, and I see that it gets to initializing seam.  I don't see any error messages related to Seam, other than some warnings/errors related to Javassist Enhancements failing for some of the code that's already in my application.


      I have followed along with all of the online tutorials and can't find anything that I've missed.  I am deploying a war file called tpp-web.war.  Inside:



      • lib/jboss-el-2.0.1.GA.jar

      • lib/jboss-seam-2.0.2.SP1.jar

      • lib/jboss-seam-debug-2.0.2.SP1.jar



      I modified my components.xml in the war file to include the following:


       <core:init jndi-pattern="#{ejbName}/local" debug="true"/>




      I modified application.xml in the ear to have this inside:


      <module>
        <java>jboss-seam-2.0.2.SP1.jar</java>
      </module>
      <module>
        <java>jboss-el-2.0.0.GA.jar</java>
      </module>
      <module>
        <java>jboss-seam-debug-2.0.2.SP1.jar</java>
      </module>



      I put this in ejb-jar.xml:


      <interceptors>
        <interceptor>
          <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
        </interceptor>
      </interceptors>
      <assembly-descriptor>
        <interceptor-binding>
           <ejb-name>*</ejb-name>
           <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
        </interceptor-binding>
      </assembly-descriptor>  
      



      I put this in web.xml:


      <listener>
        <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
      </listener>
      <filter>
        <filter-name>Seam Filter</filter-name>
        <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>Seam Filter</filter-name>
        <url-pattern>*.seam</url-pattern>
      </filter-mapping>
      <context-param>
        <param-name>org.jboss.seam.core.init.debug</param-name>
        <param-value>true</param-value>
      </context-param>



      When jboss starts, it seems to be starting the filter:


      Initializing filter: org.jboss.seam.web.redirectFilter
      Initializing filter: org.jboss.seam.web.exceptionFilter
      Initializing filter: org.jboss.seam.web.multipartFilter
      Initializing filter: org.jboss.seam.web.loggingFilter
      Initializing filter: org.jboss.seam.debug.hotDeployFilter
      



      I don't have a pages.xml file.  Is this important?  I get a message when I start jboss that says:


      no pages.xml file found: /WEB-INF/pages.xml
      



      When I try to navigate my browser to http://localhost:8080/tpp-web/debug.seam, I get the 404 message: The requested resource (/tpp-web/debug.seam) is not available.  Any reason this isn't available?


      Related to jndi lookups: the class I'm trying to convert to a Seam bean is called PromotionalLinkManagerBean.  The top of the file looks like this:


      @Stateful
      @Scope(ScopeType.SESSION)
      @Name("promotionalLinkManager")
      public class PromotionalLinkManagerBean implements PromotionalLinkManager, Serializable {
      



      I even get this message when jboss starts:


      Component: promotionalLinkManager, scope: SESSION, type: STATEFUL_SESSION_BEAN, class: com.nxj.tpp.affiliate.PromotionalLinkManagerBean, JNDI: tpp-ear-1.2-SNAPSHOT/PromotionalLinkManagerBean/local
      



      But when I navigate to the jsf file that uses this bean, it can't find it:


      Could not instantiate Seam component: promotionalLinkManager
      ...
      Caused by: javax.naming.NameNotFoundException: PromotionalLinkManagerBean not bound
      



      I feel like there's something missing here, but I don't know what.  I also feel like these two problems are likely related.  Anybody have any ideas or suggestions?  Thanks so much.  I have lost several days to this problem, and I am rapidly going crazy!