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.

Most of the Seam example applications will work out of the box with JBoss Application Server 4.2.X. See the readme.txt files in each example applications for more information or follow these step-by-step instructions:

  1. Download JBoss AS 4.2.X and start JBoss with the bin/run.(sh/bat) script.
  2. Edit build.properties in your Seam directory and configure the jboss.home property to be your JBoss AS installation directory.
  3. In the jboss-seam/examples/booking directory, type ant deploy.
  4. Point your browser to http://localhost:8080/seam-booking/ and register an account and book some hotels.
  5. In the jboss-seam/examples/dvdstore directory, type ant deploy.
  6. Point your browser to http://localhost:8080/seam-dvd/ and register an account and buy some movies.
  7. In the jboss-seam/examples/issues directory, type ant deploy.
  8. Point your browser to http://localhost:8080/seam-issues/ and register an account and enter some bugs.

Now pick one of these apps and change the pages and/or source code in your the jboss-seam/examples/<app-dir> directory and redeploy the application by calling ant deploy - see how your modifications affect the application.

13 comments:
28. Feb 2008, 18:39 CET | Link
J Steinbach | jsteinbach.AT.vizuri.com

Running ant deploy resulted in build failure using ant 1.6.0. After installing ant 1.6.5 the build was successful.

ReplyQuote
29. Mar 2008, 02:44 CET | Link
Marcus

The build.properties file didn't have an entry for 'jboss.home' and although I've added one with value pointing to my JBoss AS install dir, when I perform the ant deploy of the booking example, the EAR gets placed under C:/jboss-seam-2.1.0.A1/examples/booking/jboss-4.2.2.GA/server/default/deploy instead of C:/jboss-4.2.2.GA/server/default/deploy which is where I reckon it should be copied into. Am running JBoss 4.2.2.GA and Seam 2.1.0.A1

02. Apr 2008, 14:04 CET | Link
edzu
Marcus wrote on Mar 29, 2008 02:44 AM:
The build.properties file didn't have an entry for 'jboss.home' and although I've added one with value pointing to my JBoss AS install dir, when I perform the ant deploy of the booking example, the EAR gets placed under C:/jboss-seam-2.1.0.A1/examples/booking/jboss-4.2.2.GA/server/default/deploy instead of C:/jboss-4.2.2.GA/server/default/deploy which is where I reckon it should be copied into. Am running JBoss 4.2.2.GA and Seam 2.1.0.A1

Please, put here your jboss.home line exactly as you typed in.

03. Apr 2008, 13:38 CET | Link
almarro1

Remember that you have to use escape sequences in the path. Make sure you set the jboss.home to C:\jboss-4.2.2.GA

03. Apr 2008, 13:40 CET | Link
almarro1
almarro1 wrote on Apr 03, 2008 01:38 PM:
Remember that you have to use escape sequences in the path. Make sure you set the jboss.home to C:\jboss-4.2.2.GA

Upps, the browser removed the second slash

C:\\jboss-4.2.2.GA

28. Apr 2008, 16:50 CET | Link
Claus

I get a BUILD FAILURE with Ant 1.7.0. Could somebody help me?

I get:

BUILD FAILED c:\PROGRA~1\JBOSS\-~1.CR1\examples\build.xml:618: Failed to copy c:\PROGRA~1\JBOS S\-~1.CR1\examples\dvdstore\resources\jboss-seam-dvd-ds.xml to c:\PROGRA~1\JBOSS- ~1.CR1\examples\dvdstore\Programmejboss-4.2.2.GA \server\default\deploy\jboss-se am-dvd-ds.xml due to java.io.FileNotFoundException c:\PROGRA~1\JBOSS-~1.CR1\exam ples\dvdstore\Programmejboss-4.2.2.GA \server\default\deploy\jboss-seam-dvd-ds.x ml (Das System kann den angegebenen Pfad nicht finden)

01. May 2008, 12:05 CET | Link
Claus

I've found the mistake:

In build.properties I set the variable

jboss.home c:\Programme\jboss-4.2.2.GA

I changed that to

jboss.home /Programme/jboss-4.2.2.GA

Now it works.

05. May 2008, 12:14 CET | Link
Tom

I found numerous errors when using 'ant deploy' in fedora 8/9, the key to fixing this was to set JAVA_HOME in the /etc/ant.conf file to point to the correct jdk.

Hope this helps some people.

Thanks.

22. Jun 2008, 21:40 CET | Link
wmk

I tried to run the examples with jbossAS5.0.4-beta and it's not working. I know that the instructions said to run on jbossAS4.2, but isn't supposed to work on jboss5 ?

04. Jul 2008, 18:30 CET | Link
Rafael Junqueira

I have the same question. Isn't it suppose to work w/ JBoss AS 5 ?

09. Jul 2008, 14:09 CET | Link
Oliver Dungey

I have just spent a while digging around in the build trying to find which JBoss server instance it's trying to deploy to. Having found it's just a hard coded path to the default instance It occurs to me that it would be helpful to make this a property and refer to it in the sample build properties.

20. Oct 2008, 15:05 CET | Link

My seam application (Seam 2.0 Production jboss-seam-2.0.2.SP1) runs fine on Jboss but anytime i decide to use the JSF Jar files instead of the one that comes with Jboss by adding this entry to the web.xml

<context-param>
     <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
     <param-value>true</param-value>
</context-param>

I always get this exception

08:58:17,859 ERROR [STDERR] javax.faces.FacesException: org.jboss.seam.jsf.SeamApplicationFactory
08:58:17,859 ERROR [STDERR]     at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:569)
08:58:17,859 ERROR [STDERR]     at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:448)
08:58:17,859 ERROR [STDERR]     at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:249)
08:58:17,859 ERROR [STDERR]     at com.sun.faces.config.ConfigureListener$InitFacesContext.getApplication(ConfigureListener.java:1616)

and

08:58:17,859 ERROR [STDERR] Caused by: java.lang.InstantiationException: org.jboss.seam.jsf.SeamApplicationFactory
08:58:17,859 ERROR [STDERR]     at java.lang.Class.newInstance0(Class.java:340)
08:58:17,859 ERROR [STDERR]     at java.lang.Class.newInstance(Class.java:308)
08:58:17,859 ERROR [STDERR]     at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:567)
08:58:17,859 ERROR [STDERR]     ... 146 more
08:58:17,875 ERROR [[/powell]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
javax.faces.FacesException: org.jboss.seam.jsf.SeamApplicationFactory
        at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:569)
        at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:448)
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:249)
        at com.sun.faces.config.ConfigureListener$InitFacesContext.getApplication(ConfigureListener.java:1616)
        at com.sun.faces.util.MessageFactory.getApplication(MessageFactory.java:255)

02. Nov 2008, 15:14 CET | Link
Holger

I got the same problem as soon as i want to ship my own jsf 1.2 version (need latest mojarra jsf version becourse of some bugfixes that are in there)

That means i cant ship the jsf version i want and have to stick on the servers jsf implementation.

So what to do

1) use apache tomcat 2) manually overwrite the jars on the server and praying (no context parameter needed)

Post Comment