Re: [dspace-tech] A bug in REST API introduced in 5.3 or 5.4

2016-02-23 Thread Evgeni Dimitrov
Perhaps the idea was to have context.complete() after normal execution. 
Which is missing.

On Tuesday, February 23, 2016 at 10:29:30 PM UTC+2, Peter Dietz wrote:
>
> Look at Git Blame to find out why things changed:
>
> https://github.com/DSpace/DSpace/blame/dspace-5_x/dspace-rest/src/main/java/org/dspace/rest/HandleResource.java
>
> And that line leads to:
> https://github.com/DSpace/DSpace/pull/1007
>
> So, adding that was intending to prevent stale connections / contexts from 
> being held open for a very long time, and behave like other endpoints. The 
> problem was that you could view /rest/handle, and get data, then change 
> that object, and the next time you view that /rest/handle, the data would 
> not have changed. 
>
> If you have a stack trace, please consider investigating the root of the 
> bug for 5x. In the upcoming DSpace 6x, contexts are completely different 
> with the services refactor, and changes here would have limited utility.
>
>
> 
> Peter Dietz
> Longsight
> www.longsight.com
> pe...@longsight.com 
> p: 740-599-5005 x809
>
> On Tue, Feb 23, 2016 at 3:19 PM, Evgeni Dimitrov  > wrote:
>
>> Comparing 5.2 and 5.4 - org.dspace.rest.HandleResource - I see that after 
>> the line:
>>
>> return new Community((org.dspace.content.Community) dso, expand, context);
>>
>> some lines are added:
>>
>> } finally{
>> processFinally(context);
>> }
>>
>> Because context is not null and valid, processFinally generates 500 
>> "INTERNAL_SERVER_ERROR"
>>
>> What was the intention for adding "finally" there? What should be the 
>> fix? I can just delete these lines . . .
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to dspac...@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] Enable Citation at Dspace 5.4

2016-02-23 Thread Faiyaz Ahmed
Hi Susan,

Thank you so much for this code and working GREAT .. 

You saved my time :)

Regards,
Faiyaz Ahmed

On Wednesday, February 24, 2016 at 1:55:19 AM UTC+5, Susan Borda wrote:
>
> HI-
> Here’s what I added to the item-view.xsl file:
>   
>
>  
>
>  
> 
> 
> 
> 
> xmlui.dri2xhtml.METS-1.0.item-citation
> 
> 
> 
> 
> 
>  test="count(following-sibling::dim:field[@element='identifier' and 
> @qualifier='degreeDiscipline' ]) != 0">
> 
> 
> 
> 
> 
> 
> — 
> Susan Borda
> Digital Technologies Development Librarian
> Montana State University Library
> 406-994-1873
>
>
>
> From:  on behalf of Faiyaz Ahmed 
> 
> Date: Tuesday, February 23, 2016 at 12:02 PM
> To: DSpace Technical Support 
> Subject: [dspace-tech] Enable Citation at Dspace 5.4
>
> Hello All, 
>
> Does any one have idea that how I can enable "CITATION" after description 
> as in this link : https://openknowledge.worldbank.org/handle/10986/23746
>
> Regards,
> Faiyaz Ahmed
>
> -- 
> 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...@googlegroups.com .
> To post to this group, send email to dspac...@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] Enable Citation at Dspace 5.4

2016-02-23 Thread Borda, Susan
HI-
Here's what I added to the item-view.xsl file:
  

   



 




xmlui.dri2xhtml.METS-1.0.item-citation












-
Susan Borda
Digital Technologies Development Librarian
Montana State University Library
406-994-1873



From: > on 
behalf of Faiyaz Ahmed 
>
Date: Tuesday, February 23, 2016 at 12:02 PM
To: DSpace Technical Support 
>
Subject: [dspace-tech] Enable Citation at Dspace 5.4

Hello All,

Does any one have idea that how I can enable "CITATION" after description as in 
this link : https://openknowledge.worldbank.org/handle/10986/23746

Regards,
Faiyaz Ahmed

--
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] A bug in REST API introduced in 5.3 or 5.4

2016-02-23 Thread Evgeni Dimitrov
I am not getting this. Now processFinally is called always - after 
exception and after normal execution - and it always generates 500 
"INTERNAL_SERVER_ERROR".
It is true that in addition it aborts the context, but . . .

On Tuesday, February 23, 2016 at 10:29:30 PM UTC+2, Peter Dietz wrote:
>
> Look at Git Blame to find out why things changed:
>
> https://github.com/DSpace/DSpace/blame/dspace-5_x/dspace-rest/src/main/java/org/dspace/rest/HandleResource.java
>
> And that line leads to:
> https://github.com/DSpace/DSpace/pull/1007
>
> So, adding that was intending to prevent stale connections / contexts from 
> being held open for a very long time, and behave like other endpoints. The 
> problem was that you could view /rest/handle, and get data, then change 
> that object, and the next time you view that /rest/handle, the data would 
> not have changed. 
>
> If you have a stack trace, please consider investigating the root of the 
> bug for 5x. In the upcoming DSpace 6x, contexts are completely different 
> with the services refactor, and changes here would have limited utility.
>
>
> 
> Peter Dietz
> Longsight
> www.longsight.com
> pe...@longsight.com 
> p: 740-599-5005 x809
>
> On Tue, Feb 23, 2016 at 3:19 PM, Evgeni Dimitrov  > wrote:
>
>> Comparing 5.2 and 5.4 - org.dspace.rest.HandleResource - I see that after 
>> the line:
>>
>> return new Community((org.dspace.content.Community) dso, expand, context);
>>
>> some lines are added:
>>
>> } finally{
>> processFinally(context);
>> }
>>
>> Because context is not null and valid, processFinally generates 500 
>> "INTERNAL_SERVER_ERROR"
>>
>> What was the intention for adding "finally" there? What should be the 
>> fix? I can just delete these lines . . .
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to dspac...@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] A bug in REST API introduced in 5.3 or 5.4

2016-02-23 Thread Peter Dietz
Look at Git Blame to find out why things changed:
https://github.com/DSpace/DSpace/blame/dspace-5_x/dspace-rest/src/main/java/org/dspace/rest/HandleResource.java

And that line leads to:
https://github.com/DSpace/DSpace/pull/1007

So, adding that was intending to prevent stale connections / contexts from
being held open for a very long time, and behave like other endpoints. The
problem was that you could view /rest/handle, and get data, then change
that object, and the next time you view that /rest/handle, the data would
not have changed.

If you have a stack trace, please consider investigating the root of the
bug for 5x. In the upcoming DSpace 6x, contexts are completely different
with the services refactor, and changes here would have limited utility.



Peter Dietz
Longsight
www.longsight.com
pe...@longsight.com
p: 740-599-5005 x809

On Tue, Feb 23, 2016 at 3:19 PM, Evgeni Dimitrov 
wrote:

> Comparing 5.2 and 5.4 - org.dspace.rest.HandleResource - I see that after
> the line:
>
> return new Community((org.dspace.content.Community) dso, expand, context);
>
> some lines are added:
>
> } finally{
> processFinally(context);
> }
>
> Because context is not null and valid, processFinally generates 500
> "INTERNAL_SERVER_ERROR"
>
> What was the intention for adding "finally" there? What should be the fix?
> I can just delete these lines . . .
>
> --
> 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] Enable Citation at Dspace 5.4

2016-02-23 Thread Faiyaz Ahmed
Hello All,

Does any one have idea that how I can enable "CITATION" after description 
as in this link : https://openknowledge.worldbank.org/handle/10986/23746

Regards,
Faiyaz Ahmed

-- 
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] Indexing Solr index-lucene-init -- Error table view does not exists

2016-02-23 Thread Faiyaz Ahmed
Thanks Helix for reply ...

I updated my answer below after your questions..

If you make a search query from the /discovery URL, do you see results?

*Can you please let me know how to do that ...*

If you click on any Browse index (by author, by title, by issue date),
do you see any items?

*I can see author name but no data I can see ...*

Which URL did you use for search?

*I clicked on advance search and it is showing data : *

To debug the problem with an item page not showing any content, watch
the log file:
tail -f [dspace]/log/dspace.log.2016-xx-xx
and then load any item page. Do you see any message added to the log?

Only info logs printed :
*2016-02-23 21:28:35,714 INFO  org.dspace.usage.LoggerUsageEventListener @
anonymous:session_id=:ip_addr=192.168.163.1:view_item:handle=123456789/117*


Regards,



Faiyaz Ahmed

On Tue, Feb 23, 2016 at 10:49 PM, helix84  wrote:

> The "bi_1", "bi_2" etc tables missing are meant to be used with legacy
> DB-based browse. They don't exist because DSpace 5 doesn't create them
> anymore.
>
> > 2016-02-22 21:01:28,816 INFO  org.dspace.search.DSIndexer @ Writing
> Community: 123456789/99 to Index
>
> From these log lines, I see that index-init (Lucene-based search)
> completed successfully. The question is whether you changed your
> configuration to use the legacy Lucene search and DB-based browse or
> you did no changes and are using the Discovery (Solr) based
> search
>
> If you click on any Browse index (by author, by title, by issue date),
> do you see any items?
> Which URL did you use for search?
>
> If you make a search query from the /discovery URL, do you see results?
>
> To debug the problem with an item page not showing any content, watch
> the log file:
> tail -f [dspace]/log/dspace.log.2016-xx-xx
>
> and then load any item page. Do you see any message added to the log?
>
>
> Regards,
> ~~helix84
>
> Compulsory reading: DSpace Mailing List Etiquette
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>

-- 
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] Indexing Solr index-lucene-init -- Error table view does not exists

2016-02-23 Thread helix84
The "bi_1", "bi_2" etc tables missing are meant to be used with legacy
DB-based browse. They don't exist because DSpace 5 doesn't create them
anymore.

> 2016-02-22 21:01:28,816 INFO  org.dspace.search.DSIndexer @ Writing 
> Community: 123456789/99 to Index

>From these log lines, I see that index-init (Lucene-based search)
completed successfully. The question is whether you changed your
configuration to use the legacy Lucene search and DB-based browse or
you did no changes and are using the Discovery (Solr) based
search

If you click on any Browse index (by author, by title, by issue date),
do you see any items?
Which URL did you use for search?

If you make a search query from the /discovery URL, do you see results?

To debug the problem with an item page not showing any content, watch
the log file:
tail -f [dspace]/log/dspace.log.2016-xx-xx

and then load any item page. Do you see any message added to the log?


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

-- 
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] Something wrong with REST API - DSpace 5.4

2016-02-23 Thread Evgeni Dimitrov
I have used REST API with DSpace 5.2 and Windows. Now I am trying with
DSpace 5.4 and Linux. Doing not the same but very similar thing. Trying to
get a community by handle.

I am getting in the DSpace log

2016-02-23 17:24:12,947 INFO  org.dspace.rest.RestIndex @ REST Login
Success for user: @
2016-02-23 17:24:12,973 INFO  org.dspace.rest.HandleResource @ DSO Lookup
by handle: [nls] / [94] got result of: COMMUNITY_17
2016-02-23 17:24:13,091 ERROR org.dspace.rest.Resource @ Something get
wrong. Aborting context in finally statement.
2016-02-23 17:24:13,104 INFO  org.dspace.rest.RestIndex @ REST Logout:
@

In the Tomcat log there is more - see bellow.

Has anybody any ideas?


23-Feb-2016 17:24:13.091 SEVERE [http-nio-8080-exec-4]
com.sun.jersey.spi.container.ContainerResponse.logException Mapped
exception to response: 500 (Internal Server Error)
 javax.ws.rs.WebApplicationException
at org.dspace.rest.Resource.processFinally(Resource.java:169)
at org.dspace.rest.HandleResource.getObject(HandleResource.java:74)
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
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

-- 
You received this message because 

[dspace-tech] Multi language field's OAI XML

2016-02-23 Thread Samuel Henrique
Currently DSpace returns (through OAI) multi language fields as multiple 
fields with the same tag 

Practical example; I have an article with two descriptions, one in english 
and one in portuguese.
When I get this article's xml through OAI, i get the descriptions in the 
following format:

...
 Here be description
 Here be portuguese description
...

I believe this is problematic because it makes very difficult to detect the 
language of the field and harvest both (for example, VuFind only gets the 
first description. see [1]).

Also, please correct me if i'm wrong, but is a fault in DSpace on complying 
with Dublin Core guidelines, see Recommendation 9: 
*Where the language of the value is indicated, it should be encoded using 
the 'xml:lang' attribute.*From 
http://dublincore.org/documents/dc-xml-guidelines/.

I know that, by default, it's not obligatory to have a language field, but 
shouldn't be the case when you have fields with more than one language?

Can somebody confirm that? I was afraid that the problem was on VuFind 
side, i was looking at the article's xml returned from OAI stored in VuFind 
folders, but i believe thesse XMLs are exact ones returned by DSpace, and 
directly searching through DSpace OAI interface (dspacedomain/oai/request) 
gave me conffidence that its DSpace whos returning these XMLs.

[1]https://sourceforge.net/p/vufind/mailman/message/34785485/

-- 
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: Possible bug in DSpace 5.4 with batch metadata import, workflow edit metadata and file upload

2016-02-23 Thread Ilja Sidoroff
I changed dspace.cfg not to require uploads

webui.submit.upload.required = false

And I didn't get stuck on the "Upload" page anymore. However, Sherpa/Romeo 
information still gets printed in the wrong page. Also, upload page doesn't 
display any possibilities to actually upload any files, so it still seems 
to be broken.


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