License     Codehaus     OpenEJB     OpenJMS     OpenORB     Tyrex     

Old releases
  General
  Release 1.3
  Release 1.3rc1
  Release 1.2

Main
  Home
  About
  Features
  Download
  Dependencies
  Reference guide
  Publications
  JavaDoc
  Maven 2 support
  Maven 2 archetypes
  DTD & Schemas
  Recent HTML changes
  News Archive
  RSS news feed
  Project Wiki

Development/Support
  Mailing Lists
  SVN/JIRA
  Contributing
  Support
  Continuous builds
  Prof. services

Related projects
  Spring ORM support
  Spring XML factories
  WS frameworks

XML
  XML

XML Code Generator
  XML Code Generator

JDO
  Introduction
  First steps
  Using JDO
  JDO Config
  Types
  JDO Mapping
  JDO FAQ
  JDO Examples
  JDO HOW-TOs
  Tips & Tricks
  Other Features
  JDO sample JAR

Tools
  Schema generator

Advanced JDO
  Caching
  OQL
  Trans. & Locks
  Design
  KeyGen
  Long Trans.
  Nested Attrs.
  Pooling Examples
  LOBs
  Best practice

DDL Generator
  Using DDL Generator
  Properties
  Ant task
  Type Mapping

More
  The Examples
  3rd Party Tools
  JDO Tests
  XML Tests
  Configuration
 
 

About
  License
  User stories
  Contributors
  Marketplace
  Status, Todo
  Changelog
  Library
  Contact
  Project Name

  



Submitting a bug report


Submitting a problem report
    Driver
    Introduction
    Templates
    XML code generator templates
    Creating the patch
    References


Submitting a problem report

Driver

Most of the traffic on the Castor Users mailing list is about people asking for help on various features of Castor (whether JDO or XML). Whilst there is nothing wrong about asking questions and looking for help if you are stuck, it seems that there is room to improve the structure of this 'conversation'.

If you have a look at some of these threads (e.g. at the searchable mailing list archive), it's quite easy to see that most of the time ...

  1. An initial question is posted.

  2. An initial reply is posted with some follow-up questions, e.g. request for code fragments, mapping files, etc.

  3. One or more code fragments, mapping files, etc. are being posted.

  4. etc.

This document will establish guidelines with regards to step 3) above.

Introduction

This document provides step-by-step instructions on how to submit a problem report (when being asked to do so). It does so by walking you through a fictive problem and its resulting bug report, and providing instructions based upon this scenario.

Per definition, any problem report submitted (in other words, most likely attached to a bug report at http://jira.codehaus.org/browse/CASTOR) by the means of a patch should include one of the following artefacts:

-A JUnit test case that 'showcases' your problem.
-Castor XML mapping file.
-One or more 'entity' classes required to run your test case.
-An XML Schema instance.
-An Ant build script to generate classes from the XMl Schema provided.
-A README file (with any additional information/instructions required to understand /run your test case.

Note: Whilst we can and will not impose these guidelines in their strictest sense, I think that the use of the aforementioned artefacts will simplify problem resolution and as a result lead to shorter turn-around times. Which is ultimately where you, the user, gains.

Templates

To facilitate creation of a fully featured patch as discussed above, we have provided you with an already existing bug template at 'src/bugs/xml/template'.

Note:Please note that this directory is distributed only as part of the source archive(s).

This directory holds some of the artefacts mentioned above, and is structured as follows:

srcSource code
src/bugsCommon root for bug reports
src/bugs/xmlCommon root for XML bug reports
src/bugs/xml/templatePatch template
src/bugs/xml/template/TestTemplate.javaJUnit test case.
src/bugs/xml/template/Entity.javaEntity required by the test case
src/bugs/xml/template/mapping.xmlCastor XML mapping file
src/bugs/xml/template/READMETest instructions

To create you own bug report, please copy 'template' to e.g. bug1368, assuming that 1368 is the number assigned to your Jira issue). Subsequently, please amend the files provided to match your own requirements. After you have consolidated your changes, the original directory structure in src/bugs could look as follows:

srcSource code
src/bugsCommon root for bug reports
src/bugs/xmlCommon root for XML bug reports
src/bugs/xml/templatePatch template
src/bugs/xml/template/TestTemplate.javaJUnit test case.
src/bugs/xml/template/Entity.javaEntity required by the test case
src/bugs/xml/template/mapping.xmlCastor mapping file
src/bugs/xml/template/READMETest instructions
src/bugs/xml/bug1368Your specific bug (as per Jira bug number)
src/bugs/xml/bug1368/build.xmlAnt build script.
src/bugs/xml/bug1368/custom.xsdXML Schema instance
src/bugs/xml/bug1368/READMETest instructions

XML code generator templates

To facilitate creation of a fully featured but report/patch for the XML code generator, we have provided you with an already existing bug template at 'codegen/src/test/java' and 'codegen/src/test/resources'.

Note:Please note that these directories are distributed only as part of the source archive(s).

These directory holds some of the artefacts mentioned above, and is structured as follows (all paths shown relative to codegen/src/test):

FileDescription
java/xml/srcgen/template/TestSourceGenerator.javaJUnit test case.
resources/xml/srcgen/template/test.xsdXML schema file

To create you own bug report, please copy 'xml.srcgen.template' in both locations to e.g. xml.bug1368, assuming that 1368 is the number assigned to your Jira issue). Subsequently, please amend the files provided to match your own requirements. After you have consolidated your changes, the original directory structure in codegen/src/test could look as follows:

FileDescription
java/xml/srcgen/template/TestSourceGenerator.javaJUnit test case.
java/xml/bug1368/TestSourceGenerator.javaJUnit test case.
resources/xml/srcgen/template/test.xsdXML schema file
resources/xml/bug1368/test.xsdXML schema file
resources/xml/bug1368/binding.xmlXML code generator binding file
resources/xml/bug1368/builder.propertiesCode generator properties

Creating the patch

As a last step, we ask you submit your code changes in the form of a unified patch by attaching it to the relevant Jira issue. Please simply follow the instructions provided here.

References

Whilst we cannot assume that every Castor (XML) user is an expert in the use of JUnit, we do believe that they are quite easy to get acquainted with. As a starting point, please find below some references:

-JUnit - A well-known framework for writing integration-level and functional tests.
 
   
  
   
 


Copyright © 1999-2005 ExoLab Group, Intalio Inc., and Contributors. All rights reserved.
 
Java, EJB, JDBC, JNDI, JTA, Sun, Sun Microsystems are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and in other countries. XML, XML Schema, XSLT and related standards are trademarks or registered trademarks of MIT, INRIA, Keio or others, and a product of the World Wide Web Consortium. All other product names mentioned herein are trademarks of their respective owners.