Problems getting started with Seam
mverkaik May 13, 2008 7:36 PMHello forum users,
I get an exception while deploying my Seam application to JBoss. I am using the following Stack:
Windows XP
JDK 1.6.0
Eclipse JEE Europe Fall 2
JBoss Tools 2.0.1 GA
JBoss 4.0.5 GA
JBoss Seam 1.2.1 GA
MySQL 5.0
MySQL Connection 5.1.5
I ran 'seam setup' and then seam 'new-project', as it is explained in the Seam reference:
http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/gettingstarted.html
Here is the output of that:
C:\java\jboss-seam-1.2.1.GA>seam setup
Buildfile: C:\java\jboss-seam-1.2.1.GA\seam-gen\build.xml
setup:
[echo] Welcome to seam-gen :-)
[input] Enter your Java project workspace (the directory that
contains your Seam projects) [C:/eclipse-fall/workspac
e]
C:/java/eclipse-fall/workspace
[input] Enter your JBoss home directory [C:/java/jboss-4.0.5.GA]
[input] Enter the project name [csc2-seamgen]
[input] Is this project deployed as an EAR (with EJB components) or
a WAR (with no EJB support) [war] (ear,war,)
[input] Enter the Java package name for your session beans
[beans.session]
[input] Enter the Java package name for your entity beans
[beans.entity]
[input] Enter the Java package name for your test cases
[beans.session.test]
[input] What kind of database are you using? [mysql]
(hsql,mysql,oracle,postgres,mssql,db2,sybase,enterprisedb,)
[input] Enter the Hibernate dialect for your database
[org.hibernate.dialect.MySQLDialect]
[input] Enter the filesystem path to the JDBC driver jar
[C:/java/mysql-connector-java-5.1.5/mysql-connector-java-5.
1.5-bin.jar]
[input] Enter JDBC driver class for your database
[com.mysql.jdbc.Driver]
[input] Enter the JDBC URL for your database
[jdbc:myscl://localhost:3306/csc2]
jdbc:mysql://localhost:3306/csc2
[input] Enter database username [sa]
[input] Enter database password [password]
[input] skipping input as property hibernate.default_schema.new has
already been set.
[input] Enter the database catalog name (it is OK to leave this
blank) [csc2]
[input] Are you working with tables that already exist in the
database? [y] (y,n,)
[input] Do you want to drop and recreate the database tables and
data in import.sql each time you deploy? [n] (y,n,)
[propertyfile] Updating property file:
C:\java\jboss-seam-1.2.1.GA\seam-gen\build.properties
[echo] Installing JDBC driver jar to JBoss server
[echo] Type 'seam new-project' to create the new project
BUILD SUCCESSFUL
Total time: 1 minute 29 seconds
C:\java\jboss-seam-1.2.1.GA>seam new-project
Buildfile: C:\java\jboss-seam-1.2.1.GA\seam-gen\build.xml
validate-workspace:
validate-project:
copy-lib:
[echo] Copying Seam jars to the
C:/java/eclipse-fall/workspace/csc2-seamgen/lib directory...
[copy] Copying 56 files to
C:\java\eclipse-fall\workspace\csc2-seamgen\lib
[echo] Copying Embeddable EJB3 configuration to the
C:/java/eclipse-fall/workspace/csc2-seamgen/embedded-ejb direct
ory...
[copy] Copying 9 files to
C:\java\eclipse-fall\workspace\csc2-seamgen\embedded-ejb
file-copy-war:
[echo] Copying resources needed for WAR deployment to the
C:/java/eclipse-fall/workspace/csc2-seamgen/resources dir
ectory...
file-copy-ear:
setup-filters:
file-copy:
new-project:
[echo] A new Seam project named 'csc2-seamgen' was created in the
C:/java/eclipse-fall/workspace directory
[echo] Type 'seam explode' and go to
http://localhost:8080/csc2-seamgen
[echo] Eclipse Users: Add the project into Eclipse using File >
New
> Project and select General > Project (not Jav
a Project)
[echo] NetBeans Users: Open the project in NetBeans
BUILD SUCCESSFUL
Total time: 3 seconds
First I got a ClassNotFoundException that I resolved by adding the
following to the ant file in the war target:
<include name="hibernate-all.jar"/>
Next redeployment I got this exception:
org.jboss.resource.JBossResourceException: Could not create connection;
- nested throwable: (org.jboss.resource.JBossResourceException: Wrong
driver class for this connection URL)
Any suggestions are much appreciated!
Thanks,
Michiel