I have spent 3 days to migrate seam application working well on JBOSS 
JBoss_4_0_4_RC1 date=200602071519 and Seam 1.0 beta 2

I had many issuse with EJB migration, but i have fixed it. But Seam is not 
working. I have used special JEMS installation (JEMS-installer 1.2.0-beta) Now 
seam examples/booking demo works well.

My current state:
Deployment is without errors now but it looks like @In annotation does not work 
and my application crashes. In debugging I sysout the values of injected beans 
and it is always null.

application.xml:
<?xml version="1.0" encoding="UTF-8"?>

        <display-name>FG Management</display-name>

        
                
                        <web-uri>fg.war</web-uri>
                        <context-root>/fg</context-root>
                
        
        
                fg.ejb3
        
        


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

jboss-app.xml:
<jboss-app>
      <loader-repository> 
      seam.jboss.org:loader=seam-seamapp
      </loader-repository> 
</jboss-app> 

persistence.xml:
<entity-manager>
   <persistence-unit name="fgEntityManager">
   org.hibernate.ejb.HibernatePersistence
   <jta-data-source>java:/FG_DS</jta-data-source>
   
      
      
      
      
      
          
      
   
   </persistence-unit>
</entity-manager>

components.xml:
<?xml version="1.0" encoding="utf-8"?>

    
        true
        fg/#{ejbName}/local
    
    
        java:/fgEntityManager
    


faces-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config 
PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                            "http://java.sun.com/dtd/web-facesconfig_1_0.dtd";>
<faces-config>

        <navigation-rule>
                  ...
        </navigation-rule>

        <!-- Same for all Seam applications -->

        
                <variable-resolver>
                        org.jboss.seam.jsf.SeamVariableResolver
                </variable-resolver>
        

        
                <phase-listener>
                        
org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener
                </phase-listener>
        

        <!--lifecycle>
                <phase-listener>
                        org.jboss.seam.jsf.SeamPhaseListener
                </phase-listener>
        </lifecycle-->

</faces-config>

web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

                <context-param>
                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                <param-value>client</param-value>
        </context-param>

        
                <filter-name>Seam Exception Filter</filter-name>
                <filter-class>
                        org.jboss.seam.servlet.SeamExceptionFilter
                </filter-class>
        

        
                <filter-name>MyFacesExtensionsFilter</filter-name>
                <filter-class>
                        org.apache.myfaces.component.html.util.ExtensionsFilter
                </filter-class>
                <init-param>
                        <param-name>maxFileSize</param-name>
                        <param-value>500k</param-value>
                        <!--  description>
                                Set the size limit for uploaded files. Format: 
10 - 10
                                bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
                                </description -->
                </init-param>
        

        
        <filter-mapping>
                <filter-name>Seam Exception Filter</filter-name>
                <url-pattern>*.jsf</url-pattern>
        </filter-mapping>

        <!-- MyFaces -->

        <!-- extension mapping for adding , , and other resource tags to 
JSF-pages  -->
        <filter-mapping>
                <filter-name>MyFacesExtensionsFilter</filter-name>
                <!-- servlet-name must match the name of your 
javax.faces.webapp.FacesServlet entry -->
                <servlet-name>Faces Servlet</servlet-name>
        </filter-mapping>

        <!-- extension mapping for serving page-independent resources 
(javascript, stylesheets, images, etc.)  -->
        <filter-mapping>
                <filter-name>MyFacesExtensionsFilter</filter-name>
                <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
        </filter-mapping>

        <!-- MyFaces -->

        
                <listener-class>
                        org.jboss.seam.servlet.SeamListener
                </listener-class>
        

        
                <listener-class>
                        org.apache.myfaces.webapp.StartupServletContextListener
                </listener-class>
        

        
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
        
     
    
     
        <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>

</web-app>

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956649#3956649

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956649


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to