Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServiceProvider.listRecords(..) throws NoSuchElementException #57

Open
Abdull opened this issue Oct 26, 2015 · 0 comments
Open

ServiceProvider.listRecords(..) throws NoSuchElementException #57

Abdull opened this issue Oct 26, 2015 · 0 comments

Comments

@Abdull
Copy link

Abdull commented Oct 26, 2015

Provoking test case:

    @Test
    public void listRecords() throws NoSetHierarchyException, BadArgumentException, HttpException {
        OAIClient oaiClient = new HttpOAIClient("http://www.ssoar.info/OAIHandler/request");

         Context context = new Context()
                .withOAIClient(oaiClient)
                .withMetadataTransformer( "xoai", identity() );

         ServiceProvider ssoarOaiPmhEndpoint = new ServiceProvider(context);

         ListRecordsParameters parameters = new ListRecordsParameters();
         parameters.withMetadataPrefix("xoai");
         ssoarOaiPmhEndpoint.listRecords(parameters);
    }

Log (truncated to last lines. Notice that HTTPClient's Wire class does not output a full tag on the last line):

...
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,933]  << "[\r][\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,933]  << "1c4[\r][\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,933]  << "me="identifier">oai:gesis.izsoz.de:679</field>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,934]  << "        <field name="lastModifyDate">2012-08-29 23:40:31.76</field>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,934]  << "    </element>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,934]  << "    <element name="repository">[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,934]  << "        <field name="name">SSOAR - Social Science Open Access Repository</field>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,934]  << "        <field name="mail">[email protected]</field>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,934]  << "    </element>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,934]  << "</metadata>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,935]  << "</metadata>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,935]  << "        </record>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,935]  << "        <record>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,935]  << "            <header>[\n]"
DEBUG [main o.a.http.wire o.a.h.i.c.Wire 2015-10-26 17:53:14,935]  << "                <identifier>oai:gesis.izsoz.de:1542</identifie"

Failure stacktrace:

    at org.codehaus.stax2.ri.Stax2EventReaderImpl.throwEndOfInput(Stax2EventReaderImpl.java:453)
    at org.codehaus.stax2.ri.Stax2EventReaderImpl.nextEvent(Stax2EventReaderImpl.java:242)
    at com.lyncode.xml.XmlReader.next(XmlReader.java:134)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:42)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parseElement(MetadataParser.java:43)
    at org.dspace.xoai.serviceprovider.parsers.MetadataParser.parse(MetadataParser.java:34)
    at org.dspace.xoai.serviceprovider.parsers.RecordParser.parse(RecordParser.java:56)
    at org.dspace.xoai.serviceprovider.parsers.ListRecordsParser.next(ListRecordsParser.java:60)
    at org.dspace.xoai.serviceprovider.handler.ListRecordHandler.nextIteration(ListRecordHandler.java:70)
    at org.dspace.xoai.serviceprovider.lazy.ItemIterator.hasNext(ItemIterator.java:32)
    at org.dspace.xoai.serviceprovider.lazy.ItemIterator.<init>(ItemIterator.java:22)
    at org.dspace.xoai.serviceprovider.ServiceProvider.listRecords(ServiceProvider.java:57)
    at org.gesis.dda.harvester.harvesting.xoai.XoaiTest.listRecords(XoaiTest.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant