Hi Eugene,

The repetitions are actually zero-indexed and work much like an ArrayList
(i.e. you can't ask for rep 1 before you have asked for rep 0). This is
definitely a bit confusing, since fields/componens/etc. are one-indexed,
but it's historical at this point and pretty "baked in".

Do you have any more levels of that stack trace out of curiosity? I'm
curious if this is HAPI misbehaving, or just a bad call to it. If the
latter, that error message is definitely not very good so at a minimum we
should fix that.

Cheers,
James

On Sat, Mar 2, 2013 at 1:26 PM, Eugene Berman <eugene.ber...@mulesoft.com>wrote:

> I'm running into issues when trying to populate multiple ERR of v2.6 NACK
> message. The documentation states that getERR(int rep) creates a new
> repetition if necessary; however I get this when trying to run my code:
>
> ERROR 2013-03-02 10:22:00,526 [Thread-33]
> ca.uhn.hl7v2.model.v26.message.ACK: Unexpected error accessing data - this
> is probably a bug in the source code generator.
> ca.uhn.hl7v2.HL7Exception: Can't return repetition #1 of ERR - there are
> only 0 repetitions.
>         at ca.uhn.hl7v2.model.AbstractGroup.get(AbstractGroup.java:147)
>         at
> ca.uhn.hl7v2.model.AbstractGroup.getTyped(AbstractGroup.java:155)
>         at ca.uhn.hl7v2.model.v26.message.ACK.getERR(ACK.java:218)
>
> I use HAPI 2.0. Wondering if it is really a bug or user error.
>
> --
> Eugene Berman
> Sr. Enterprise Solutions Engineer
> ----
> MuleSoft Inc.
> 77 Geary Street, Ste. 400
> San Francisco, CA 94108
> Office: 415 229 2063
> Website: http://www.mulesoft.com <http://www.mulesoft.com/>
> ---
> Entia non sunt multiplicanda praeter necessitatem!
>
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Hl7api-devel mailing list
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to