0

I am trying to install GeoNetwork 2.10 on Ubuntu Server 12.04 using the following XML install file:

<AutomatedInstallation langpack="eng">
    <com.izforge.izpack.panels.HelloPanel/>
    <com.izforge.izpack.panels.HTMLLicencePanel/>
    <com.izforge.izpack.panels.TargetPanel>
        <installpath>/usr/share/geonetwork</installpath>
    </com.izforge.izpack.panels.TargetPanel>
    <com.izforge.izpack.panels.PacksPanel>
        <selected>
            <pack index="0"/>
        </selected>
    </com.izforge.izpack.panels.PacksPanel>
    <com.izforge.izpack.panels.InstallPanel/>
    <com.izforge.izpack.panels.ShortcutPanel>
        <programGroup name="GeoNetwork opensource"/>
        <shortcut name="Open GeoNetwork opensource" initialState="1" commandLine="" workingDirectory="/usr/share/geonetwork" target="/usr/share/geonetwork/bin/win/start-stdln.html" type="1" icon="/usr/share/geonetwork/bin/ico/gn.ico" group="true" description="This opens the GeoNetwork homepage in a web browser" iconIndex="0"/>
        <shortcut name="Start server" initialState="0" commandLine="" workingDirectory="/usr/share/geonetwork/bin" target="/usr/share/geonetwork/bin/start-geonetwork.sh" type="1" icon="/usr/share/geonetwork/bin/ico/gnstart.ico" group="true" description="This starts the GeoNetwork server" iconIndex="0"/>
        <shortcut name="Stop server" initialState="0" commandLine="" workingDirectory="/usr/share/geonetwork/bin" target="/usr/share/geonetwork/bin/stop-geonetwork.sh" type="1" icon="/usr/share/geonetwork/bin/ico/gnstop.ico" group="true" description="This stops the GeoNetwork server" iconIndex="0"/>
        <shortcut name="Start GAST" initialState="0" commandLine="-jar &quot;/usr/share/geonetwork/gast/gast.jar&quot;" workingDirectory="/usr/share/geonetwork/bin" target="" type="1" icon="/usr/share/geonetwork/bin/ico/gast.ico" group="true" description="This starts GeoNetwork&apos;s Administrator Survival Tool" iconIndex="0"/>
        <shortcut name="Documentation" initialState="1" commandLine="" workingDirectory="/usr/share/geonetwork" target="/usr/share/geonetwork/web/geonetwork/docs/eng/users" type="1" icon="/usr/share/geonetwork/bin/ico/docs.ico" group="true" description="GeoNetwork opensource documentation" iconIndex="0"/>
        <shortcut name="Release notes " initialState="1" commandLine="" workingDirectory="/usr/share/geonetwork" target="/usr/share/geonetwork/web/geonetwork/docs/readme.html" type="1" icon="/usr/share/geonetwork/bin/ico/text.ico" group="true" description="GeoNetwork desktop release notes " iconIndex="0"/>
        <shortcut name="GPL License" initialState="1" commandLine="" workingDirectory="/usr/share/geonetwork" target="/usr/share/geonetwork/web/geonetwork/docs/license.html" type="1" icon="/usr/share/geonetwork/bin/ico/text.ico" group="true" description="GeoNetwork opensource GNU-GPL license " iconIndex="0"/>
        <shortcut name="Uninstaller" initialState="0" commandLine="-jar &quot;/usr/share/geonetwork/Uninstaller/uninstaller.jar&quot;" workingDirectory="" target="java" type="1" icon="trashcan_full" group="true" description="" iconIndex="0"/>
    </com.izforge.izpack.panels.ShortcutPanel>
    <com.izforge.izpack.panels.HTMLInfoPanel/>
    <com.izforge.izpack.panels.FinishPanel/>
</AutomatedInstallation>

When I run the install I get the following output:

$ java -jar geonetwork-install-2.10.3-0.jar geonetwork.install.xml 
[ Starting automated installation ]
Read pack list from xml definition.
Modify pack selection.
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
    at java.util.Vector.elementAt(Vector.java:447)
    at com.izforge.izpack.installer.AutomatedInstaller.updateInstanceCount(Unknown Source)
    at com.izforge.izpack.installer.AutomatedInstaller.doInstall(Unknown Source)
    at com.izforge.izpack.installer.Installer.main(Unknown Source)
[ Automated installation FAILED! ]

What could be wrong? Am I missing some package? Or is there something wrong with the install XML?

Update: The installer now run with DTRACE set to true:

$ sudo java -DTRACE=true -jar geonetwork-install-2.10.3-0.jar geonetwork.install.xml 
TRACE enabled.
No custom langpack available.
Initializing RulesEngine
RulesEngine.init()
Initializing builtin conditions for packs.
Pack.getCondition(): null for pack core
Pack.getCondition(): null for pack geoserver
Pack.getCondition(): null for pack inspire
Pack.getCondition(): null for pack gast
[ Starting automated installation ]
Read pack list from xml definition.
Modify pack selection.
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
    at java.util.Vector.elementAt(Vector.java:447)
    at com.izforge.izpack.installer.AutomatedInstaller.updateInstanceCount(Unknown Source)
    at com.izforge.izpack.installer.AutomatedInstaller.doInstall(Unknown Source)
    at com.izforge.izpack.installer.Installer.main(Unknown Source)
[ Automated installation FAILED! ]
1

Brad noted in the comments that this issue might be related to the Shortcut sections in the install XML. Since the install XML must be generated in a desktop environment, this particular file included the directives to create shortcuts and menus to GeoNetwork in the graphical desktop interface. As it happens, in a command line install these directives go rogue.

I generated a new install XML in the desktop, but this time disabling the option to tweak the graphical interface. The result is the following, with which the command line installer finds no issue:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<AutomatedInstallation langpack="eng">
 <com.izforge.izpack.panels.HelloPanel id="helloPanel"/>
 <com.izforge.izpack.panels.HTMLLicencePanel id="htmlLicensePanel"/>
 <com.izforge.izpack.panels.TargetPanel id="targetPanel">
  <installpath>/usr/share/geonetwork</installpath>
 </com.izforge.izpack.panels.TargetPanel>
 <com.izforge.izpack.panels.PacksPanel id="packsPanel">
  <pack index="0" name="Core" selected="true"/>
  <pack index="1" name="GeoServer" selected="true"/>
  <pack index="2" name="European Union INSPIRE Directive configuration pack" selected="true"/>
  <pack index="3" name="GAST" selected="true"/>
 </com.izforge.izpack.panels.PacksPanel>
 <com.izforge.izpack.panels.UserInputPanel id="userInputPanel">
 <userInput>
  <entry key="gui.radio" value="html5widget"/>
 </userInput>
 </com.izforge.izpack.panels.UserInputPanel>
 <com.izforge.izpack.panels.InstallPanel id="installPanel"/>
 <com.izforge.izpack.panels.ShortcutPanel id="shortcutPanel"/>
 <com.izforge.izpack.panels.HTMLInfoPanel id="htmlInfoPanel"/>
 <com.izforge.izpack.panels.FinishPanel id="finishPanel"/>
</AutomatedInstallation>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.