appfuse configuring jdbc.properties

123 Views Asked by At

I have created a project in appfuse. I've changed the data in my jdbc.properties file and when I run the command jetty:run, it created my database and appfuse tables like app_user but after that it gets an "BUILD FAILURE" and it returns an error like this:

Failed to execute goal org.codehaus.mojo:dbunit-maven-plugin:1.0-beta-3:operation
(test-compile) on project myproject: Error executing database operation:
CLEAN_INSERT: Access denied for user 'root'@'localhost' (using password: NO) 
1

There are 1 best solutions below

2
Matt Raible On

I'd try changing the properties in your pom.xml. These are used for DbUnit and properties substitution in jdbc.properties.

<groupId>org.codehaus.mojo</groupId>
<artifactId>dbunit-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<configuration>
    <dataTypeFactoryName>${dbunit.dataTypeFactoryName}</dataTypeFactoryName>
    <driver>${jdbc.driverClassName}</driver>
    <username>${jdbc.username}</username>
    <password>${jdbc.password}</password>
    <url>${jdbc.url}</url>
    <src>src/test/resources/sample-data.xml</src>
    <type>${dbunit.operation.type}</type>
    <schema>${dbunit.schema}</schema>
    <skip>${skipTests}</skip>
    <transaction>true</transaction>
</configuration>