kitodo/kitodo-production

Content server issues

Opened this issue · 9 comments

In the discussion for PR #495, several questions regarding the content server several questions were raised.

the content server does not work with Java > 1.6 under certain circumstances

Here more details are needed, so we can see how to address this issue.

As far as I know, there are no source files for the content server.

Even if we only have Java 1.5 or 1.6 byte code for the content server, that should not be a technical problem as long as builds don't fail because of missing deprecated methods.

Nevertheless it is very important to get sources. They are needed for legal reasons, and they are needed to fix potential bugs or to improve or enhance the code.

I know two public source code bases for the content server:

It looks like Goobi content server (gcs) and Intranda content server (ics) are two names for the same thing. Kitodo includes Goobi/WEB-INF/lib/ics-1.1.5.jar (added by commit fe7841d). This file includes parts created on 2013-02-06, so it is based on unpublished code.

I still don't know how the content server is used. It is possible to build Kitodo without Goobi/WEB-INF/lib/ics-1.1.5.jar. As soon as there is a description of the typical use cases for the content server, it will be possible to run tests with code based on the latest public source code. This code should be further developed on GitHub.

Compiling without ics-1.1.5.jar through ant build is failing:

$ ant clean war
Buildfile: /home/gerhardt/git/kitodo-production/build.xml

clean:
   [delete] Deleting directory /home/gerhardt/git/kitodo-production/build
   [delete] Deleting directory /home/gerhardt/git/kitodo-production/dist

check-java-version:

check-classpath:

check-servlet-api:

check-jsp-compilation:

check-preconditions:

createDirs:
    [mkdir] Created dir: /home/gerhardt/git/kitodo-production/build
    [mkdir] Created dir: /home/gerhardt/git/kitodo-production/dist
    [mkdir] Created dir: /home/gerhardt/git/kitodo-production/build/WEB-INF/classes
    [mkdir] Created dir: /home/gerhardt/git/kitodo-production/build/test-classes
    [mkdir] Created dir: /home/gerhardt/git/kitodo-production/build/WEB-INF/src
    [mkdir] Created dir: /home/gerhardt/git/kitodo-production/build/javadoc
    [mkdir] Created dir: /home/gerhardt/git/kitodo-production/build/test-reports
    [mkdir] Created dir: /home/gerhardt/git/kitodo-production/build/plugins/import/PicaMassImport
    [mkdir] Created dir: /home/gerhardt/git/kitodo-production/build/plugins/opac/PicaPlugin

init:

copy-hibernate-resources:
     [copy] Copying 19 files to /home/gerhardt/git/kitodo-production/build/WEB-INF/classes

compile-jsp:

compile:
    [javac] Compiling 342 source files to /home/gerhardt/git/kitodo-production/build/WEB-INF/classes
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:72: error: package de.unigoettingen.sub.commons.contentlib.exceptions does not exist
    [javac] import de.unigoettingen.sub.commons.contentlib.exceptions.ImageManagerException;
    [javac]                                                          ^
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:73: error: package de.unigoettingen.sub.commons.contentlib.exceptions does not exist
    [javac] import de.unigoettingen.sub.commons.contentlib.exceptions.ImageManipulatorException;
    [javac]                                                          ^
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:74: error: package de.unigoettingen.sub.commons.contentlib.imagelib does not exist
    [javac] import de.unigoettingen.sub.commons.contentlib.imagelib.ImageManager;
    [javac]                                                        ^
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:75: error: package de.unigoettingen.sub.commons.contentlib.imagelib does not exist
    [javac] import de.unigoettingen.sub.commons.contentlib.imagelib.JpegInterpreter;
    [javac]                                                        ^
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:361: error: cannot find symbol
    [javac]     public void scaleFile(String inFileName, String outFileName, int inSize, int intRotation) throws ImageManagerException, IOException,
    [javac]                                                                                                      ^
    [javac]   symbol:   class ImageManagerException
    [javac]   location: class MetadatenImagesHelper
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:362: error: cannot find symbol
    [javac]             ImageManipulatorException {
    [javac]             ^
    [javac]   symbol:   class ImageManipulatorException
    [javac]   location: class MetadatenImagesHelper
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:373: error: cannot find symbol
    [javac]             ImageManager im = new ImageManager(new File(inFileName).toURI().toURL());
    [javac]             ^
    [javac]   symbol:   class ImageManager
    [javac]   location: class MetadatenImagesHelper
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:373: error: cannot find symbol
    [javac]             ImageManager im = new ImageManager(new File(inFileName).toURI().toURL());
    [javac]                                   ^
    [javac]   symbol:   class ImageManager
    [javac]   location: class MetadatenImagesHelper
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:375: error: cannot find symbol
    [javac]             RenderedImage ri = im.scaleImageByPixel(tmpSize, tmpSize, ImageManager.SCALE_BY_PERCENT, intRotation);
    [javac]                                                                       ^
    [javac]   symbol:   variable ImageManager
    [javac]   location: class MetadatenImagesHelper
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:377: error: cannot find symbol
    [javac]             JpegInterpreter pi = new JpegInterpreter(ri);
    [javac]             ^
    [javac]   symbol:   class JpegInterpreter
    [javac]   location: class MetadatenImagesHelper
    [javac] /home/gerhardt/git/kitodo-production/Goobi/src/de/sub/goobi/metadaten/MetadatenImagesHelper.java:377: error: cannot find symbol
    [javac]             JpegInterpreter pi = new JpegInterpreter(ri);
    [javac]                                      ^
    [javac]   symbol:   class JpegInterpreter
    [javac]   location: class MetadatenImagesHelper
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 11 errors

BUILD FAILED
/home/gerhardt/git/kitodo-production/build.xml:248: Compile failed; see the compiler error output for details.

Total time: 7 seconds

This jar file provides used classes for:

So removing this jar file without proper replacement is no solution.

Maybe it is possible to use old launchpad version but this should somebody prove with tests (testsuite and real world usage in a test / development system).

Thanks for testing the build. I should have called ant clean before testing the build (that's a nasty difference between Java builds with ant and the Makefile based builds elsewhere).

Here is the result of a comparison of intrandaContentServer (git master) and goobi-contentserver 1.0:

$ LANG=C diff --rec intrandaContentServer/intrandaContentServer goobi-contentserver
Only in goobi-contentserver: .git
Only in intrandaContentServer/intrandaContentServer/WebContent/WEB-INF/lib: jai_codec-1.1.3.jar
Only in intrandaContentServer/intrandaContentServer/WebContent/WEB-INF/lib: jai_core-1.1.3.jar
Only in intrandaContentServer/intrandaContentServer/WebContent/WEB-INF/lib: jai_imageio-1.1.jar
Only in intrandaContentServer/intrandaContentServer: build.properties
Only in intrandaContentServer/intrandaContentServer: example
Only in intrandaContentServer/intrandaContentServer: mlib_jai.dll
Only in intrandaContentServer/intrandaContentServer: mlib_jai_mmx.dll
Only in intrandaContentServer/intrandaContentServer: mlib_jai_util.dll

Both repositories are nearly identical, but intrandaContentServer includes some additional files and a commit history (while goobi-contentserver only includes a single commit). The additional jar files included in intrandaContentServer are newer versions of jar files which are also part of Kitodo.Production.

There is also a 2nd branch (trunk) of goobi-contentserver, but that branch is from 2011. So it looks like the best code base for a new kitodo-contentserver might be the code from intrandaContentServer.

License for *contentserver:

  • 89 .java files use the Apache License.
  • According to `doc/ContentServer2.pdf, the code should use free licenses.
  • According to doc/GCS_whitepaper.pdf, the software is open source for free usage under the GNU General Public License.
  • The image files in example were obviously made at Göttinger Digitalisierungszentrum. They contain historical prints, so IMHO they are public domain.
  • I found no license hints in the remaining files.

Therefore I draw the conclusion that the whole project should use the GPL.

I still don't know how the content server is used.

  1. It is used to create the preview images in the metadata editor. (MetadatenImagesHelper.java)
  2. It can be used to get the process converted as PDF document. (ExportPdf.java)

For me important question is: what are the differences between old source code (preferred launchpad) and current used jar file ics-1.1.5.jar. Source code availability is important but it should match used jar class files.

I am afraid that you won't get a precise answer, unless you get a code update from Intranda.

Therefore I'd chose a different approach: replace ics-1.1.5.jar by a jar file created from the available (older) sources, test it and fix bugs / add missing features.

Some good news today:

I got yesterday the source code of ics-1.1.5.jar by @SteffenHankiewicz from Intranda GmbH. Source code is published on kitodo/kitodo-contentserver under ongoing Apache 2.0 license. Header of this files are not allowed to change - exceptions are grammar or format changes.

@SteffenHankiewicz, thank you for that contribution. Is that version also available as a (git) repository with more commit history, maybe as an update to http://repository.digiverso.com/gitweb/?p=intrandaContentServer.git?