SVN Repository Connection Fails Due to 'You must call Structure.setFieldOrder()'

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

While connecting to a SVN repository via svn+ssh using private key authentication, the following exception is reported:

Unable to get info for the repository root for <Repository_Name>
You must call Structure.setFieldOrder() in the base constructor for class
org.tmatesoft.svn.core.internal.util.jna.SVNGnomeKeyring$GnomeKeyringContext
to ensure that JNA can accurately determine your Structure's memory layout.
To avoid this message, either call Structure.setFieldOrder() in your
Structures constructor, or set jna.predictable_field_order=true if you are
certain the VM you are using provides fields in a predictable order.
at com.sun.jna.Structure.getFields(Structure.java:826)
at com.sun.jna.Structure.deriveLayout(Structure.java:905)
at com.sun.jna.Structure.calculateSize(Structure.java:867)
at com.sun.jna.Structure.allocateMemory(Structure.java:343)
at com.sun.jna.Structure.ensureAllocated(Structure.java:324)
Unable to get Repository Root URL for <Repository_URL>
Exception getting FishEye access control
You must call Structure.setFieldOrder() in the base constructor for class
org.tmatesoft.svn.core.internal.util.jna.SVNGnomeKeyring$GnomeKeyringContext
to ensure that JNA can accurately determine your Structure's memory layout.
To avoid this message, either call Structure.setFieldOrder() in your
Structures constructor, or set jna.predictable_field_order=true if you are
certain the VM you are using provides fields in a predictable order.
at com.sun.jna.Structure.getFields(Structure.java:826)
at com.sun.jna.Structure.deriveLayout(Structure.java:905)
at com.sun.jna.Structure.calculateSize(Structure.java:867)
at com.sun.jna.Structure.allocateMemory(Structure.java:343)
at com.sun.jna.Structure.ensureAllocated(Structure.java:324)
Error testing connection.
You must call Structure.setFieldOrder() in the base constructor for class
org.tmatesoft.svn.core.internal.util.jna.SVNGnomeKeyring$GnomeKeyringContext
to ensure that JNA can accurately determine your Structure's memory layout.
To avoid this message, either call Structure.setFieldOrder() in your
Structures constructor, or set jna.predictable_field_order=true if you are
certain the VM you are using provides fields in a predictable order.
at com.sun.jna.Structure.getFields(Structure.java:826)
at com.sun.jna.Structure.deriveLayout(Structure.java:905)
at com.sun.jna.Structure.calculateSize(Structure.java:867)
at com.sun.jna.Structure.allocateMemory(Structure.java:343)
at com.sun.jna.Structure.ensureAllocated(Structure.java:324)
Connection failed.

Cause

JNA was upgraded in Fisheye 2.8.2 as part of the following bug fix:  FE-4286 - Getting issue details... STATUS

The above message is part of a JNA 3.4.2 implementation, as further detailed in this discussion.

Resolution

Option #1

  1. Shutdown Fisheye.
  2. Add -Djna.predictable_field_order=true to the FISHEYE_OPTS environment variable. This will pass the parameter to the JVM.
  3. Start Fisheye.

Option #2

  1. Shutdown Fisheye.
  2. Edit the subversion client configuration file:

    Mac/Linux

    ~/.subversion/config or /etc/subversion/config

    Windows

    %appdata%\subversion\config

    [auth]
    store-passwords = no
    store-auth-creds = no
    

    This will disable the credential caching system.

  3. Start Fisheye.
Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.