JTrac is a neat system for bug tracking. Suitable for small to mid sized teams.
Our company has a tradition of using proprietary databases. Every open source issue tracker found (Trac, Bugzilla) are complex and requires a particular backend.
Hibernare to the rescue. JTrac's usage of Hibernate and Spring makes it a piece of cake to use.
I was able to run JTrac with Oracle 10g XE in less than a hour.
First I configured the database (for dbcp) and included the oracle driver (ojdbc14.jar) in the lib of jetty (any standard servlet container will work). In jtrac.properties I changed the hibernate dialect to Oracle10gDialect.
Started jetty, and found that dbcp was not creating connections, the reason is simple the validate query(select 1) was throwing error and this step is included in the jtrac installation guide. So, added (database.validationQuery=select 1 from dual) in the jtrac.properties.
After solving the validate query Hibernate was not creating all tables (total 13 tables out of which 1 was not created - History table). I enabled hibernate logging (hibernate.show_sql=true and log4j.logger.org.hibernate.SQL=debug) in jtrac.properties and found that Oracle was returning a invalid identifier for history table creation. The reason is simple, one of the column in history table is 'comment' which I think is a oracle keyword.
So, I request the maintainers to change it to 'comments' or something else in the jtrac.hbm.xml (class name="History", property name="comment" and change column="comments") so that it will work with any db.
I also found that Hibernate was creating hibernate.sequence in oracle (all generators were native), even then it was not a problem. I was able to login and create spaces. I see the ids created oddly in the database, so I have to change the generator to sequence in jtrac.hbm.xml and create the sequence in Oracle.
Every thing went fine, I created 2 spaces with (3 roles each and 10 states each and 5 custom fields each). There were no known issues. Every thing works fine. Thanks for the members and contributors of this great software.
It is worth to mention that the design of the software is neat and clean. Anyone with basic knowledge of J2EE, Hibernate etc. can work with it.
Summary to make JTrac work with Oracle 10G:
1) Edit jtrac.properties and change the dialect and other db stuff, The jtrac.properties I used are
2) Edit jtrac.hbm.xml present in WEB-INF/classes of the jtrac.war and change the column 'comment' for history table to column 'comments'. This is my hibernate mapping for history
Hi all,
JTrac is a neat system for bug tracking. Suitable for small to mid sized teams.
Our company has a tradition of using proprietary databases. Every open source issue tracker found (Trac, Bugzilla) are complex and requires a particular backend.
Hibernare to the rescue. JTrac's usage of Hibernate and Spring makes it a piece of cake to use.
I was able to run JTrac with Oracle 10g XE in less than a hour.
First I configured the database (for dbcp) and included the oracle driver (ojdbc14.jar) in the lib of jetty (any standard servlet container will work). In jtrac.properties I changed the hibernate dialect to Oracle10gDialect.
Started jetty, and found that dbcp was not creating connections, the reason is simple the validate query(select 1) was throwing error and this step is included in the jtrac installation guide. So, added (database.validationQuery=select 1 from dual) in the jtrac.properties.
After solving the validate query Hibernate was not creating all tables (total 13 tables out of which 1 was not created - History table). I enabled hibernate logging (hibernate.show_sql=true and log4j.logger.org.hibernate.SQL=debug) in jtrac.properties and found that Oracle was returning a invalid identifier for history table creation. The reason is simple, one of the column in history table is 'comment' which I think is a oracle keyword.
So, I request the maintainers to change it to 'comments' or something else in the jtrac.hbm.xml (class name="History", property name="comment" and change column="comments") so that it will work with any db.
I also found that Hibernate was creating hibernate.sequence in oracle (all generators were native), even then it was not a problem. I was able to login and create spaces. I see the ids created oddly in the database, so I have to change the generator to sequence in jtrac.hbm.xml and create the sequence in Oracle.
Every thing went fine, I created 2 spaces with (3 roles each and 10 states each and 5 custom fields each). There were no known issues. Every thing works fine. Thanks for the members and contributors of this great software.
It is worth to mention that the design of the software is neat and clean. Anyone with basic knowledge of J2EE, Hibernate etc. can work with it.
Summary to make JTrac work with Oracle 10G:
1) Edit jtrac.properties and change the dialect and other db stuff, The jtrac.properties I used are
database.driver=oracle.jdbc.driver.OracleDriver
database.url=jdbc:oracle:thin:@localhost:1521:xe
database.username=jtrac
database.password=<your password>
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
hibernate.show_sql=true
database.validationQuery=select 1 from dual
2) Edit jtrac.hbm.xml present in WEB-INF/classes of the jtrac.war and change the column 'comment' for history table to column 'comments'. This is my hibernate mapping for history
<class name="History" table="history">
<id name="id" column="id">
<generator class="sequence" >
<param name="sequence">HISTORY_SEQ</param>
</generator>
</id>
<version name="version" column="version"/>
<property name="type" column="type"/>
<many-to-one name="parent" column="item_id" not-null="true"/>
<property name="actualEffort" column="actual_effort"/>
<many-to-one name="attachment" column="attachment_id"/>
<property name="comment" column="comments" type="text"/>
<!-- identical to Item -->
<property name="timeStamp" column="time_stamp"/>
<many-to-one name="loggedBy" column="logged_by" not-null="true"/>
<many-to-one name="assignedTo" column="assigned_to"/>
<property name="summary" column="summary"/>
<property name="detail" column="detail" type="text"/>
<property name="status" column="status"/>
<property name="severity" column="severity"/>
<property name="priority" column="priority"/>
<property name="cusDbl01" column="cus_dbl_01"/>
<property name="cusDbl02" column="cus_dbl_02"/>
<property name="cusDbl03" column="cus_dbl_03"/>
<property name="cusInt01" column="cus_int_01"/>
<property name="cusInt02" column="cus_int_02"/>
<property name="cusInt03" column="cus_int_03"/>
<property name="cusInt04" column="cus_int_04"/>
<property name="cusInt05" column="cus_int_05"/>
<property name="cusInt06" column="cus_int_06"/>
<property name="cusInt07" column="cus_int_07"/>
<property name="cusInt08" column="cus_int_08"/>
<property name="cusInt09" column="cus_int_09"/>
<property name="cusInt10" column="cus_int_10"/>
<property name="cusStr01" column="cus_str_01"/>
<property name="cusStr02" column="cus_str_02"/>
<property name="cusStr03" column="cus_str_03"/>
<property name="cusStr04" column="cus_str_04"/>
<property name="cusStr05" column="cus_str_05"/>
<property name="cusTim01" column="cus_tim_01"/>
<property name="cusTim02" column="cus_tim_02"/>
<property name="cusTim03" column="cus_tim_03"/>
</class>
3) Also, don't forget to include the generator sequence. Check the mapping in step 2.
Nice work guys. Keep up the good work.
Thanks,
V.Vishnu,
Anakaputhur,
Chennai,
India
email: vishnu.vijayaraghavan@gmail.com