com.yourmediashelf.fedora.client.FedoraClientException: unexpected element (uri:"", local:"objectDatastreams"). Expected elements are <{http://www.fedora.info/definitions/1/0/access/}OAI-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}OAI-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}OAI-sample>,<{http://www.fedora.info/definitions/1/0/access/}PID-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}PID-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}PID-sample>,<{http://www.fedora.info/definitions/1/0/access/}adminEmail>,<{http://www.fedora.info/definitions/1/0/access/}fedoraObjectHistory>,<{http://www.fedora.info/definitions/1/0/access/}fedoraRepository>,<{http://www.fedora.info/definitions/1/0/access/}objCreateDate>,<{http://www.fedora.info/definitions/1/0/access/}objDissIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objItemIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objLabel>,<{http://www.fedora.info/definitions/1/0/access/}objLastModDate>,<{http://www.fedora.info/definitions/1/0/access/}objModels>,<{http://www.fedora.info/definitions/1/0/access/}objOwnerId>,<{http://www.fedora.info/definitions/1/0/access/}objState>,<{http://www.fedora.info/definitions/1/0/access/}objectDatastreams>,<{http://www.fedora.info/definitions/1/0/access/}objectMethods>,<{http://www.fedora.info/definitions/1/0/access/}objectProfile>,<{http://www.fedora.info/definitions/1/0/access/}repositoryBaseURL>,<{http://www.fedora.info/definitions/1/0/access/}repositoryName>,<{http://www.fedora.info/definitions/1/0/access/}repositoryOAI-identifier>,<{http://www.fedora.info/definitions/1/0/access/}repositoryPID>,<{http://www.fedora.info/definitions/1/0/access/}repositoryVersion>,<{http://www.fedora.info/definitions/1/0/access/}retainPID>,<{http://www.fedora.info/definitions/1/0/access/}sampleAccess-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleOAI-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleSearch-URL>

Sakai JIRA | Frank Feng | 6 years ago
  1. 0

    We've been using Mediashelf client APIs in our repository. All methods we use are working properly except listDatastreams, which throws an exception as attached below. The test code I'm using is: ... ListDatastreamsResponse response = listDatastreams("york:3").execute(client); for(DatastreamType dst: response.getDatastreams()) { System.out.println(dst.getDsid()); } Thanks, Frank Digital Library Systems Developer The University of York ------------------------------------------------------ P.S. The error message is: Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.45 sec <<< FAILURE! testListDatastreams(uk.ac.york.dlib.yodl.utils.fedora.ds.TestMediaShelfFedoraClient) Time elapsed: 0.193 sec <<< ERROR! com.yourmediashelf.fedora.client.FedoraClientException: unexpected element (uri:"", local:"objectDatastreams"). Expected elements are <{http://www.fedora.info/definitions/1/0/access/}OAI-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}OAI-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}OAI-sample>,<{http://www.fedora.info/definitions/1/0/access/}PID-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}PID-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}PID-sample>,<{http://www.fedora.info/definitions/1/0/access/}adminEmail>,<{http://www.fedora.info/definitions/1/0/access/}fedoraObjectHistory>,<{http://www.fedora.info/definitions/1/0/access/}fedoraRepository>,<{http://www.fedora.info/definitions/1/0/access/}objCreateDate>,<{http://www.fedora.info/definitions/1/0/access/}objDissIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objItemIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objLabel>,<{http://www.fedora.info/definitions/1/0/access/}objLastModDate>,<{http://www.fedora.info/definitions/1/0/access/}objModels>,<{http://www.fedora.info/definitions/1/0/access/}objOwnerId>,<{http://www.fedora.info/definitions/1/0/access/}objState>,<{http://www.fedora.info/definitions/1/0/access/}objectDatastreams>,<{http://www.fedora.info/definitions/1/0/access/}objectMethods>,<{http://www.fedora.info/definitions/1/0/access/}objectProfile>,<{http://www.fedora.info/definitions/1/0/access/}repositoryBaseURL>,<{http://www.fedora.info/definitions/1/0/access/}repositoryName>,<{http://www.fedora.info/definitions/1/0/access/}repositoryOAI-identifier>,<{http://www.fedora.info/definitions/1/0/access/}repositoryPID>,<{http://www.fedora.info/definitions/1/0/access/}repositoryVersion>,<{http://www.fedora.info/definitions/1/0/access/}retainPID>,<{http://www.fedora.info/definitions/1/0/access/}sampleAccess-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleOAI-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleSearch-URL> at com.yourmediashelf.fedora.client.response.ListDatastreamsResponse.getObjectDatastreams(ListDatastreamsResponse.java:105) at com.yourmediashelf.fedora.client.response.ListDatastreamsResponse.getDatastreams(ListDatastreamsResponse.java:63) at uk.ac.york.dlib.yodl.utils.fedora.ds.TestMediaShelfFedoraClient.testListDatastreams(TestMediaShelfFedoraClient.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"objectDatastreams"). Expected elements are <{http://www.fedora.info/definitions/1/0/access/}OAI-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}OAI-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}OAI-sample>,<{http://www.fedora.info/definitions/1/0/access/}PID-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}PID-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}PID-sample>,<{http://www.fedora.info/definitions/1/0/access/}adminEmail>,<{http://www.fedora.info/definitions/1/0/access/}fedoraObjectHistory>,<{http://www.fedora.info/definitions/1/0/access/}fedoraRepository>,<{http://www.fedora.info/definitions/1/0/access/}objCreateDate>,<{http://www.fedora.info/definitions/1/0/access/}objDissIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objItemIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objLabel>,<{http://www.fedora.info/definitions/1/0/access/}objLastModDate>,<{http://www.fedora.info/definitions/1/0/access/}objModels>,<{http://www.fedora.info/definitions/1/0/access/}objOwnerId>,<{http://www.fedora.info/definitions/1/0/access/}objState>,<{http://www.fedora.info/definitions/1/0/access/}objectDatastreams>,<{http://www.fedora.info/definitions/1/0/access/}objectMethods>,<{http://www.fedora.info/definitions/1/0/access/}objectProfile>,<{http://www.fedora.info/definitions/1/0/access/}repositoryBaseURL>,<{http://www.fedora.info/definitions/1/0/access/}repositoryName>,<{http://www.fedora.info/definitions/1/0/access/}repositoryOAI-identifier>,<{http://www.fedora.info/definitions/1/0/access/}repositoryPID>,<{http://www.fedora.info/definitions/1/0/access/}repositoryVersion>,<{http://www.fedora.info/definitions/1/0/access/}retainPID>,<{http://www.fedora.info/definitions/1/0/access/}sampleAccess-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleOAI-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleSearch-URL> at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:631) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:236) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:231) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:105) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1038) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:467) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:448) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:137) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:200) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:173) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:194) at com.yourmediashelf.fedora.client.response.ListDatastreamsResponse.getObjectDatastreams(ListDatastreamsResponse.java:101) ... 30 more

    Sakai JIRA | 6 years ago | Frank Feng
    com.yourmediashelf.fedora.client.FedoraClientException: unexpected element (uri:"", local:"objectDatastreams"). Expected elements are <{http://www.fedora.info/definitions/1/0/access/}OAI-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}OAI-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}OAI-sample>,<{http://www.fedora.info/definitions/1/0/access/}PID-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}PID-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}PID-sample>,<{http://www.fedora.info/definitions/1/0/access/}adminEmail>,<{http://www.fedora.info/definitions/1/0/access/}fedoraObjectHistory>,<{http://www.fedora.info/definitions/1/0/access/}fedoraRepository>,<{http://www.fedora.info/definitions/1/0/access/}objCreateDate>,<{http://www.fedora.info/definitions/1/0/access/}objDissIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objItemIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objLabel>,<{http://www.fedora.info/definitions/1/0/access/}objLastModDate>,<{http://www.fedora.info/definitions/1/0/access/}objModels>,<{http://www.fedora.info/definitions/1/0/access/}objOwnerId>,<{http://www.fedora.info/definitions/1/0/access/}objState>,<{http://www.fedora.info/definitions/1/0/access/}objectDatastreams>,<{http://www.fedora.info/definitions/1/0/access/}objectMethods>,<{http://www.fedora.info/definitions/1/0/access/}objectProfile>,<{http://www.fedora.info/definitions/1/0/access/}repositoryBaseURL>,<{http://www.fedora.info/definitions/1/0/access/}repositoryName>,<{http://www.fedora.info/definitions/1/0/access/}repositoryOAI-identifier>,<{http://www.fedora.info/definitions/1/0/access/}repositoryPID>,<{http://www.fedora.info/definitions/1/0/access/}repositoryVersion>,<{http://www.fedora.info/definitions/1/0/access/}retainPID>,<{http://www.fedora.info/definitions/1/0/access/}sampleAccess-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleOAI-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleSearch-URL>
  2. 0

    We've been using Mediashelf client APIs in our repository. All methods we use are working properly except listDatastreams, which throws an exception as attached below. The test code I'm using is: ... ListDatastreamsResponse response = listDatastreams("york:3").execute(client); for(DatastreamType dst: response.getDatastreams()) { System.out.println(dst.getDsid()); } Thanks, Frank Digital Library Systems Developer The University of York ------------------------------------------------------ P.S. The error message is: Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.45 sec <<< FAILURE! testListDatastreams(uk.ac.york.dlib.yodl.utils.fedora.ds.TestMediaShelfFedoraClient) Time elapsed: 0.193 sec <<< ERROR! com.yourmediashelf.fedora.client.FedoraClientException: unexpected element (uri:"", local:"objectDatastreams"). Expected elements are <{http://www.fedora.info/definitions/1/0/access/}OAI-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}OAI-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}OAI-sample>,<{http://www.fedora.info/definitions/1/0/access/}PID-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}PID-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}PID-sample>,<{http://www.fedora.info/definitions/1/0/access/}adminEmail>,<{http://www.fedora.info/definitions/1/0/access/}fedoraObjectHistory>,<{http://www.fedora.info/definitions/1/0/access/}fedoraRepository>,<{http://www.fedora.info/definitions/1/0/access/}objCreateDate>,<{http://www.fedora.info/definitions/1/0/access/}objDissIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objItemIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objLabel>,<{http://www.fedora.info/definitions/1/0/access/}objLastModDate>,<{http://www.fedora.info/definitions/1/0/access/}objModels>,<{http://www.fedora.info/definitions/1/0/access/}objOwnerId>,<{http://www.fedora.info/definitions/1/0/access/}objState>,<{http://www.fedora.info/definitions/1/0/access/}objectDatastreams>,<{http://www.fedora.info/definitions/1/0/access/}objectMethods>,<{http://www.fedora.info/definitions/1/0/access/}objectProfile>,<{http://www.fedora.info/definitions/1/0/access/}repositoryBaseURL>,<{http://www.fedora.info/definitions/1/0/access/}repositoryName>,<{http://www.fedora.info/definitions/1/0/access/}repositoryOAI-identifier>,<{http://www.fedora.info/definitions/1/0/access/}repositoryPID>,<{http://www.fedora.info/definitions/1/0/access/}repositoryVersion>,<{http://www.fedora.info/definitions/1/0/access/}retainPID>,<{http://www.fedora.info/definitions/1/0/access/}sampleAccess-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleOAI-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleSearch-URL> at com.yourmediashelf.fedora.client.response.ListDatastreamsResponse.getObjectDatastreams(ListDatastreamsResponse.java:105) at com.yourmediashelf.fedora.client.response.ListDatastreamsResponse.getDatastreams(ListDatastreamsResponse.java:63) at uk.ac.york.dlib.yodl.utils.fedora.ds.TestMediaShelfFedoraClient.testListDatastreams(TestMediaShelfFedoraClient.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"objectDatastreams"). Expected elements are <{http://www.fedora.info/definitions/1/0/access/}OAI-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}OAI-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}OAI-sample>,<{http://www.fedora.info/definitions/1/0/access/}PID-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}PID-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}PID-sample>,<{http://www.fedora.info/definitions/1/0/access/}adminEmail>,<{http://www.fedora.info/definitions/1/0/access/}fedoraObjectHistory>,<{http://www.fedora.info/definitions/1/0/access/}fedoraRepository>,<{http://www.fedora.info/definitions/1/0/access/}objCreateDate>,<{http://www.fedora.info/definitions/1/0/access/}objDissIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objItemIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objLabel>,<{http://www.fedora.info/definitions/1/0/access/}objLastModDate>,<{http://www.fedora.info/definitions/1/0/access/}objModels>,<{http://www.fedora.info/definitions/1/0/access/}objOwnerId>,<{http://www.fedora.info/definitions/1/0/access/}objState>,<{http://www.fedora.info/definitions/1/0/access/}objectDatastreams>,<{http://www.fedora.info/definitions/1/0/access/}objectMethods>,<{http://www.fedora.info/definitions/1/0/access/}objectProfile>,<{http://www.fedora.info/definitions/1/0/access/}repositoryBaseURL>,<{http://www.fedora.info/definitions/1/0/access/}repositoryName>,<{http://www.fedora.info/definitions/1/0/access/}repositoryOAI-identifier>,<{http://www.fedora.info/definitions/1/0/access/}repositoryPID>,<{http://www.fedora.info/definitions/1/0/access/}repositoryVersion>,<{http://www.fedora.info/definitions/1/0/access/}retainPID>,<{http://www.fedora.info/definitions/1/0/access/}sampleAccess-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleOAI-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleSearch-URL> at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:631) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:236) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:231) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:105) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1038) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:467) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:448) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:137) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:200) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:173) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:194) at com.yourmediashelf.fedora.client.response.ListDatastreamsResponse.getObjectDatastreams(ListDatastreamsResponse.java:101) ... 30 more

    Sakai JIRA | 6 years ago | Frank Feng
    com.yourmediashelf.fedora.client.FedoraClientException: unexpected element (uri:"", local:"objectDatastreams"). Expected elements are <{http://www.fedora.info/definitions/1/0/access/}OAI-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}OAI-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}OAI-sample>,<{http://www.fedora.info/definitions/1/0/access/}PID-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}PID-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}PID-sample>,<{http://www.fedora.info/definitions/1/0/access/}adminEmail>,<{http://www.fedora.info/definitions/1/0/access/}fedoraObjectHistory>,<{http://www.fedora.info/definitions/1/0/access/}fedoraRepository>,<{http://www.fedora.info/definitions/1/0/access/}objCreateDate>,<{http://www.fedora.info/definitions/1/0/access/}objDissIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objItemIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objLabel>,<{http://www.fedora.info/definitions/1/0/access/}objLastModDate>,<{http://www.fedora.info/definitions/1/0/access/}objModels>,<{http://www.fedora.info/definitions/1/0/access/}objOwnerId>,<{http://www.fedora.info/definitions/1/0/access/}objState>,<{http://www.fedora.info/definitions/1/0/access/}objectDatastreams>,<{http://www.fedora.info/definitions/1/0/access/}objectMethods>,<{http://www.fedora.info/definitions/1/0/access/}objectProfile>,<{http://www.fedora.info/definitions/1/0/access/}repositoryBaseURL>,<{http://www.fedora.info/definitions/1/0/access/}repositoryName>,<{http://www.fedora.info/definitions/1/0/access/}repositoryOAI-identifier>,<{http://www.fedora.info/definitions/1/0/access/}repositoryPID>,<{http://www.fedora.info/definitions/1/0/access/}repositoryVersion>,<{http://www.fedora.info/definitions/1/0/access/}retainPID>,<{http://www.fedora.info/definitions/1/0/access/}sampleAccess-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleOAI-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleSearch-URL>
  3. 0

    How to unmarshal simple XML with single element and value

    Stack Overflow | 3 years ago | trf
    org.springframework.http.converter.HttpMessageNotReadableException: Could not unmarshal to [class za.co.example.server.finance.ExchangeRateWebServiceResponse]: unexpected element (uri:"http://www.example.com/", local:"double"). Expected elements are &lt;{}exchangeRateWebServiceResponse&gt;; nested exception is javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.example.com/", local:"double"). Expected elements are &lt;{}exchangeRateWebServiceResponse&gt;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    XML (with namespace) to Object unmarshalling

    Stack Overflow | 4 years ago | Nagendra Busam
    javax.xml.bind.UnmarshalException: unexpected element (uri:"UIS_CTMPeople_WS", local:"QueryByLNeResponse"). Expected elements are (none)
  6. 0

    Programatically add or set JAXB XmlRootElement

    Stack Overflow | 2 years ago | user23123412
    javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"report"). Expected elements are (none)

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.xml.bind.UnmarshalException

      unexpected element (uri:"", local:"objectDatastreams"). Expected elements are <{http://www.fedora.info/definitions/1/0/access/}OAI-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}OAI-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}OAI-sample>,<{http://www.fedora.info/definitions/1/0/access/}PID-delimiter>,<{http://www.fedora.info/definitions/1/0/access/}PID-namespaceIdentifier>,<{http://www.fedora.info/definitions/1/0/access/}PID-sample>,<{http://www.fedora.info/definitions/1/0/access/}adminEmail>,<{http://www.fedora.info/definitions/1/0/access/}fedoraObjectHistory>,<{http://www.fedora.info/definitions/1/0/access/}fedoraRepository>,<{http://www.fedora.info/definitions/1/0/access/}objCreateDate>,<{http://www.fedora.info/definitions/1/0/access/}objDissIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objItemIndexViewURL>,<{http://www.fedora.info/definitions/1/0/access/}objLabel>,<{http://www.fedora.info/definitions/1/0/access/}objLastModDate>,<{http://www.fedora.info/definitions/1/0/access/}objModels>,<{http://www.fedora.info/definitions/1/0/access/}objOwnerId>,<{http://www.fedora.info/definitions/1/0/access/}objState>,<{http://www.fedora.info/definitions/1/0/access/}objectDatastreams>,<{http://www.fedora.info/definitions/1/0/access/}objectMethods>,<{http://www.fedora.info/definitions/1/0/access/}objectProfile>,<{http://www.fedora.info/definitions/1/0/access/}repositoryBaseURL>,<{http://www.fedora.info/definitions/1/0/access/}repositoryName>,<{http://www.fedora.info/definitions/1/0/access/}repositoryOAI-identifier>,<{http://www.fedora.info/definitions/1/0/access/}repositoryPID>,<{http://www.fedora.info/definitions/1/0/access/}repositoryVersion>,<{http://www.fedora.info/definitions/1/0/access/}retainPID>,<{http://www.fedora.info/definitions/1/0/access/}sampleAccess-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleOAI-URL>,<{http://www.fedora.info/definitions/1/0/access/}sampleSearch-URL>

      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent()
    2. Java RT
      SAXConnector.startElement
      1. com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:631)
      2. com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:236)
      3. com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:231)
      4. com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:105)
      5. com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1038)
      6. com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:467)
      7. com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:448)
      8. com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:137)
      8 frames
    3. Xerces2-j
      AbstractSAXParser.parse
      1. org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
      2. org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
      3. org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
      4. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      5. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      6. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      7. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      8. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      9. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      9 frames
    4. Java RT
      AbstractUnmarshallerImpl.unmarshal
      1. com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:200)
      2. com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:173)
      3. javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
      4. javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:194)
      4 frames
    5. com.yourmediashelf.fedora
      ListDatastreamsResponse.getDatastreams
      1. com.yourmediashelf.fedora.client.response.ListDatastreamsResponse.getObjectDatastreams(ListDatastreamsResponse.java:101)
      2. com.yourmediashelf.fedora.client.response.ListDatastreamsResponse.getDatastreams(ListDatastreamsResponse.java:63)
      2 frames
    6. uk.ac.york
      TestMediaShelfFedoraClient.testListDatastreams
      1. uk.ac.york.dlib.yodl.utils.fedora.ds.TestMediaShelfFedoraClient.testListDatastreams(TestMediaShelfFedoraClient.java:109)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    8. JUnit
      ParentRunner.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      8. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      9. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      10. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      11. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      12. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      13. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      14. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      14 frames
    9. JUnit4 Provider
      JUnit4TestSet.execute
      1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
      1 frame
    10. SureFire
      Surefire.run
      1. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
      2. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
      3. org.apache.maven.surefire.Surefire.run(Surefire.java:177)
      3 frames
    11. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    12. SureFire
      SurefireBooter.main
      1. org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
      2. org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      2 frames