【问题标题】:Cannot report new bugs to Bugzilla via J2Bugzilla无法通过 J2Bugzilla 向 Bugzilla 报告新错误
【发布时间】:2015-02-11 09:54:32
【问题描述】:

我尝试搜索此主题,但似乎没有任何内容涵盖我的确切问题。我有一个 java 和 jsp 程序,我希望能够向我的 Bugzilla 安装报告错误。我一直在测试我首先针对 Bugzilla 垃圾填埋场创建的方法,但我无法让它发挥作用。

我的问题是我已经尝试了所有示例代码,但我仍然遇到了似乎源于 executeMethod() 的相同错误。

这是我的jsp页面示例,它调用了我的java类的方法:

<jsp:useBean id="error" class="bug.TestClass" scope="session"/> <% String result = error.reportBug("error"); out.print(result);%>

Java 方法,我已经屏蔽了 Bugzillla 垃圾填埋场的用户名和密码,但我检查了它们是正确的:

    public static String reportBug(String bugError) { 
    try {
        BugzillaConnector conn = new BugzillaConnector();
        conn.connectTo("http://landfill.bugzilla.org/");
        BugzillaMethod logIn = new LogIn ("*****@hotmail.com", "****");
        conn.executeMethod(logIn);

        BugFactory factory = new BugFactory();
        Bug bug = factory.newBug()
        .setOperatingSystem("WINDOWS")
        .setPlatform("PC")
        .setPriority("P1")
        .setProduct("FoodReplicator")
        .setComponent("Salt")
        .setSummary(bugError)
        .setVersion("1.0")
        .setDescription("It doesn't work.")
        .createBug();

         ReportBug report = new ReportBug(bug);
         conn.executeMethod(report);
         int id = report.getID();

         result += "Successful";

    } catch (Exception e) {
       result = e.toString();
    }
    return result;
}

这是我打开 jsp 页面时遇到的错误:

com.j2bugzilla.base.BugzillaException: An unknown error was encountered; fault code: 0

我已经为此工作了几天,因此非常感谢任何帮助。谢谢

【问题讨论】:

    标签: java api exception bugzilla issue-tracking


    【解决方案1】:

    我遇到了同样的问题。然后我将 j2bugzilla jar 从 2.0 更新到 2.2.1。然后就可以了。

    【讨论】:

      猜你喜欢
      • 2012-08-16
      • 1970-01-01
      • 2011-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多