Ancestris Support > ENGLISH

problems reading gedcom

(1/1)

JoPol:
Hello
 
I suppose I had it working in the former GenJ development environment. But I don't manage to read a gedcom file in a stand-alone main class in Ancestris. In the Jena-upgrade thread I explain which development environment I'm using. Below how I'm trying with Ancestris installed on Windows.
 
thanks in advance for helping out again
 

--- Code: --->echo %CLASSPATH%
;C:\Users\XXX\Appdata\Roaming\.ancestris\trunk\modules\genjreports-rdf.jar;C:\Users\XXX\Appdata\Roaming\.ancestris\trunk\modules\docs\genjreports-rdf.jar;C:\Users\XXX\Appdata\Roaming\.ancestris\trunk\modules\ext\*;C:\Users\XXX\Documents\ancestris-20121002\ancestris\ancestris\modules\ancestris-core.jar;C:\Users\XXX\Documents\ancestris-20121002\ancestris\ancestris\modules\ancestris-libs-genj.jar;C:\Users\XXX\Documents\ancestris-20121002\ancestris\platform\lib\*
>java  -Xmx1024M -Dlog4j.configuration=file:log4j.properties -Dnetbeans.user.dir=C:\Users\XXX\Documents\ancestris-20121002\ancestris\bin -Dnetbeans.home=C:\Users\XXX\Documents\ancestris-20121002\ancestris\platform -Dnetbeans.user=C:\Users\XXX\Appdata\Roaming\.ancestris\trunk -Dnetbeans.dirs=C:\Users\XXX\Documents\ancestris-20121002\ancestris\ancestris genjreports.rdf.gedsem.Convert -gedcom C:\Users\XXX\Documents\ancestris-20121002\ancestris\ancestris\exemples\gen-kennedy\kennedy.ged -uri http://my.domain.com/gedcom/ -format ttl   1>gedcom.ttl
Exception in thread "main" genj.io.GedcomIOException: java.lang.NullPointerException
        at genj.io.GedcomReaderFactory$Impl.read(GedcomReaderFactory.java:195)
        at genjreports.rdf.gedsem.Convert.readGedcom(Convert.java:155)
        at genjreports.rdf.gedsem.Convert.main(Convert.java:58)

--- End code ---
The log4j.properties can be found here:
http://arvernes.dyndns.org/fgenj/trunk/AncestrisExtensions/report.rdf/javahelp/genjreports/rdf/docs/mashup/

JoPol:
I pinned down the problem to files. The command line conversion works fine when I save the gedcom file using the property filter by excluding the FILE tag.

Specifying the full path did not help. Any suggestions or a fix?

Daniel:
Hello Jo,

In your Convert class, can you replace th call to
GedcomReaderFactory.createReader(new FileInputStream(file),...)
by something like
GedcomReaderFactory.createReader(Origine.create(file.toURI().toURL()),...)

Daniel


JoPol:
At least I did not break the build. But I seem to need corrections for the CLASSPATH and/or JAVA_OPTS for the desired batch execution. I don't understand what.

I tried it with http://anonymous:password@arvernes.dyndns.org/fgenj/trunk/AncestrisExtensions/report.rdf/javahelp/genjreports/rdf/docs/mashup/reports.bat
you would have to adjust line 7,8 and 35 and will get the following error on line 45

Exception in thread "main" java.lang.NoClassDefFoundError: org/openide/filesystems/FileStateInvalidException
        at genjreports.rdf.gedsem.Convert.readGedcom(Convert.java:194)
        at genjreports.rdf.gedsem.Convert.main(Convert.java:76)
Caused by: java.lang.ClassNotFoundException: org.openide.filesystems.FileStateInvalidException
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 2 more

PS: see also http://anonymous:password@arvernes.dyndns.org/fgenj/trunk/AncestrisExtensions/report.rdf/javahelp/genjreports/rdf/docs/rdf-mashup.html#batches

JoPol:
Please ignore this request for help. I'm moving the batch commands to http://gedcom2sem.googlecode.com and switched to gedcom4j for parsing. That way I can help myself much better.

Navigation

[0] Message Index

Go to full version