Closed muren400 closed 1 year ago
Ok, I think I found a solution:
When reading the project.bcfp in BcfFile.java (line 124) one should use ProjectExtension instead of Project.
JAXBContext jaxbContext = JAXBContext.newInstance(ProjectExtension.class);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
ProjectExtension extension = (ProjectExtension) unmarshaller.unmarshal(new FakeClosingInputStream(zipInputStream));
project = extension.getProject();
And the same for write(OutputStream).
Hi,
when reading a .bcfzip file containig a project.bcfp file I get following exception. I can't figure out, what I'm doing wrong.
org.opensourcebim.bcf.BcfException: javax.xml.bind.UnmarshalException: unerwartetes Element (URI:"", lokal:"ProjectExtension"). Erwartete Elemente sind <{}project> at org.opensourcebim.bcf.BcfFile.readInternal(BcfFile.java:113) at org.opensourcebim.bcf.BcfFile.read(BcfFile.java:148) at org.opensourcebim.bcf.BcfFile.read(BcfFile.java:59)
The exception occurs on this example: (I renamed it to .zip so i can upload it) test2.bcf.zip