On 1/18/07, Patrick Angeles <[EMAIL PROTECTED]> wrote:
Hey all,
As per instructions, I used mvn archetype:create to create a Modular JSF
project. I then edited pom.xml to set the following properties:
<hibernate.dialect>org.hibernate.dialect.PostgreSQLDialect
</hibernate.dialect>
<jdbc.groupId>postgresql</jdbc.groupId>
<jdbc.artifactId>postgresql</jdbc.artifactId>
<jdbc.version>8.1-407.jdbc3</jdbc.version>
<jdbc.driverClassName>org.postgresql.Driver</jdbc.driverClassName>
<jdbc.url><![CDATA[jdbc:postgresql://localhost/xxx:5432]]></jdbc.url>
<jdbc.username>xxx</jdbc.username>
<jdbc.password></jdbc.password>
The database unit tests seem to work fine (i.e., they are able to log into
my database and create the schema).
However, when I go into the web directory and invoke "mvn jetty:run-war" I
get a ClassNotFoundException:
There is a missing dependency on the pom (see
http://issues.appfuse.org/browse/APF-580). Please add the following to your
pom:
<dependency>
<groupId>${jdbc.groupId}</groupId>
<artifactId>${jdbc.artifactId}</artifactId>
<version>${jdbc.version}</version>
</dependency>
[biggie-apf] WARN [main] SettingsFactory.buildSettings(109) | Could not
obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
'org.postgresql.Driver'
I've tried exploding the war file and manually copying my JDBC driver into
WEB-INF/lib, but that seems to have caused a different set of problems
when
deploying to jetty.
I'm also wondering why jar the files are packaged in WEB-INF/lib, as
opposed
to downloaded by Maven. (Or, in general, why the entire webapp is packaged
as opposed to exploded under $BASE/web/src/main/webapp.)
They are downloaded by Maven. If you ran a mvn war:inplace, then you can
delete the WEB-INF/lib and WEB-INF/classes (you may want to move some files
to src/main/resources first) directories from your source tree.
Mike
- P
--
View this message in context:
http://www.nabble.com/AppFuse-2.0---changing-the-DB-from-MySQL-to-PostgreSQL-tf3035727s2369.html#a8435929
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]