Categories

B4J – Bugzilla for Java

This page will not be maintained anymore. Documentation has moved to GitHub starting with version 3.0.0.

This is Bugzilla for Java (B4J) – a Java based tool for accessing Bugzilla instances. B4J offers you to write your own reports based on those bug records that you want to incorporate.

New: Version 3.0 is out. It breaks previous API and introduces types for date properties.

Features:

  • platform-independent code
  • access to Bugzilla and Jira instances on remote servers via HTTP and HTTP proxies
  • password callbacks for maximum security
  • standard report interface
  • Open Source code based on LGPL license

More documentation is available here:

Maven Coordinates

<dependency>
  <groupId>eu.ralph-schuster</groupId>
  <artifactId>b4j</artifactId>
  <version>3.0.3</version>
</dependency>

Downloads

You can download the library from maven.org or as a stand-alone distribution archive. The latest stable version is 3.0.0. Sources are available through maven.org or can be browsed in GitHub.

Previous versions:

Support

Report a bug or request an enhancement…

15 replies on “B4J – Bugzilla for Java”

Dear Mr. Schuster,

I recently used your B4J library for one of my projects and I was pretty impressed with it. Thanks for all the hard work you have put in and really appreciate your efforts.

However, I had a small issue while accessing Bugzilla from Linux Kernel (kernel.bugzilla.org). The parser would fail often because of invalid UTF-8 character present in the Bug’s XML . I made a small code change to your code and more specifically HttpBugzillaSession class to first clean the XML and then parse it. I have put the changes here : http://pastebin.com/KFvmX1VJ

The changes I made is to just strip the XML of all the invalid characters before parsing. Since the bug’s XML is pretty small this can be achieved without much loss of performance. I hope this helps you.

Thanks and Kind Regards,
Deepak

[…] Bugzilla for Java made a major release jump to V2.0.0. The new version introduces a Java API to the REST interface of latest Bugzilla versions, re-structured the Issue interface by introducing component classes for nearly all associated objects (versions, components, users, priorities, resolutions, etc.) and brought back the JIRA session. A complete list of changes is available here. […]

Hi,

I recently looked up this tool and it’s really cool, is it able to search for bugs in date ranges?

greets

Hello Dude,

yes. B4J uses the HTTP parameters. So you can configure:

<search>
<query_format>advanced</query_format>
<f1>creation_ts</f1>
<o1>greaterthan</o1>
<v1>1980-01-01</v1>
<f2>creation_ts</f2>
<o2>lessthan</o2>
<v2>2014-01-01</v2>
</search>

This works at least for the BugzillaHttpSession. The BugzillaRpcSession shall be tested for it.

Hi Ralph,

I was using your api for bugzilla service and I needed to get Bug Activity for a particular bug but I was not able to find an API or object which will do this required tasks.
I have already tried looking at the api/javadocs.

Can you please let me know if there is an api/object which will fullfil my requirements.

Hi Ammar,

the API doesn’t provide this information yet. So I will need to add it (although, Bugzilla’s clean XML API doesn’t provide this information. Only WebService and HTML pages). I added a feature request for the next B4J release: http://jira.ralph-schuster.eu/browse/BFJ-83

Nevertheless, you can write your own BugzillaSession implementation if you can’t wait for that. My assumption is that I will not find time for this feature until next year 🙁

Regards

Ralph

Leave a Reply

Your email address will not be published. Required fields are marked *