【问题标题】:Compilation error with Mule sample Connector projectMule示例连接器项目的编译错误
【发布时间】:2014-06-03 22:29:32
【问题描述】:

我正在尝试按照此处所述创建 mule 示例连接器项目:- Create Connector Project 我从命令行创建了这个项目并导入到我的 AnyPoint Studio 中

但是当我尝试从 maven 命令行构建它时,我收到一个错误提示

     [ERROR] \20140530\hello-connector\src\test\java\org\hello\HelloConnectorTest.java:[59,24] type parameters of <T,U>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds T,java.lang.Object

还附上了截图。请有人给我任何想法。

附:我正在使用 Java 1.6 和 maven 3.2.1

【问题讨论】:

  • HelloConnectorTest.java 的第 59 行是什么?

标签: java eclipse maven mule


【解决方案1】:

我找到了解决这个问题的方法,之前我的方法是这样的

    line 58 protected <T> T runFlow(String flowName) throws Exception {
    line 59 return this.runFlow(flowName, null); }

但后来我从这个question 中找到了解决方案

所以我对这个方法的更新代码变成了

     @SuppressWarnings("unchecked")
protected <T> T runFlow(String flowName) throws Exception {
    return (T) this.runFlow(flowName, null);
}

谢谢。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-08
    • 1970-01-01
    • 1970-01-01
    • 2011-02-03
    • 1970-01-01
    • 1970-01-01
    • 2016-03-20
    相关资源
    最近更新 更多