joniles / mpxj

Primary repository for MPXJ library
http://www.mpxj.org/
GNU Lesser General Public License v2.1
250 stars 104 forks source link

P6 .xer file cannot be opened by latest MPXJ (7.5.0) #52

Closed jhoareau closed 6 years ago

jhoareau commented 6 years ago

Hello,

Parsing this basic .xer file (found in simple.xer.zip) using MPXJ leads to an exception:

Reading input file started.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
    at net.sf.mpxj.primavera.DatatypeConverter.parseUUID(DatatypeConverter.java:59)
    at net.sf.mpxj.primavera.MapRow.getUUID(MapRow.java:156)
    at net.sf.mpxj.primavera.PrimaveraReader.processFields(PrimaveraReader.java:1438)
    at net.sf.mpxj.primavera.PrimaveraReader.processTasks(PrimaveraReader.java:656)
    at net.sf.mpxj.primavera.PrimaveraXERFileReader.processTasks(PrimaveraXERFileReader.java:497)
    at net.sf.mpxj.primavera.PrimaveraXERFileReader.read(PrimaveraXERFileReader.java:130)
    at net.sf.mpxj.reader.UniversalProjectReader.readProjectFile(UniversalProjectReader.java:340)
    at net.sf.mpxj.reader.UniversalProjectReader.read(UniversalProjectReader.java:234)
    at net.sf.mpxj.reader.UniversalProjectReader.read(UniversalProjectReader.java:139)
    at net.sf.mpxj.reader.UniversalProjectReader.read(UniversalProjectReader.java:120)
    at net.sf.mpxj.sample.MpxjConvert.readFile(MpxjConvert.java:106)
    at net.sf.mpxj.sample.MpxjConvert.process(MpxjConvert.java:84)
    at net.sf.mpxj.sample.MpxjConvert.main(MpxjConvert.java:57)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
    ... 13 more

The file only contains one task.

jhoareau commented 6 years ago

It seems that it works on another machine. Maybe my Java configuration is wrong somewhere. I'll close the issue.