JEE Development

thoughts in web development.
  • rss
  • Home
  • Haftungsausschluss
  • About
  • Contact
  • Sitemap
  • useronline

seam 2 setup on windows vista 64bit

admin | January 1, 2008

seam 2 setup on windows vista 64bit

well, in this tutorial i show you how you can easily setup seam 2 (dvd store example) with MySQL on windows vista 64 bit.

First, download the required software:

MySQL Database (mysql-5.0.45-winx64.zip (64bit MySql))
MySQLAdministrator (32bit, mysql-gui-tools-5.0-r12-win32.zip)
MySQL Connector (mysql-connector-java-5.0.8.zip)
Java EE 5 SDK Update 4 (with JDK 6 U3) for Windows, English, java_ee_sdk-5_04-windows.exe, see: J2SE system configurations, Java on Windows, Sun installation notes)
Eclipse IDE for Java EE Developers (eclipse-jee-europa-fall2-win32.zip),
Apache Ant 1.70 (apache-ant-1.7.0-bin.zip)
Xdoclet 1.2.3 (xdoclet-bin-1.2.3.zip)
Jboss 4.2.2 GA (jboss-4.2.2.GA.zip)
Jboss Seam 2 (jboss-seam-2.0.0.GA.zip)
Jboss Tools (JbossTools-2.0.0.GA-ALL-win32.zip),

After you have downloaded your files, create a folder C:\DEV on your Harddisk. This is the place where i installed my software.

For MySQL, MySQL Administrator and the SDK i used the setup routines to install the software. The other packages i have only extracted (zip) and moved to the right place. The folders look like this (i do not use blanks in foldernames!):

C:\DEV\apache-ant-1.7.0
C:\DEV\mysql5045
C:\DEV\SDK
C:\DEV\jboss-seam-2.0.0.GA
C:\DEV\jboss-4.2.2.GA
C:\DEV\xdoclet-bin-1.2.3
C:\DEV\eclipse-jee-europa-fall2-win32

Then i configured my IDE (eclipse-jee-europa-fall2-win32.zip):
To install Jboss tools you have to extract the Zip file (JbossTools-2.0.0.GA-ALL-win32.zip) and copy the content of the folder features to C:\DEV\eclipse-jee-europa-fall2-win32\features and the content of the folder plugins to the folder C:\DEV\eclipse-jee-europa-fall2-win32\plugins.

Right after that i configured Xdoclet to work with eclipse. I run eclipse and selected C:\DEV\workspace as my workspace folder. Within the workbench i selected: Window>Preferences>XDoclet and entered my Xdoclet path and the appropriate version 1.2.3.

XDoclet configuration in Eclipse

Then i created a server instance of Jboss AS 4.2.2 by clicking on the „new server“ icon in the toolbar.

JBoss Server instance 1

JBoss Server instance 2

JBoss Server instance 3

Add your JMX login credentials and click on finish. The next time you create a new project you can easily start and stop Jboss from your Eclipse IDE by selecting the server instance. Note the deploy directory of your Jboss instance.

Now i configured my windows environment variables and path. Goto the windows system control panel > system characteristics > Advanced tab > Environment variables and enter a the ANT_HOME variable with path pointing to your ANT folder (C:\DEV\apache-ant-1.7.0). Do not forget to check or set the JAVA_HOME variable and the path pointing to the bin folder of the SDK. Do not remove existing values. Just add the path for the SDK and ANT bin folders right after the existing values after the semicolon
(C:\DEV\SDK\jdk\bin;C:\DEV\apache-ant-1.7.0\bin;).

Environment variables 1

Environment variables 2

The Seam 2 „DVD Store“ store example is in the folder „C:\DEV\jboss-seam-2.0.0.GA\examples\dvdstore“. I opened the datasource file (dvd-ds.xml) for that example located in the folder „C:\DEV\jboss-seam-2.0.0.GA\examples\dvdstore\resources\“.Then i configured the mysql datasource like this:

<?xml version=”1.0″ encoding=”UTF-8″?>

<!DOCTYPE datasources
PUBLIC “-//JBoss//DTD JBOSS JCA Config 1.5//EN”
“http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd”>

<datasources>

<local-tx-datasource>
<jndi-name>dvdDatasource</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/dvdstore</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>yourusernamehere</user-name>
<password>yourpasswordhere</password>
<exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
</exception-sorter-class-name>

<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>

</datasources>

Note that the values user-name and password are corresponding to an existing user within the MySQL Database. If you are not sure, open the MySQL Administrator and add a new user with password. Please also make sure that the MySQL Database Server is running as a Windows Service. If you have selected the „user administration“ (Benutzerverwaltung), point your mousepointer to the area where the accounts (Benutzerkonten) are and right click to create a new user account.

MySQL Administrator

You should also have a blank schema called „dvdstore“ in your database. The user should have all privileges to that schema.To make the JDBC driver classes available to JBoss, copy the file mysql-connector-java-5.0.8-bin.jar from the Connector/J distribution to the lib directory in the default server configuration (assuming that is the configuration you’re running, of course. E.g.:
C:\DEV\jboss-4.2.2.GA\server\default\lib\mysql-connector-java-5.0.8-bin.jar).

Create a folder „jboss-seam-dist“ in your seam home folder:
C:\DEV\jboss-seam-2.0.0.GA\jboss-seam-dist

Add the following lines to your build.properties located in your seam home folder
C:\DEV\jboss-seam-2.0.0.GA


# added:
# Location of JBoss AS and Tomcat
# -------------------------------
#jboss.home /Applications/jboss-4.2.1.GA # Default
#tomcat.home /Applications/apache-tomcat-6.0 # Default
jboss.home C:\\dev\\jboss-4.2.2.GA
#tomcat.home C:\\Tomcat-6.0
#
# Misc Settings
# -------------
# Enabled validation of example XML descriptors
validate.xml true
# Directory in which to put build distribution, defaults to ../jboss-seam-${version}.${patchlevel}
dist.dir C:\\DEV\\jboss-seam-2.0.0.GA\\jboss-seam-dist
# alphanumeric qualifier for the version number
#qualifier -SNAPSHOT

Then i opened a dos console window. Goto the folder:

C:\DEV\jboss-seam-2.0.0.GA\examples\dvdstore>

and fire up the command:

ant

Your build should be successful. Otherwise something is going wrong within the configuration or installation.
The Jboss AS can be started by using the run.bat file. Open the DOS console window and goto C:\DEV\jboss-4.2.2.GA\bin
type run and press enter and the server will start.

When the server is ready and your application (ear) is successfully deployed to $JBOSS-HOME/server/default/deploy directory start the browser and enter the URL:

http://localhost:8080/seam-dvd/

note: the name is seam-[project name]
The correct project name is located in the file: C:\DEV\jboss-seam-2.0.0.GA\examples\dvdstore\readme.txt

i hope this tutorial helps you to dive into the seam 2 world.

Comments
No Comments »
Categories
Seam 2
Tags
64bit, installation, seam, setup, Vista
Comments rss Comments rss
Trackback Trackback

UserOnline

Categories

  • Firefox
  • Frameworks
  • JSF
  • Linux
  • Seam 2
  • software development
  • Uncategorized
  • Vista
  • Web services

Tags

37signals 64-bit 64bit 2008 about Ajax blog bookmark clickflow community Component development disclaimer documentations Drools Engineering evaluation Feature flows Frameworks Haftungsausschluss Hibernate installation JSF Linux Matrix memory ohloh people performance personal Rails Real Rules Rules-engine seam setup Sitemap SOA specification specifications Tools Ubuntu usability Vista

Blogroll

  • Agile Data
  • agile journal
  • agilemanifesto
  • Application Development Trends
  • Best tech videos
  • blog.robjsoftware.org
  • Developer.com
  • Dr. Dobbs Portal
  • Ed Burns’s Blog
  • Enterprise integration patterns
  • eosdirectory
  • Extreme programming
  • Extreme Programming
  • freiesMagazin
  • High Scalability
  • In Relation To…
  • InfoQ
  • Java Boutique
  • java.dzone.com
  • javageek
  • JEE Tutorial
  • JRoller
  • JSF Central
  • Leonard´s Blog
  • McDonald’s Blog
  • mockobjects.com
  • modern analyst
  • nextslm
  • O´Reilly OnJava.com
  • Palacio´s blog
  • Process driven
  • Red hat magazine
  • Scrum. It´s about common sense.
  • scrumalliance.org
  • SE radio
  • SearchSOA.com
  • Service oriented
  • Software engineering
  • solutionsfit.com
  • SUN Enterprise tech tips
  • testdriven.com
  • TheServerSide.com
  • workflow patterns
  • WSO2

Archives

  • June 2009
  • June 2008
  • March 2008
  • February 2008
  • January 2008

Recent Posts

  • click and play
  • I AM BUSY!
  • Framework comparisons
  • REST vs. Hessian ?
  • Framework trends and job opportunities

Recent Comments

    Pages

    • About
    • Contact
    • Haftungsausschluss
    • Sitemap
    • useronline

     

    September 2010
    M T W T F S S
    « Jun    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  

    Meta

    • Register
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
    rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox
    This blog is protected by Dave's Spam Karma 2: 445 Spams eaten and counting...