URGENT! Parsing a Fixed length flat file

I am trying to parse a fixed length flat. I have created the appropriate template (by defining the
template in a xml file, adhering to all the requirements for templates).
However when I parse the flat file I get the following error

java.lang.NullPointerException
at wm.b2b.edi.EDIConverter.getSegment(EDIConverter.java:657)
at wm.b2b.edi.EDIConverter.createLoop(EDIConverter.java:478)
at wm.b2b.edi.EDIConverter.toEDIValues(EDIConverter.java:375)
at wm.b2b.edi.convertToValues(edi.java:667)

The source flat file does not have any repeating segments, in fact there is just one record/segment. I have crossed checked the specification of my template I do not see any errors. Is it necessary to have repeating segments in the flat file?

Your advice is appreciated.

thanks

I have one suggestion, although this is documented in b2bediusersguide.pdf. So you might as well have this in your template already.
You do need at least two segments and two loops defined in any EDI template for the parser to work (without this your segment and loop are records in stead of recordlist elements, and the parser program can not resolve indexed references). When you have just one segment, you need a dummy segment and loop.

Your template should look like this:

… //your segment definition

//dummy segment definition

... //your loop definition //dummy loop

I hope this works for you.
Huub