Durbin, Michael R wrote:
Haiko van der Schaaf,
You don't need to rebuild, you can just add the jrdf-0.5.5.4.jar, slf4j-api-1.5.2.jar and
slf4j-jdk14-1.5.2.jar to the "lib" directory within analyzer.jar (and then the
other 2 when you get to that step). You can find those jars in the webapp directory
created at installation time. If you don't like working with jar tools, you can rename
analyzer.jar as a .zip file and zip tools should work fine.
I've published the notes from one of the migrations I worked through on our
internal wiki (with some public pages) and though those are the big problems,
perhaps some of the other notes will prove useful.
http://wiki.dlib.indiana.edu/confluence/display/INF/Test+Server+Migration+Notes
-Mike Durbin
-----Original Message-----
From: Haiko van der Schaaf [mailto:[email protected]]
Sent: Tuesday, January 27, 2009 10:42 AM
To: [email protected]
Subject: [Fedora-commons-developers] upgrade to Fedora 3 analyzer from
migration-utils is failing on ClassNotFoundException
Hi,
I am trying to upgrade my data from fedora 2 to fedora 3. Using the
analyzer.jar from the migration zip I am running constantly into
ClassNotFondExceptions. I am now constructing the jar from source
including the not found classes.
Has anybody else this experience and if so, already a solution other
then building from source including missing jars ??
i.e.
java -jar analyzer.jar migration.properties
INFO: Configuration specifies ignoreDatastreamIDs: DC RELS-EXT RELS-INT POLICY
ERROR: Analysis failed due to an unexpected error
fedora.common.FaultException: Error constructing class:
fedora.server.storage.translation.FOXML1_1DOSerializer
at
fedora.utilities.config.ConfigUtil.constructionFailed(ConfigUtil.java:191)
at fedora.utilities.config.ConfigUtil.construct(ConfigUtil.java:175)
at fedora.utilities.cma.analyzer.Analyzer.<init>(Analyzer.java:179)
at fedora.utilities.cma.analyzer.Analyzer.main(Analyzer.java:416)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.simontuffs.onejar.Boot.run(Boot.java:306)
at com.simontuffs.onejar.Boot.main(Boot.java:159)
Caused by: java.lang.NoClassDefFoundError: org/jrdf/graph/PredicateNode
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at fedora.utilities.config.ConfigUtil.construct(ConfigUtil.java:166)
... 8 more
Caused by: java.lang.ClassNotFoundException: org.jrdf.graph.PredicateNode
at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:602)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
after including jrdf.jar I got
java -jar analyzer.jar migration.properties
INFO: Configuration specifies ignoreDatastreamIDs: DC RELS-EXT RELS-INT POLICY
INFO: Cleared 4 rows from objectPaths table
INFO: objectPaths table is empty; will rebuild
INFO: Building objectPaths table from objects at
/home/haiko/development/fedora/data/objects
Exception in thread "Thread-1" java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory
at info.aduna.xml.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:41)
at org.openrdf.rio.rdfxml.RDFXMLParser.parse(RDFXMLParser.java:256)
at org.openrdf.rio.rdfxml.RDFXMLParser.parse(RDFXMLParser.java:209)
at org.trippi.io.RIOTripleIterator.run(RIOTripleIterator.java:153)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:602)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 5 more
Exception in thread "Thread-2" java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory
at info.aduna.xml.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:41)
at org.openrdf.rio.rdfxml.RDFXMLParser.parse(RDFXMLParser.java:256)
at org.openrdf.rio.rdfxml.RDFXMLParser.parse(RDFXMLParser.java:209)
at org.trippi.io.RIOTripleIterator.run(RIOTripleIterator.java:153)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-3" java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory
at info.aduna.xml.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:41)
at org.openrdf.rio.rdfxml.RDFXMLParser.parse(RDFXMLParser.java:256)
at org.openrdf.rio.rdfxml.RDFXMLParser.parse(RDFXMLParser.java:209)
at org.trippi.io.RIOTripleIterator.run(RIOTripleIterator.java:153)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-4" java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory
at info.aduna.xml.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:41)
at org.openrdf.rio.rdfxml.RDFXMLParser.parse(RDFXMLParser.java:256)
at org.openrdf.rio.rdfxml.RDFXMLParser.parse(RDFXMLParser.java:209)
at org.trippi.io.RIOTripleIterator.run(RIOTripleIterator.java:153)
at java.lang.Thread.run(Thread.java:619)
Regards,
Haiko van der Schaaf
Thanks for the info. I had them already build from source. For anyone
interested I attach the adjusted ant-script.
Haiko
--
Haiko van der Schaaf
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500
j
# Build Properties
#
source = 1.5
target = 1.5
optimize = off
debug = on
#
# Libraries
#
# Fedora server
lib.fedora-server = lib/fedora-server.jar
# Log4J 1.2.15 from http://logging.apache.org/log4j
lib.log4j = lib/log4j-1.2.15.jar
# One-jar
lib.one-jar = lib/one-jar-boot-0.96.jar
# Trippi
lib.trippi = lib/trippi-1.4.1-core.jar
# OpenRDF
lib.openrdf = lib/openrdf-sesame-2.1.3-onejar.jar
lib.jrdf = lib/jrdf-0.5.5.4.jar
# Commons HTTPClient
lib.commons-httpclient = lib/commons-httpclient-3.1.jar
# Commons Logging
lib.commons-logging = lib/commons-logging.jar
lib.slf4j-api = lib/slf4j-api-1.5.6.jar
lib.slf4j-simple = lib/slf4j-simple-1.5.6.jar
#StAX
lib.stax = lib/jsr173_1.0_api.jar
lib.staxImpl=lib/sjsxp.jar
<?xml version="1.0" encoding="UTF-8"?>
<project name="fedora-utilities" default="dist" basedir=".">
<!-- defines build options and lib paths -->
<loadproperties srcFile="build.properties"/>
<!-- jars required to compile the analyzer -->
<path id="analyzer.compile.classpath">
<pathelement location="${lib.fedora-server}"/>
<pathelement location="${lib.log4j}"/>
</path>
<!-- jars required to compile the generator -->
<path id="generator.compile.classpath">
<pathelement location="${lib.fedora-server}"/>
<pathelement location="${lib.log4j}"/>
</path>
<!-- jars required to compile the transformer -->
<path id="transformer.compile.classpath">
<pathelement location="${lib.fedora-server}"/>
<pathelement location="${lib.log4j}"/>
</path>
<target name="doc">
<mkdir dir="build/doc/api"/>
<javadoc packagenames="fedora.utilities.cma.*"
sourcepath="src/java"
classpathref="analyzer.compile.classpath"
destdir="build/doc/api"
author="true"
version="true"
use="true"/>
</target>
<!-- analyzer-classes -->
<target name="analyzer-classes">
<mkdir dir="build/analyzer-classes"/>
<javac srcdir="src/java" destdir="build/analyzer-classes"
includes="fedora/utilities/cma/analyzer/**
fedora/utilities/file/**
fedora/utilities/digitalobject/**"
classpathref="analyzer.compile.classpath"
optimize="${optimize}"
debug="${debug}"
source="${source}"
target="${target}">
<compilerarg line="-Xlint:-serial -Xlint:unchecked"/>
</javac>
<copy todir="build/analyzer-classes">
<fileset dir="src/java">
<include name="**/*.properties"/>
</fileset>
</copy>
</target>
<!-- generator-classes -->
<target name="generator-classes">
<mkdir dir="build/generator-classes"/>
<javac srcdir="src/java" destdir="build/generator-classes"
includes="fedora/utilities/cma/generator/**,fedora/utilities/digitalobject/**"
classpathref="generator.compile.classpath"
optimize="${optimize}"
debug="${debug}"
source="${source}"
target="${target}">
<compilerarg line="-Xlint:-serial -Xlint:unchecked"/>
</javac>
<copy todir="build/generator-classes">
<fileset dir="src/java">
<include name="**/*.properties"/>
<include name="**/*.xslt"/>
</fileset>
</copy>
</target>
<!-- transformer-classes -->
<target name="transformer-classes">
<mkdir dir="build/transformer-classes"/>
<javac srcdir="src/java" destdir="build/transformer-classes"
includes="fedora/utilities/transformer/**,fedora/utilities/digitalobject/**"
classpathref="transformer.compile.classpath"
optimize="${optimize}"
debug="${debug}"
source="${source}"
target="${target}">
<compilerarg line="-Xlint:-serial -Xlint:unchecked"/>
</javac>
<copy todir="build/transformer-classes">
<fileset dir="src/java">
<include name="**/*.properties"/>
</fileset>
</copy>
</target>
<!-- analyzer-lib -->
<target name="analyzer-lib"
depends="analyzer-classes"
description="Build analyzer.jar in build/analyzer-lib">
<mkdir dir="build/analyzer-lib"/>
<jar jarfile="build/analyzer-lib/analyzer-lib.jar"
basedir="build/analyzer-classes">
<manifest>
<attribute name="Main-Class" value="fedora.utilities.cma.analyzer.Analyzer"/>
</manifest>
</jar>
</target>
<!-- analyzer-dist -->
<target name="analyzer-dist"
depends="analyzer-lib"
description="Build single jar executable for analyzer in dist/">
<mkdir dir="build/analyzer-dist"/>
<unjar src="${lib.one-jar}" dest="build/analyzer-dist"/>
<mkdir dir="build/analyzer-dist/main"/>
<copy file="build/analyzer-lib/analyzer-lib.jar" tofile="build/analyzer-dist/main/main.jar"/>
<mkdir dir="build/analyzer-dist/lib"/>
<copy file="${lib.log4j}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.fedora-server}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.commons-httpclient}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.commons-logging}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.slf4j-api}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.slf4j-simple}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.trippi}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.openrdf}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.jrdf}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.stax}" todir="build/analyzer-dist/lib"/>
<copy file="${lib.staxImpl}" todir="build/analyzer-dist/lib"/>
<copy file="src/config/log4j.properties" todir="build/analyzer-dist"/>
<mkdir dir="dist"/>
<jar jarfile="dist/analyzer.jar"
basedir="build/analyzer-dist">
<manifest>
<attribute name="Main-Class" value="com.simontuffs.onejar.Boot"/>
</manifest>
</jar>
</target>
<!-- generator-lib -->
<target name="generator-lib"
depends="generator-classes"
description="Build generator.jar in build/generator-lib">
<mkdir dir="build/generator-lib"/>
<jar jarfile="build/generator-lib/generator-lib.jar"
basedir="build/generator-classes">
<manifest>
<attribute name="Main-Class" value="fedora.utilities.cma.generator.Generator"/>
</manifest>
</jar>
</target>
<!-- generator-dist -->
<target name="generator-dist"
depends="generator-lib"
description="Build single jar executable for generator in dist/">
<mkdir dir="build/generator-dist"/>
<unjar src="${lib.one-jar}" dest="build/generator-dist"/>
<mkdir dir="build/generator-dist/main"/>
<copy file="build/generator-lib/generator-lib.jar" tofile="build/generator-dist/main/main.jar"/>
<mkdir dir="build/generator-dist/lib"/>
<copy file="${lib.log4j}" todir="build/generator-dist/lib"/>
<copy file="${lib.fedora-server}" todir="build/generator-dist/lib"/>
<copy file="${lib.commons-httpclient}" todir="build/generator-dist/lib"/>
<copy file="${lib.commons-logging}" todir="build/generator-dist/lib"/>
<copy file="${lib.slf4j-api}" todir="build/generator-dist/lib"/>
<copy file="${lib.slf4j-simple}" todir="build/generator-dist/lib"/>
<copy file="${lib.trippi}" todir="build/generator-dist/lib"/>
<copy file="${lib.openrdf}" todir="build/generator-dist/lib"/>
<copy file="${lib.jrdf}" todir="build/generator-dist/lib"/>
<copy file="${lib.stax}" todir="build/generator-dist/lib"/>
<copy file="${lib.staxImpl}" todir="build/generator-dist/lib"/>
<copy file="src/config/log4j.properties" todir="build/generator-dist"/>
<mkdir dir="dist"/>
<jar jarfile="dist/generator.jar"
basedir="build/generator-dist">
<manifest>
<attribute name="Main-Class" value="com.simontuffs.onejar.Boot"/>
</manifest>
</jar>
</target>
<!-- transformer-lib -->
<target name="transformer-lib"
depends="transformer-classes"
description="Build transformer.jar in build/transformer-lib">
<mkdir dir="build/transformer-lib"/>
<jar jarfile="build/transformer-lib/transformer-lib.jar"
basedir="build/transformer-classes">
<manifest>
<attribute name="Main-Class" value="fedora.utilities.transformer.Transformer"/>
</manifest>
</jar>
</target>
<!-- transformer-dist -->
<target name="transformer-dist"
depends="transformer-lib"
description="Build single jar executable for transformer in dist/">
<mkdir dir="build/transformer-dist"/>
<unjar src="${lib.one-jar}" dest="build/transformer-dist"/>
<mkdir dir="build/transformer-dist/main"/>
<copy file="build/transformer-lib/transformer-lib.jar" tofile="build/transformer-dist/main/main.jar"/>
<mkdir dir="build/transformer-dist/lib"/>
<copy file="${lib.log4j}" todir="build/transformer-dist/lib"/>
<copy file="${lib.slf4j-api}" todir="build/transformer-dist/lib"/>
<copy file="${lib.slf4j-simple}" todir="build/transformer-dist/lib"/>
<copy file="${lib.jrdf}" todir="build/transformer-dist/lib"/>
<copy file="${lib.fedora-server}" todir="build/transformer-dist/lib"/>
<copy file="${lib.commons-httpclient}" todir="build/transformer-dist/lib"/>
<copy file="${lib.commons-logging}" todir="build/transformer-dist/lib"/>
<copy file="${lib.trippi}" todir="build/transformer-dist/lib"/>
<copy file="${lib.openrdf}" todir="build/transformer-dist/lib"/>
<copy file="${lib.stax}" todir="build/transformer-dist/lib"/>
<copy file="${lib.staxImpl}" todir="build/transformer-dist/lib"/>
<copy file="src/config/log4j.properties" todir="build/transformer-dist"/>
<mkdir dir="dist"/>
<jar jarfile="dist/transformer.jar"
basedir="build/transformer-dist">
<manifest>
<attribute name="Main-Class" value="com.simontuffs.onejar.Boot"/>
</manifest>
</jar>
</target>
<!-- dist -->
<target name="dist"
depends="analyzer-dist, generator-dist, transformer-dist"
description="Build all distributable jars in dist/">
</target>
<!-- clean -->
<target name="clean"
description="Remove all build-generated files and directories">
<delete dir="build"/>
<delete dir="dist"/>
</target>
</project>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers