[dspace-tech] DSpace 6.0 : problem with checker and checker-emailer jobs

2017-04-24 Thread Devaux Cédric
Hello,

I have noticed that the checker-emailer job doesn't send an email even when 
there is "Checksum comparison result : Checksum_no_match" in the checker.log 
file produced by the checker job.


What I have done to check the checker-emailer job :
- add the last (Jan 19, 2017) ResultsPruner.java to module in the source to 
avoid checksum checker error DS-3445 ( 
https://jira.duraspace.org/browse/DS-3445 )
- change the content of a bitsream in the assetstore to generate a checksum 
error
- run the checker job : \bin\dspace checker -d2m -p
The checksum error is written in the table most_recent_checksum in the database 
and in the checker.log report :
Bitstream ID: 74b60b6a-fc05-44df-aaa0-d03d77498ed4
Bitstream info found: false
Bitstream marked deleted: false
Bitstream found: true
To be processed: true
Previous checksum: 8a4605be74aa9ea9d79846c1fba20a33
Previous checksum date: 04/24/2017 10:29:31
New checksum: 12e7f0848be8f151c154de5787f6
Checksum comparison result: CHECKSUM_NO_MATCH

- run the the checker-emailer job : \bin\dspace checker-emailer
No error but no email sent.
- When I add debug messages in DailyReportEmailer.java , I notice that 
numBitstreams stay null in if ((line.hasOption("a")) || 
(line.getOptions().length == 0)) so the bitstream with CHECKSUM_NO_MATCH is 
ignored. Because numberOfBitstreams is null, SendReport d'oesn't try to send an 
email.


I have also noticed a strange thing with the checker job.
When I delete a bitstream in the assetstore, the checker still return, in 
checker.log report and in most_recent_checksum table, Checksum comparison 
result: CHECKSUM_MATCH but with Bitstream found: false :

Bitstream ID: 1490b3b2-9490-4ac2-9c04-85c50bc4b314
Bitstream info found: false
Bitstream marked deleted: false
Bitstream found: false
To be processed: true
...
Previous checksum: 0455e45403ef7697b678166859f481aa
Previous checksum date: 04/24/2017 10:58:44
New checksum: 0455e45403ef7697b678166859f481aa
Checksum comparison result: CHECKSUM_MATCH

Problem with my installation or problem with checker-emailer and checker job ?

Best regards,
Cedric



-- 
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.


RE: [dspace-tech] Re: dspace5 rest login fails

2017-02-28 Thread Devaux Cédric
I have checked  on my DSpace 6 : with or without header -H "Accept: 
application/json", the response is the same (200 if the credentials are ok).

curl -v -X POST --data "email=g*=g*" -H "Accept: application/json" 
http://localhost:8080/rest/login

Regards,
Cedric

De : dspace-tech@googlegroups.com [mailto:dspace-tech@googlegroups.com] De la 
part de Mehrdad Pedram
Envoyé : mardi 28 février 2017 08:01
À : DSpace Technical Support
Cc : pedram.mehr...@gmail.com; heli...@centrum.sk
Objet : Re: [dspace-tech] Re: dspace5 rest login fails

The problem has been solved, I removed json header and changed the request as 
follow:

$.ajax({
url: '/rest/login ',
type : "POST",
data : 'email=m...@email.com=mypass',
success: function (response) { alert(response); },
error: function(xhr, status, errorThrown) { alert("Error in /rest/login "+ 
status+ " " + errorThrown); },
complete: function(xhr, status) { alert('complete'); }
});

Its weird, but login request in dspace 6 should not include any additional 
header and data should sent as a plain text.
Hope this help some one...

On Tuesday, February 28, 2017 at 9:39:18 AM UTC+3:30, Mehrdad Pedram wrote:
Thank you, I didn't notice the response cookie  but the problem is persist. i'm 
getting 401 error and there is no response cookies,
As the documentation says below command should return JSESSIONID but it's 
return 401 for me,
curl -v -X POST --data 
"email=m...@email.com=mypass" 
http://localhost:8080/rest/login
Any advice please?
Yours faithfully.





--
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.

-- 
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.


RE: [dspace-tech] DSpace 6 : Browse by authors,... doesn't work

2016-12-30 Thread Devaux Cédric

Ok, I've understood how it works  : when you click on a letter in browsing by 
Authors, the result is a list of authors whose name is after the selected 
letter in an alphabetical order , and not only authors whose name starts with 
the selected letter. It jumps in the list of authors at the first author after 
the selected letter.
And if there is no author whose name starts from the selected letter to "Z", 
the results is a list starting at "0" (or "A").
It's a bit weird : when I click on "M" and if there is no author whose name 
starts with "M", I expect no result rather than a list of authors whose name 
starts with "N" or "O", "P", "Q",... .
But when the repository is not a demo and is populated, this somehow strange 
behavior greatly disappears and it's Ok.
Thanks.

Cédric

-- 
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.


RE: [dspace-tech] DSpace 6 : Browse by authors,... doesn't work

2016-12-30 Thread Devaux Cédric
Ok, I've understood how it works  : when you click on a letter in browsing by 
Authors, the result is a list of authors whose name is after the selected 
letter in an alphabetical order , and not only authors whose name starts with 
the selected letter. It jumps in the list of authors at the first author after 
the selected letter.
And if there is no author whose name starts from the selected letter to "Z", 
the results is a list starting at "0" (or "A").
It's a bit weird : when I click on "M" and if there is no author whose name 
starts with "M", I expect no result rather than a list of authors whose name 
starts with "N" or "O", "P", "Q",... .
But when the repository is not a demo and is populated, this somehow strange 
behavior greatly disappears and it's Ok.
Thanks.

Cédric




De : dspace-tech@googlegroups.com [mailto:dspace-tech@googlegroups.com] De la 
part de emilio lorenzo
Envoyé : vendredi 30 décembre 2016 16:13
À : dspace-tech@googlegroups.com
Objet : Re: [dspace-tech] DSpace 6 : Browse by authors,... doesn't work

 Hello,
I think the  demo is behaving as expected, but you are noticing the effects of  
few results in the browsing  list. When you click on "M" letter,  the index 
positions you in the first result of "M",  that is "N" since there are no M´s 
Authors,
Here is an example of a populated version 6 instance:
 http://repositorio.ual.es/browse?type=author
best

Emilio


--
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.

-- 
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.


[dspace-tech] DSpace 6 : Browse by authors,... doesn't work

2016-12-30 Thread Devaux Cédric
Hello,

When you clik on a letter in Browsing by authors (or subjects or titles) on 
DSpace 6.0 demo ( https://demo.dspace.org/xmlui/browse?type=author ) , the 
result is a list of names that don't necessarily begin with the selected 
letter. There is the same issue on my DSpace 6.0 instance.
There is not problem with Discover menu when you select an author or with 
search menu, the result is as expected. The issue concerns only the Browse menu.
There is bugs related to this ( https://jira.duraspace.org/browse/DS-3157 ,  
https://jira.duraspace.org/browse/DS-2602 ), but it's not exactly the same, 
and, what I notice, is a permanent and not a random problem.
Is it a new issue that affects DSpace 6.0 ?

Cedric

-- 
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.


RE: [dspace-tech] DSpace 6.0 : problem with LDAP authentication in REST API

2016-12-22 Thread Devaux Cédric
(I've made a test with LDAP, not with Shibboleth)


De : dspace-tech@googlegroups.com [mailto:dspace-tech@googlegroups.com] De la 
part de Tom Desair
Envoyé : jeudi 22 décembre 2016 09:41
À : Terry Brady
Cc : Devaux Cédric; dspace-tech@googlegroups.com
Objet : Re: [dspace-tech] DSpace 6.0 : problem with LDAP authentication in REST 
API

This is a bit of a guess, but we had a client for which we needed to implement 
authentication support for OpenAM through the REST API. To do this, we back 
ported the DSpace 6 REST authentication framework to DSpace 5. We then 
encountered a similar issue.

The problem is that when a user logs in using LDAP or Shibboleth, they do that 
using a some kind of username or user ID and not their e-mail address. This has 
the effect that the DSpace 6 DSpaceAuthenticationProvider creates a 
UsernamePasswordAuthenticationToken with that user name (which is not an e-mail 
address): 
https://github.com/DSpace/DSpace/blob/master/dspace-rest/src/main/java/org/dspace/rest/authentication/DSpaceAuthenticationProvider.java#L63

Later on, this user name is used to lookup the ePerson account based on his 
e-mail address: 
https://github.com/DSpace/DSpace/blob/master/dspace-rest/src/main/java/org/dspace/rest/Resource.java#L91
 BUT THIS IS WRONG, since the user name is mostly not the e-mail address of 
that user.

We fixed this by adding a method createAuthenticationToken to the 
DSpaceAuthenticationProvider that will store the authenticated ePerson's e-mail 
address in the Spring Authentication object, instead of the user name used to 
login: 
https://github.com/milieuinfo/dspace54-atmire/blob/ontwikkel/dspace/modules/rest/src/main/java/org/dspace/rest/authentication/DSpaceAuthenticationProvider.java#L65
 That solved the problem for us, since the logic in the REST Resource class is 
then correct.

I do not have access to a development Shibboleth or LDAP system so I cannot 
test if this will also fix the problem in the official DSpace 6 code, but I'm 
pretty confident it will. Can someone who has a development Shibboleth and/or 
LDAP, apply this fix and check if it works? If it helps, I can create a 
separate pull request for this.

I do not think this is related to https://jira.duraspace.org/browse/DS-3108, 
since Cédric is able to complete the authentication request. I have another 
idea about DS-3108 which I will post in the comments of that ticket.

Best regards,
Tom


[logo]  Tom Desair
250-B Suite 3A, Lucius Gordon Drive, West Henrietta, NY 14586
Esperantolaan 4, Heverlee 3001, Belgium
www.atmire.com<http://atmire.com/website/?q=services_source=emailfooter_medium=email_campaign=tomdesair>


-- 
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.


RE: [dspace-tech] DSpace 6.0 : problem with LDAP authentication in REST API

2016-12-22 Thread Devaux Cédric

 I've made a test with DSpaceAuthenticationProvider.java provide by Tom ( 
https://github.com/milieuinfo/dspace54-atmire/blob/ontwikkel/dspace/modules/rest/src/main/java/org/dspace/rest/authentication/DSpaceAuthenticationProvider.java<https://github.com/milieuinfo/dspace54-atmire/blob/ontwikkel/dspace/modules/rest/src/main/java/org/dspace/rest/authentication/DSpaceAuthenticationProvider.java#L65>
 ) and it's OK :

When I check the authentication (/status) with the JSESSIONID from the /login 
response, "authenticated" is now true :

 
true*@*.*Cedric 
Devauxtrue


(The response to /status request is now similar to Password Authentication : 
without apiVersion and sourceVersion )

Thanks for this solution.

Regards,

Cedric






De : dspace-tech@googlegroups.com [mailto:dspace-tech@googlegroups.com] De la 
part de Tom Desair
Envoyé : jeudi 22 décembre 2016 09:41
À : Terry Brady
Cc : Devaux Cédric; dspace-tech@googlegroups.com
Objet : Re: [dspace-tech] DSpace 6.0 : problem with LDAP authentication in REST 
API

This is a bit of a guess, but we had a client for which we needed to implement 
authentication support for OpenAM through the REST API. To do this, we back 
ported the DSpace 6 REST authentication framework to DSpace 5. We then 
encountered a similar issue.

The problem is that when a user logs in using LDAP or Shibboleth, they do that 
using a some kind of username or user ID and not their e-mail address. This has 
the effect that the DSpace 6 DSpaceAuthenticationProvider creates a 
UsernamePasswordAuthenticationToken with that user name (which is not an e-mail 
address): 
https://github.com/DSpace/DSpace/blob/master/dspace-rest/src/main/java/org/dspace/rest/authentication/DSpaceAuthenticationProvider.java#L63

Later on, this user name is used to lookup the ePerson account based on his 
e-mail address: 
https://github.com/DSpace/DSpace/blob/master/dspace-rest/src/main/java/org/dspace/rest/Resource.java#L91
 BUT THIS IS WRONG, since the user name is mostly not the e-mail address of 
that user.

We fixed this by adding a method createAuthenticationToken to the 
DSpaceAuthenticationProvider that will store the authenticated ePerson's e-mail 
address in the Spring Authentication object, instead of the user name used to 
login: 
https://github.com/milieuinfo/dspace54-atmire/blob/ontwikkel/dspace/modules/rest/src/main/java/org/dspace/rest/authentication/DSpaceAuthenticationProvider.java#L65
 That solved the problem for us, since the logic in the REST Resource class is 
then correct.

I do not have access to a development Shibboleth or LDAP system so I cannot 
test if this will also fix the problem in the official DSpace 6 code, but I'm 
pretty confident it will. Can someone who has a development Shibboleth and/or 
LDAP, apply this fix and check if it works? If it helps, I can create a 
separate pull request for this.

I do not think this is related to https://jira.duraspace.org/browse/DS-3108, 
since Cédric is able to complete the authentication request. I have another 
idea about DS-3108 which I will post in the comments of that ticket.

Best regards,
Tom


[logo]  Tom Desair
250-B Suite 3A, Lucius Gordon Drive, West Henrietta, NY 14586
Esperantolaan 4, Heverlee 3001, Belgium
www.atmire.com<http://atmire.com/website/?q=services_source=emailfooter_medium=email_campaign=tomdesair>


-- 
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.


[dspace-tech] DSpace 6.0 : problem with LDAP authentication in REST API

2016-12-21 Thread Devaux Cédric
Hello,

I want to use LDAP Authentication with Rest and there is a problem.
The LDAP authentication ( /login ) seems OK  : response 200 and in dspace.log :
2016-12-21 11:09:52,551 INFO org.dspace.authenticate.LDAPAuthentication @ 
*@*.*::authenticate:type=ldap
2016-12-21 11:09:52,551 INFO org.dspace.eperson.EPersonServiceImpl @ 
*@*.*::update_eperson:eperson_id=39...

But when I check the authentication (/status) with the JSESSIONID from the 
/login response, "authenticated" is false :
6falsetrue6.0

It's OK with Password Authentication with Rest (but the response to /status 
request is different, without apiVersion and sourceVersion  :
true**true
 )

I'd like to know if someone has ever successfully used LDAP authentication in 
Rest Api or if it's a bug like with Shibboleth Authentication ( 
https://jira.duraspace.org/browse/DS-2898 , 
https://jira.duraspace.org/browse/DS-3108 ) ?

Regards,
Cedric

-- 
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.


[dspace-tech] RE: Installing DSpace 6.0 without git : Maven build error

2016-12-08 Thread Devaux Cédric
Thanks.
(This error occured when installing DSpace 6.0 from Source Release : 
dspace-6.0-src-release.zip, I haven't tested from Binary Release : 
dspace-6.0-release.zip)

Regards,
Cedric


De : Terry Brady [mailto:tw...@georgetown.edu]
Envoyé : mercredi 7 décembre 2016 21:12
À : DSpace Technical Support
Cc : Devaux Cédric
Objet : Re: Installing DSpace 6.0 without git : Maven build error

A ticket has been created in the DSpace proejct to track this issue.

https://jira.duraspace.org/browse/DS-3418

On Monday, December 5, 2016 at 6:39:40 AM UTC-8, Devaux Cédric wrote:
Hello,

When installing DSpace 6.0 ( default theme, not Mirage 2 theme), an error has 
occurred at the step "7.Build the Installation Package : mvn clean package" 
because git is not installed  :
[ERROR] Failed to execute goal 
org.codehaus.mojo:buildnumber-maven-plugin:1.4:create (default) on project 
dspace-api: Cannot get the revision information from the scm repository :
[ERROR] Exception while executing SCM command. Error while executing command. 
Error while executing process. Cannot run program "git"

This error disappears if I remove from [dspace-source]dspace-api\pom.xml, the 
lines about buildnumber-maven-plugin (...) and the installation of 
DSpace 6.0 seems OK.
I haven't investigate the consequences of the removal.
So, Git has to be installed for Dspace 6.0  (XMLUI and JSPUI default theme) or 
buildnumber-maven-plugin has to be removed from pom?

Regards,
Cedric

-- 
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.