GLI for Greenstone v2.80 freezes

Help
2008-03-04
2013-04-25
  • Hi,

    I installed Greenstone v2.80 for Linux (I'm using CentOS) and it seemed to work properly, but I can't make a new collection. Since I start GLI from a terminal window, it throws some exceptions:

    SAX exception: The element type "PluginList" must be terminated by the matching end-tag "</PluginList>".
    org.xml.sax.SAXParseException: The element type "PluginList" must be terminated by the matching end-tag "</PluginList>".
            at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)

    ...this repeated for other libraries and lines of code. When the application starts, it let me create a a new collection, but when I try to open it, the message

    "La colección en: /usr/local/gsdl/collect/prueba/prueba.col no se pudo abrir"
    "Cannot open the collection: /usr/local/gsdl/collect/prueba/prueba.col "

    appears and if I try to choose any option of the menu bar (like trying to reopen it or another one) the program frezees and throws several Java exceptions like:

    SAX exception: The markup in the document preceding the root element must be well-formed.
    org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
           at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)
           at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:626)

    java.lang.NullPointerException
            at org.greenstone.gatherer.greenstone.Plugins.getPlugin(Plugins.java:74)
            at org.greenstone.gatherer.cdm.Plugin.create(Plugin.java:75)
            at org.greenstone.gatherer.cdm.DOMProxyListModel.getElementAt(DOMProxyListModel.java:221)
            at org.greenstone.gatherer.cdm.PluginManager.<init>(PluginManager.java:80)
            at org.greenstone.gatherer.cdm.CollectionDesignManager.loadDesignDetails(CollectionDesignManager.java:125)

    ...And the same if try to open the demo collection provided by default with the distribution.

    I also tried to make a new collection following the steps at the Developer manual, the first step works ok, the second (using mkecol.pl)works but doesn't create all the folder it indicates... Well, after that I made a new folder import, placed the files inside and tried the command import.pl (the new collection's name is nuevo).

    But it didn't work at all, it showed me:

    Can't load '/usr/local/gsdl/perllib/cpan/perl-5.8/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: /usr/local/gsdl/perllib/cpan/perl-5.8/auto/XML/Parser/Expat/Expat.so: undefined symbol: PL_stack_sp at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230.
    at /usr/local/gsdl/perllib/cpan/perl-5.8/XML/Parser.pm line 14
    Compilation failed in require at /usr/local/gsdl/perllib/cpan/perl-5.8/XML/Parser.pm line 14.
    BEGIN failed--compilation aborted at /usr/local/gsdl/perllib/cpan/perl-5.8/XML/Parser.pm line 18.
    Compilation failed in require at /usr/local/gsdl/perllib/cfgread4gs3.pm line 60.
    BEGIN failed--compilation aborted at /usr/local/gsdl/perllib/cfgread4gs3.pm line 60.
    Compilation failed in require at /usr/local/gsdl/perllib/colcfg.pm line 31.
    BEGIN failed--compilation aborted at /usr/local/gsdl/perllib/colcfg.pm line 31.
    Compilation failed in require at /usr/local/gsdl/bin/script/import.pl line 44.
    BEGIN failed--compilation aborted at /usr/local/gsdl/bin/script/import.pl line 44.

    ...and I realized the collection 'nuevo' doesn't exists if I try to open it with GLI (it isn't listed).

    If someone can help me I apreciate it so much...
    (Spanish spoken for those who just understand reading english...)

     
    • Anu Krishnan
      Anu Krishnan
      2008-03-06

      Hi,

      I had installed Greenstone 2.80 on Linux just day-before-yesterday and encountered Exceptions too that caused my GLI to freeze when creating or opening collections (sometimes I got a "collection not found" message when opening an existing collection). The crucial exception I got was a SAXException about <PluginList> not having a terminating </PluginList>.

      The following solved it for me. See if it solves your problem as well. The Cause and Solution in my case were found by Dr Bainbridge. Unfortunately, attempting the solution below is going to take a little bit of time and some downloading on your part.

      CAUSE:
      In the case of my installation, it turned out that the SAX parsing exception was due to linking troubles of Perl-with-C code. These were due to incompatibility between some dynamically linked Linux libraries (*.so files, such as Expat.so) and the current version of Linux that is running on my machine. This happens in cases where a different Linux version compiled those libraries to the one they are running on.
      This might be similar to what's going on in your situation too. In any case, the ultimate exception that showed in my case was the SAX one about <PluginList>.

      SOLUTION:
      You will need to compile your installation of Greenstone from source. This means that you won't have any incompatibility issues anymore.

      You can do this either by:
      - compiling the Greenstone 2.80 Binary/Distribution version you downloaded (although it requires downloading a bit more to complete it), or
      - downloading the source version of 2.80 from http://www.greenstone.org/download (specifically http://prdownloads.sourceforge.net/greenstone/gsdl-2.80-src.tar.gz\) and compiling that.

      I will assume you just want to go by the first option: compile your Linux Binary/Distribution version, although from (4) onwards it is meant to work with the second option as well. I had tried both ways yesterday and they worked for me.

      HOW:
      Read through the following first, before attempting:
      (1) Run the Greenstone installation program again of your 2.80 Binary, which will launch the installshield:
      >./setupLinux.bin

      (2) Go through the installation and choose Custom setup and tick everything - INCLUDING source. This will install a copy of (most of) the source code. We're going to compile this, so we need it.

      (3) Check if your installation folder (perhaps it is called gsdl) contains the "indexers" folder. Probably not. In which case, the source is missing the "indexers" bit. It's anticipated that this oversight will be corrected and that the indexers source code will be available with the rest of the source code the next time.
      http://prdownloads.sourceforge.net/greenstone/gsdl-2.80-src.tar.gz
      contains the indexers (and the rest of the source you already have). To untar/unzip it, type >tar -xvzf gsdl-2.80-src.tar.gz
      The indexers folder is located in the unzipped "gsdl" folder.

      Put the indexers folder inside your gsdl/greenstone 2 installation folder (the one that contains the setup.bash file). I'll call this your $GSDLHOME folder! (It is usually the gsdl folder.)

      (4) Now, go to the $GSDLHOME folder and type
      >./configure
      > make all
      > make install

      (
      If it complains about "gdbm" and "usr/local" while compiling, then you need to find the path to gdbm first:
      $GSDLHOME>find . -name "gdbm"
      Hopefully this will find the location of gdbm for you and you can use this path in the configuration and make again:
      >./configure --with-gdbm=/path/to/gdbm/dir
      >make
      >make install

      If you still have difficulties here, looking at http://wiki.greenstone.org/wiki/index.php/Compiling_Greenstone may help you.
      )

      (5) Still in $GSDLHOME, set up the environment for GSDLHOME:
      >source setup.bash

      (6) You should be able to view it in your web server after you do the following:
      (a) In your apache web server httpd.conf file, add the following (unless you already have it), making sure to adjust the 4 occurrences of $GSDLHOME to its full path below:

      #Greenstone 2 script:
        ScriptAlias /gsdl/cgi-bin "$GSDLHOME/cgi-bin"
        <Directory "$GSDLHOME/cgi-bin">
           Options None
           AllowOverride None
        </Directory>
       
        Alias /gsdl "$GSDLHOME/"
        <Directory "$GSDLHOME/">
           Options Indexes MultiViews FollowSymLinks
           AllowOverride None
           Order allow,deny
           Allow from all
        </Directory>

      (b) in the file $GSDLHOME/cgi-bin/gsdlsite.cfg,
      - Change:
          gsdlhome    **GSDLHOME**
      To the full path of $GSDLHOME in quotes:
          gsdlhome    "/full/path/"
      - Uncomment: #httpprefix  /gsdl
          httpprefix  /gsdl
      - And adjust: "httpimg /images" to
          httpimg     /gsdl/images

      (c) Open your browser at
      http://WebServerName:WebServerPort/gsdl/cgi-bin/library

      (7) Now you need to compile GLI:
      > cd gli
      > ./makegli.sh

      (8) Run GLI (I run the application):
      >./gli.sh

      (9) Try creating new collections and opening existing ones now. Does it work? If it doesn't, in the GLI folder, do a
      >./clean.sh
      And then run gli again
      >./gli.sh

      And if it still gives trouble creating/opening collections, go to $GSDLHOME and
      >make clean
      Repeat (4):
      (>./configure)
      > make all
      > make install

      (It takes a long time to "make all". I had to do it a second time now myself on the non-binary/source version, after which it worked again.)
      Hopefully the above will solve your problem.

      Anu,
      DL lab, University of Waikato
      ------------------------------------------------------------------------
      If you find bugs (defects) in Greenstone, you can submit 'bug reports' via http://trac.greenstone.org/
      Thanks for your help.