Help

Built with Seam

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.

  1. Download and install Tomcat 6.X
  2. Go into the jboss-seam/examples/jpa directory
  3. Copy the lib/hsqldb.jar into $TOMCAT_HOME/lib
  4. Run ant tomcat6 to build the application
  5. Deploy dist-tomcat6/jboss-seam-jpa.war
  6. Start Tomcat
  7. Access the app at http://localhost:8080/jboss-seam-jpa/

To run EJB based examples you'll need to follow the instructions on installing JBoss Embedded on Tomcat 6.0.

12 comments:
 
09. Mar 2008, 07:40 CET | Link
xflin

Using seam 2.0.1 with tomcat 6.0.16, I had to add asm.jar to the deployed war's WEB-INF/lib/ directory.

ReplyQuote
 
11. Mar 2008, 16:45 CET | Link
Zoli

which asm.jar have you used, with asm-3.1.jar I receive: java.lang.NoSuchMethodError

 
12. Mar 2008, 01:02 CET | Link
xflin

I simply copied the jar file bundled in the seam 2.0.1-GA download, which is located at jboss-seam-2.0.1.GA/lib/asm.jar.

 
12. Mar 2008, 10:21 CET | Link
Zoli

thanks,with that jar is working

 
13. Mar 2008, 13:26 CET | Link
Artur

First. there isn't lib//hsqldb.jar file in jboss-seam//examples//jpa directory. I found it on seam-gen//lib directory.

Second. I have following in tomcat log:

SEVERE: Error listenerStart 13.03.2008 15:13:48 org.apache.catalina.core.StandardContext start SEVERE: Context jboss-seam-jpa startup failed due to previous errors Example app not working for me. Tomcat6, Seam2, Java6

 
13. Mar 2008, 16:06 CET | Link
Jack

I am having issues deploying on Tomcat 6 as well. You should check your logs ... you will probably find NoClassDefFoundError. I've had to copy several of the war's jars into Tomcat/lib. So far, I've had to copy all of the jsf libs and commons-logging.jar. Particularly irking is the fact that the commons-collections.jar in the war has the wrong version ... the example apparently needs the collection that contains AbstractHashMap, so I had to find the jar containing AbstractHashMap.

My latest issue is an ajax4jsf class not found... i can't find any ajax4jsf jars anywhere in the war. I must be doing something wrong: this is way harder than it should be.

 
17. Mar 2008, 18:07 CET | Link
hugelsb

I replaced the commons-collections.jar in the generated war with commons-collections-3.2.jar and added the asm.jar as well, and it works now! Link to download : commons-collections-3.2.jar

 
01. Jul 2008, 22:40 CET | Link

I am also trying to make seam simply work on tomcat with facelets, jsf and richfaces but with no luck. The webapplication seems to be working, but with weird unresolved issues: 1) I get this exception: java.lang.RuntimeException: error while reading /WEB-INF/components.xml at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:154) at org.jboss.seam.init.Initialization.create(Initialization.java:104) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.IllegalStateException: Two components with the same name and precedence - component name: org.jboss.seam.transaction.transaction, component classes: org.jboss.seam.transaction.EntityTransaction, org.jboss.seam.transaction.HibernateTransaction at org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:489) at org.jboss.seam.init.Initialization.installComponentFromXmlElement(Initialization.java:389) at org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:280) at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:150) ... 26 more

2) I get this warning in the log file: The listener org.jboss.seam.servlet.SeamListener is already configured for this context. The duplicate definition has been ignored

3) This is the most annoying issue (since from the rest I could have ignored at this point in development): In a simple login example I am doing it seems like the action method is called twice in the server. I have a feeling this will happen in any other action and not just in this login example... Mybe it is related to the message I am getting at 2)...

 
10. Jul 2008, 22:38 CET | Link
Nohacks

Did you ever get this working.??

I am starting to add Seam to my JSF/RichFaces Project in Tomcat 6

Phil

 
21. Jul 2008, 11:05 CET | Link
Eugeniy N. | nikolaev.AT.mail.by
Does not work...


Can somebody make:

1) The project for import in Eclipse (compress its any popular archiver)

2) Contents "lib" in Tomcat 6 folder

3) War-file

 + info about Eclipse version + info about seam framework version.
 
22. Jul 2008, 10:17 CET | Link
itsnavigator

i could run without any problem. i've just followed the instruction except ant tomcat55 instead of ant tomcat6 and that it, its working now.

 
22. Jul 2008, 15:15 CET | Link

Ant? We are need for IDE c support Seam. And problems are present!

But...

See my forum, questions and answers, for this problem.

Post Comment