You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
Considering the following configuration, this document explains how to deploy a project created using the Seam new project
wizard in RAD:
The obtained result is a Seam application running, but without a connection to a datasource. The question of persistence is not the main concern here: we just want the default Seam application running withing a minute (more or less).
Jboss Tools 3.0.0.CR2 is installed by unzipping in the directory containing the Eclipse executabl (under Windows: the eclipse.exe file, located e.g. in C:/Win32App/IBM/SDP/). Note that RAD 7.5 is based on Eclipse 3.4, which is a requirement for Jboss Tools 3.x.
Preliminary note: EAR deployment mode will only work smoothly for Seam 2.1.2.CR2 under WAS 7.0.0.3. At the time of writing (early march 2009), these version are/were not available so the EAR walkthrough uses patched version of WAS and Seam.
You may also be interested by other Websphere 7 related setup:
dom4j.jar
hibernate3.jar (version used: 3.3.1.GA)
hibernate-annotations.jar
hibernate-common-annotations.jar
hibernate-entitymanager.jar
hibernate-validator.jar
javassist.jar (version used: 3.4.GA)
jsf4j-api.jar (required by Hibernate jars; version used 1.5.6)
jsf4j-jdk14.jar (required by Hibernate jars; version used 1.5.6; use slf4j-log4j12-1.5.6.jar + log4j-1.2.15.jar if you prefer Log4j to JUL) )
richfaces-api.jar
richfaces-impl.jar
richfaces-ui.jar
Note: if you are using WAS 7.0.0.1, your WAR archive may take very long time to be deployed (about 15 minutes). The symptoms are similar to the ones described in PK74505 but the PK74505 iFix does not correct the problem. IBM suggests to change the web.xml version from 2.5 to 2.4 (try Google to get a web.xml); it solved the problem for us. This suggests that the problem occurs when the machine is not connected to the web.
When deploying a Seam 2.1.1.GA an EAR under WAS 7.0.0.1, you way ran into WAS bugs and Seam bugs. The preliminary notes give hints about how to correct them.
Websphere 7.0.0.1 has a bug about @ApplicationException which is corrected in the WAS 7.0.0.3 version (to be delivered late march 2009). The error message is:
...
wtp E org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EJBJarFileImpl processAnnotations Annotations scanning of EJB JAR [ jboss-seam.jar ] completed with errors.
wtp E org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EJBJarFileImpl processAnnotations Annotations error:
com.ibm.wsspi.amm.validate.ValidationException: @ApplicationException may only be applied to classes that subclass java.lang.Exception or java.lang.Error, class [ org.jboss.seam.security.NotLoggedInException ]
at com.ibm.ws.amm.validate.ejb.ApplicationExceptionValidator.validate(ApplicationExceptionValidator.java:62)
...
See Denis Forveille's post for details. If you can't wait until end of march 2009, ask IBM the patch related to IBM's PK74419.
Denis also found and solved another issue, this time with Seam. The error message is :
[18/11/08 16:17:51:537 EST] 0000001a annotations E AnnotativeMetadataManagerImpl merge Caught exception while merging
com.ibm.wsspi.amm.validate.ValidationException: For method, org.jboss.seam.persistence.EntityManagerProxyInterceptor.postActivate(Lorg/jboss/seam/intercept/InvocationContext;)V\[com.ibm.ws.amm.scan.util.info.impl.MethodInfoImpl@1b8e1b8e\], parameters were specified, but null was the expected comparison
See JIRA issue JBSEAM-3726 for details. The solution is to wait Seam 2.1.2.CR2, or to apply Denis's patch on your own.
This walkthrough supposes that you have Websphere 7.0.0.1 + PK74419 patch (or even better: WAS 7.0.0.3) and Seam 2.1.1.GA + patch JBSEAM-3726 (or even better: Seam 2.1.2.CR2).
dom4j.jar
hibernate3.jar (version used: 3.3.1.GA)
hibernate-annotations.jar
hibernate-common-annotations.jar
hibernate-entitymanager.jar
hibernate-validator.jar
javassist.jar (version used: 3.4.GA)
jsf4j-api.jar (required by Hibernate jars; version used 1.5.6)
jsf4j-jdk14.jar (required by Hibernate jars; version used 1.5.6; use slf4j-log4j12-1.5.6.jar + log4j-1.2.15.jar if you prefer Log4j to JUL)
Add and Remove projects).
Thanks for your guide. Just a quick addition to your note to circumvent long deployments:
Changing the servlet spec to 2.4 is sometimes not possible. To prevent the deployment manager from scanning every class for annotations, which causes the the long deployment, you can add the attribute metadata-complete in the web-app tag of the web.xml. Example:
<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" metadata-complete="true">
Details
Where can i find jsf4j libraries? Thank you
What if Parent last setting is NOT an option for us (we have some reasons for that). Is there any way where we could deploy without the Parent Last Setting ?
Thanks and Regards Deepesh
Where must i put the seam library?
Are there any detailed instructions on how to get the aforementioned configuration running? I'm facing issues right at the start with not being able to progress past the first screen on the Seam Web Project wizard with the following settings:
Thanks!
Hi, I am facing the same problem: I cannot add a server on the drop Down list. Did you found any solution or workaround?