Author Topic: problems reading gedcom  (Read 6421 times)

0 Members and 1 Guest are viewing this topic.

Offline JoPol

  • VIP
  • Sr. Member
  • *
  • Posts: 28
    • View Profile
problems reading gedcom
« on: November 14, 2012, 12:12:36 »
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: [Select]
>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)
The log4j.properties can be found here:
http://arvernes.dyndns.org/fgenj/trunk/AncestrisExtensions/report.rdf/javahelp/genjreports/rdf/docs/mashup/

Offline JoPol

  • VIP
  • Sr. Member
  • *
  • Posts: 28
    • View Profile
Re: problems reading gedcom
« Reply #1 on: January 03, 2013, 19:54:02 »
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?

Offline Daniel

  • Administrator
  • Sr. Member
  • *****
  • Posts: 44
    • View Profile
ReĀ : problems reading gedcom
« Reply #2 on: January 05, 2013, 00:15:40 »
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



Offline JoPol

  • VIP
  • Sr. Member
  • *
  • Posts: 28
    • View Profile
Re: problems reading gedcom
« Reply #3 on: January 06, 2013, 11:59:54 »
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
« Last Edit: January 06, 2013, 16:15:58 by JoPol »

Offline JoPol

  • VIP
  • Sr. Member
  • *
  • Posts: 28
    • View Profile
Re: problems reading gedcom
« Reply #4 on: January 13, 2013, 18:18:05 »
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.