1. Sebastian Sebastian
  2. scm-manager

Issues

Issue #351 resolved

Mercurial: API requests terminate with javahg UnexpectedServerTerminationException

Klaus Drobec
created an issue

Source browsing, Commits browsing and zip-Archive requests all fail with 500 ISE and (as far as I can tell) identical traces.

Affected APIs: scm/api/rest/repositories/<key>/browse.json scm/api/rest/repositories/<key>/tags.json scm/api/rest/repositories/<key>/changesets.json scm/api/rest/repositories/<key>/branches.json

The "Download Archive" link produces a zero-size empty file.

Attached is the output from a separated browse.json API call.

Comments (5)

  1. Sebastian Sebastian repo owner
    • changed status to open

    It look like you are using a different encoding than UTF-8 in your repositories and SCM-Manager tries to access these repositories with UTF-8. You can configure the encoding for mercurial at "Repository Types->Mercurial->Encoding".

  2. Klaus Drobec reporter

    First, thank you for the quick reply. I can see where the "unexpected EOF" suggests an encoding issue.

    Unfortunately, changing the encoding configuration for Mercurial repositiories brought no difference in behaviour.

    As to the encodings involved

    scm-server runs as a standalone application server on an instance of Debian Squeeze, set up to use the "de_at.UTF-8" locale.

    Mercurial - according to Selenic - doesn't much care about encodings unless it is specifically told to use one. I have yet to figure out a way to determine which encoding the "hg" command considers "inherent" but I have to assume it's UTF-8 from the locale.

    The only other machine used to edit this repository is running Windows 7.

    Folder names, file names and file contents actually only use characters from the ASCII character range so there should be no difference between interpreting them as ASCII, UTF-8, WINDOWS-1252 or ISO-8859-7. There are BOMs involved, though, so maybe they are throwing the parser.

    Can I expect to find more details in trace logs? Are the javahg packages affected by this setting?

  3. Sebastian Sebastian repo owner

    Yes, you could enable trace logging for the java hg classes. Add the following line to the logging.xml:

      <logger name="com.aragost.javahg" level="TRACE" />
    

    And post the output please.

  4. Log in to comment