【发布时间】: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