I have a seam app that my colleague created. It is maven-based. I'm trying to get make it work in eclipse which is baffling in itself, but I managed to get rid of all the eclipse "Problems" (as displayed in the problem view) and the app builds successfully, both from the command line and from within eclipse.
The difficulty is when I deploy the app to the jboss server (Jboss 5.1) the deployment only gets as far as JSF and never starts the Seam section. So the logfile looks like this
13:15:23,087 INFO [EJBContain开发者_Python百科er] STARTED EJB: org.jboss.seam.transaction.EjbSynchronizations ejbName: EjbSynchronizations
13:15:23,107 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
nccm-app/EjbSynchronizations/local - EJB3.x Default Local Business Interface
nccm-app/EjbSynchronizations/local-org.jboss.seam.transaction.LocalEjbSynchronizations - EJB3.x Local Business Interface
13:15:23,357 INFO [TomcatDeployment] deploy, ctxPath=/nccm
13:15:23,448 INFO [config] Initializing Mojarra (1.2_13-b01-FCS) for context '/nccm'`
and stops. A working app continues with seam:
2011-09-16 11:59:48,494 INFO [javax.servlet.ServletContextListener] (HDScanner) Welcome to Seam 2.2.0.EAP5
Something must be missing in my EAR file, but I can't figure out what. The seam library is definitely there. Any way to tell what I am missing?
Hanging on Initializing Mojarra
can mean at least 2 things:
There is not enough memory. Increase your container's heap space. Start at 512M, depending on your webapp's size.
There is a conflict in JSF-related libraries. Ensure that all versions are compatible with each other (JSF, Seam, RichFaces, etc). Ensure that you understand that JBoss ships with its own set of JSF api/impl libraries and that you should not include any in your webapp's
/WEB-INF/lib
(i.e. mark it asprovided
in Maven). Or, if you want to override JBoss from loading its builtin JSF libs and prefer the webapp-included libraries, then you should add the following context parameter to the webapp'sweb.xml
to tell JBoss to use the WAR-bundled JSF impl instead:<context-param> <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name> <param-value>true</param-value> </context-param>
Check that you have seam.properties
file (may be empty) in your resulting files.
For war
assemblies it should be presented here:
\WEB-INF\classes\seam.properties
For jar
assemblies (which have seam bean declarations) it should be here:
\classes\seam.properties
精彩评论