【问题标题】:appfuse configuring jdbc.propertiesappfuse 配置 jdbc.properties
【发布时间】:2017-03-04 19:07:51
【问题描述】:

我在 appfuse 中创建了一个项目。我已经更改了我的 jdbc.properties 文件中的数据,当我运行命令 jetty:run 时,它创建了我的数据库和 appfuse 表,如 app_user 但之后它得到一个“BUILD FAILURE”并返回这样的错误:

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) 

【问题讨论】:

    标签: java mysql spring appfuse


    【解决方案1】:

    我会尝试更改您的 pom.xml 中的属性。这些用于 jdbc.properties 中的 DbUnit 和属性替换。

    <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>
    

    【讨论】:

    • 我应该做些什么改变?我更改了“applicationContext-resources.xml”文件中的属性,但遇到了同样的错误!
    • 即使删除了 root 的密码,我仍然收到以下错误: Failed to execute goal org.codehaus.mojo:dbunit-maven-plugin:1.0-beta-3:operation (test-compile) on项目 derml:执行数据库操作时出错:CLEAN_INSERT:user_role
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-09-24
    • 2015-11-01
    • 2011-11-10
    • 1970-01-01
    • 2015-04-24
    • 2011-11-01
    • 1970-01-01
    相关资源
    最近更新 更多