Still struggling with this. I thought I'd try submitting to demo.dspace.org;
I get a 500 Internal Server Error, although the item is deposited.

curl -v -i --data-binary "@Downloads/Singh_2009.pdf" -H
"Content-Disposition:attachment; filename=Singh_2009.pdf" -H
"Content-Type:application/pdf" -H "Packaging:
http://purl.org/net/sword/package/Binary"; -u dspacedemo+sub...@gmail.com:dspace
-X POST http://demo.dspace.org/swordv2/collection/10673/2
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 50.17.201.82...
* Connected to demo.dspace.org (50.17.201.82) port 80 (#0)
* Server auth using Basic with user 'dspacedemo+sub...@gmail.com'
> POST /swordv2/collection/10673/2 HTTP/1.1
> Host: demo.dspace.org
> Authorization: Basic ZHNwYWNlZGVtbytzdWJtaXRAZ21haWwuY29tOmRzcGFjZQ==
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Disposition:attachment; filename=Singh_2009.pdf
> Content-Type:application/pdf
> Packaging:http://purl.org/net/sword/package/Binary
> Content-Length: 1413724
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
HTTP/1.1 100 Continue

* We are completely uploaded and fine
< HTTP/1.1 500 Internal Server Error
HTTP/1.1 500 Internal Server Error
< Date: Fri, 15 Mar 2019 06:25:58 GMT
Date: Fri, 15 Mar 2019 06:25:58 GMT
< Server: Apache/2.4.18 (Ubuntu)
Server: Apache/2.4.18 (Ubuntu)
< Content-Type: text/html;charset=utf-8
Content-Type: text/html;charset=utf-8
< Content-Language: en
Content-Language: en
< Content-Length: 3522
Content-Length: 3522
< Connection: close
Connection: close

<
<html><head><title>Apache Tomcat/7.0.68 (Ubuntu) - Error
report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 500 - Servlet execution threw an
exception</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception
report</p><p><b>message</b> <u>Servlet execution threw an
exception</u></p><p><b>description</b> <u>The server encountered an
internal error that prevented it from fulfilling this
request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException:
Servlet execution threw an exception
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
</pre></p><p><b>root cause</b> <pre>java.lang.NoClassDefFoundError: Could
not initialize class org.apache.jena.riot.system.RiotLib
    org.apache.jena.riot.RiotReader.createParserTurtle(RiotReader.java:344)
    org.apache.jena.riot.RiotReader.createParser(RiotReader.java:173)
    org.apache.jena.riot.RiotReader.createParser(RiotReader.java:141)

org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:180)
    org.apache.jena.riot.RDFDataMgr.process(RDFDataMgr.java:906)
    org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:257)
    org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:243)
    org.apache.jena.riot.adapters.RDFReaderRIOT.read(RDFReaderRIOT.java:70)
    com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:226)

org.dspace.rdf.conversion.SimpleDSORelationsConverterPlugin.getPrefixes(SimpleDSORelationsConverterPlugin.java:86)

org.dspace.rdf.conversion.SimpleDSORelationsConverterPlugin.convertItem(SimpleDSORelationsConverterPlugin.java:454)

org.dspace.rdf.conversion.SimpleDSORelationsConverterPlugin.convert(SimpleDSORelationsConverterPlugin.java:130)

org.dspace.rdf.conversion.RDFConverterImpl.convert(RDFConverterImpl.java:78)
    org.dspace.rdf.RDFUtil.convert(RDFUtil.java:203)
    org.dspace.rdf.RDFUtil.convertAndStore(RDFUtil.java:239)
    org.dspace.rdf.RDFConsumer.convert(RDFConsumer.java:387)
    org.dspace.rdf.RDFConsumer.end(RDFConsumer.java:347)
    org.dspace.event.BasicDispatcher.dispatch(BasicDispatcher.java:149)
    org.dspace.core.Context.dispatchEvents(Context.java:455)
    org.dspace.core.Context.commit(Context.java:424)
    org.dspace.core.Context.complete(Context.java:380)
    org.dspace.sword2.SwordContext.commit(SwordContext.java:172)

org.dspace.sword2.CollectionDepositManagerDSpace.createNew(CollectionDepositManagerDSpace.java:170)
    org.swordapp.server.CollectionAPI.post(CollectionAPI.java:165)

org.swordapp.server.servlets.CollectionServletDefault.doPost(CollectionServletDefault.java:48)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
* Closing connection 0
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is
available in the Apache Tomcat/7.0.68 (Ubuntu) logs.</u></p><HR size="1"
noshade="noshade"><h3>Apache Tomcat/7.0.68 (Ubuntu)</h3></body></html>

So I tried submitting to https://test.dspace-cris.4science.it. This results
in a 405: HTTP method GET is not supported by this URL.

curl -v -i --data-binary "@Downloads/Singh_2009.pdf" -H
"Content-Disposition:attachment; filename=Singh_2009.pdf" -H
"Content-Type:application/pdf" -H "Packaging:
http://purl.org/net/sword/package/Binary"; -u
dspacecris-u...@mailinator.com:dspacecris-user
-X POST https://test.dspace-cris.4science.it/handle/123456789/6
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 34.249.45.66...
* Connected to test.dspace-cris.4science.it (34.249.45.66) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 597 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
*      server certificate verification OK
*      server certificate status verification SKIPPED
*      common name: test.dspace-cris.4science.it (matched)
*      server certificate expiration date OK
*      server certificate activation date OK
*      certificate public key: RSA
*      certificate version: #3
*      subject: CN=test.dspace-cris.4science.it
*      start date: Sat, 09 Feb 2019 11:11:01 GMT
*      expire date: Fri, 10 May 2019 11:11:01 GMT
*      issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
*      compression: NULL
* ALPN, server accepted to use http/1.1
* Server auth using Basic with user 'dspacecris-u...@mailinator.com'
> POST /handle/123456789/6 HTTP/1.1
> Host: test.dspace-cris.4science.it
> Authorization: Basic
ZHNwYWNlY3Jpcy11c2VyQG1haWxpbmF0b3IuY29tOmRzcGFjZWNyaXMtdXNlcg==
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Disposition:attachment; filename=Singh_2009.pdf
> Content-Type:application/pdf
> Packaging:http://purl.org/net/sword/package/Binary
> Content-Length: 1413724
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
HTTP/1.1 100 Continue

* We are completely uploaded and fine
< HTTP/1.1 405 405
HTTP/1.1 405 405
< Date: Fri, 15 Mar 2019 06:35:49 GMT
Date: Fri, 15 Mar 2019 06:35:49 GMT
< Server: Apache/2.4.18 (Ubuntu)
Server: Apache/2.4.18 (Ubuntu)
< Set-Cookie:
JSESSIONID=4606702EDAC376EDE604CBB5500FC332;path=/;Secure;HttpOnly
Set-Cookie:
JSESSIONID=4606702EDAC376EDE604CBB5500FC332;path=/;Secure;HttpOnly
< Content-Language: en
Content-Language: en
< Content-Length: 1102
Content-Length: 1102
< Strict-Transport-Security: max-age=60
Strict-Transport-Security: max-age=60
< Content-Type: text/html;charset=utf-8
Content-Type: text/html;charset=utf-8

<
<!DOCTYPE html><html><head><title>Apache Tomcat/8.5.11 - Error
report</title><style type="text/css">h1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
h2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
h3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
body
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
p
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
a {color:black;} a.name {color:black;} .line
{height:1px;background-color:#525D76;border:none;}</style>
</head><body><h1>HTTP Status 405 - HTTP method GET is not supported by this
URL</h1><div class="line"></div><p><b>type</b> Status
report</p><p><b>message</b> <u>HTTP method GET is not supported by this
URL</u></p><p><b>description</b> <u>The specified HTTP method is not
allowed for the requested* Connection #0 to host
test.dspace-cris.4science.it left intact
 resource.</u></p><hr class="line"><h3>Apache
Tomcat/8.5.11</h3></body></html>

*So my question is: is SwordV2 not supported in DSpaceCRIS?*

On Thu, 14 Mar 2019 at 09:56, Sean Carte <sean.ca...@gmail.com> wrote:

> I'm trying to use swordv2 for depositing items to DSpace-CRIS 5.10 and am
> getting a 404 error.
>
> I am using the following curl command (pilfered from someone else's post):
>
> curl -v -i --data-binary "@Downloads/Singh_2009.pdf" -H
> "Content-Disposition:attachment; filename=Singh_2009.pdf" -H
> "Content-Type:application/pdf" -H "Packaging:
> http://purl.org/net/sword/package/Binary"; -u sean.ca...@gmail.com:password
> -X POST http://dev-ir.dut.ac.za:8080/swordv2/collection/123456789/3119
>
> This is the response on the command line:
> Note: Unnecessary use of -X or --request, POST is already inferred.
> *   Trying 10.4.36.12...
> * Connected to dev-ir.dut.ac.za (10.4.36.12) port 8080 (#0)
> * Server auth using Basic with user 'sean.ca...@gmail.com'
> > POST /swordv2/collection/123456789/3119 HTTP/1.1
> > Host: dev-ir.dut.ac.za:8080
> > Authorization: Basic c2Vhbi5jYXJ0ZUBnbWFpbC5jb206MHJhbmRvbTA=
> > User-Agent: curl/7.47.0
> > Accept: */*
> > Content-Disposition:attachment; filename=Singh_2009.pdf
> > Content-Type:application/pdf
> > Packaging:http://purl.org/net/sword/package/Binary
> > Content-Length: 1413724
> > Expect: 100-continue
> >
> < HTTP/1.1 100 Continue
> HTTP/1.1 100 Continue
>
> * We are completely uploaded and fine
> < HTTP/1.1 404 Not Found
> HTTP/1.1 404 Not Found
> < Server: Apache-Coyote/1.1
> Server: Apache-Coyote/1.1
> < Content-Length: 0
> Content-Length: 0
> < Date: Thu, 14 Mar 2019 07:48:21 GMT
> Date: Thu, 14 Mar 2019 07:48:21 GMT
> < Connection: close
> Connection: close
>
> <
> * Closing connection 0
>
>
> And this is what I get in the dspace.log:
>
> 2019-03-14 09:53:02,522 INFO  org.swordapp.server.SwordAPIEndpoint @ Auth
> type = Basic
> 2019-03-14 09:53:02,668 INFO  org.dspace.sword2.SwordAuthenticator @
> anonymous:session_id=0:sword_authenticate:username=sean.ca...@gmail.com
> ,on_behalf_of=null
> 2019-03-14 09:53:02,669 INFO
> org.dspace.authenticate.PasswordAuthentication @
> anonymous:session_id=0:authenticate:attempting password auth of user=
> sean.ca...@gmail.com
> 2019-03-14 09:53:02,965 INFO
> org.dspace.authenticate.PasswordAuthentication @ sean.ca...@gmail.com:
> session_id=0:authenticate:type=PasswordAuthentication
> 2019-03-14 09:53:02,965 INFO  org.dspace.sword2.DSpaceSwordAPI @
> sean.ca...@gmail.com:session_id=0:sword_auth_request:username=
> sean.ca...@gmail.com,on_behalf_of=NONE
>
>
> I am able to submit items to that collection with that user using the
> JSPUI. Is there something I'm doing wrong with swordv2?
>


--

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to