Hi

I am experimenting with fedora-client-0.1.3.jar accessing fedora repository 
version 3.4.2.

When using a method that operates on the xml returned by FedoraResponse 
interface, like

GetObjectProfileResponse objectProfile = new 
GetObjectProfile("demo:3").execute(fedora);
            String id = objectProfile.getOwnerId();
            System.out.println(id);

I get the following error message:

Exception in thread "main" 
com.yourmediashelf.fedora.client.FedoraClientException
      at 
com.yourmediashelf.fedora.client.response.GetObjectProfileResponse.getObjectProfile(GetObjectProfileResponse.java:101)
      at 
com.yourmediashelf.fedora.client.response.GetObjectProfileResponse.getOwnerId(GetObjectProfileResponse.java:74)
      at fedoraClientExample.testfunction.main(testfunction.java:52)
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException: Premature end of file.]
      at 
javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(Unknown
 Source)
      at 
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(Unknown
 Source)
      at 
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown
 Source)
      at 
com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown
 Source)
      at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown 
Source)
      at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown 
Source)
      at 
com.yourmediashelf.fedora.client.response.GetObjectProfileResponse.getObjectProfile(GetObjectProfileResponse.java:97)
      ... 2 more
Caused by: org.xml.sax.SAXParseException: Premature end of file.
      at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown
 Source)
      at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown 
Source)
      at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown 
Source)
      at 
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown 
Source)
      at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown
 Source)
      at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown 
Source)
      at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown 
Source)
      at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
      at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
      at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown 
Source)
      at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
      at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
 Source)
      ... 7 more

Whereas e.g.

IngestResponse response = new Ingest("test:pid").label("foo").execute(fedora);
            URI link = response.getLocation();
            System.out.println(link);

works fine...

Please let me know if you have an idea how to fix  this.

Thanks,

Daniel

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to