Re: [Dspace-tech] REST API query, sort

2012-03-14 Thread maurice . bouchard
Wesley,
For problem 1, what are you seeing in your DSpace logs?  In your  
Catalina logs? Have you checked them for SQL or database errors?

Maury Bouchard
Simmons College GSLIS

Quoting Wesley Alan Wright :

> I'm running a 1.6.2 Dspace server at
>
>   http://badger.uvm.edu/dspace
>
> After a days hard work, I was able to get the REST API installed at
>
>   http://badger.uvm.edu/dspace-rest/
>
> Problem 1:
>
> This works (I get an XML file)
>
>   http://badger.uvm.edu/dspace-rest/search.xml?query=foobar
>
> But not this (I get an internal server error)
>
>   http://badger.uvm.edu/dspace-rest/search.xml?query=wesley
>
> The difference: wesley exists as an author in our Dspace collection
>
>   
> http://badger.uvm.edu/dspace/search?scope=%2F&query=wesley&rpp=10&sort_by=0&order=DESC&submit=Go
>
> foobar does not
>
>   
> http://badger.uvm.edu/dspace/search?scope=%2F&query=foobar&rpp=10&sort_by=0&order=DESC&submit=Go
>
> Problem 2:
>
> order doesn't order results, or at least not by title
>
>   http://badger.uvm.edu/dspace-rest/collections/1.xml?_sort=name
>
> But it is doing something -- results are different than these
>
>   http://badger.uvm.edu/dspace-rest/collections/1.xml
>
> I note that "" is ambiguous in the xml
>
>
> ---
> | Wesley Alan Wright    |
> | Center for Teaching and Learning  __0__ |
> | Room 407 Lafayette Building  / \ | \|
> | University of Vermont  \77  |
> | Burlington, Vermont 05405-0160 USA. \\  http://www.uvm.edu/skivt-l  |
> | Voice: 802-656-1254  vv |
> | aim:goim?screenname=maddogskideath  http://www.uvm.edu/~waw/|
> ---
>
>
>
>
>
>
> --
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>





--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] Rest api

2012-03-05 Thread maurice . bouchard
Are you using Postgres or Oracle? When I installed the REST API a  
couple of weeks ago, I encountered the 500 internal server errors as  
well.  I solved them by placing the ojdbc14.jar in my CLASSPATH (I am  
using Oracle).  If you're using Postgres there may be an analogous  
fix.  Keep in mind, the REST API is not using the same db connection  
mechanism, at least for Oracle, as dSpace proper.

Maury Bouchard
Simmons College
GSLIS

Quoting dolly :

> Thanks for the reply
>
> I tried to connect rest by the following method
>
> "(Option 3) Install as a DSpace Module"
>
> After "http://localhost:8080/rest"; in browser
>
> it is showing the api page.But when it does not show the users/groups  of
> dspace.
>
> On clicking *users*  it is showing error
>
> "HTTP Status 500 - Internal server error"
>
>
> plz help me
>
>
> With regards
>
> --
> View this message in context:  
> http://dspace.2283337.n4.nabble.com/Rest-api-tp4434786p4445902.html
> Sent from the DSpace - Tech mailing list archive at Nabble.com.
>
> --
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>





--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


[Dspace-tech] REST API metadata elements not populated from a collection level query

2012-02-23 Thread maurice . bouchard
Greetings,
When I issue a collection level query such as:  
http://192.168.56.111:8008/rest/collections/22.xml I get all items in  
collection 22 (as expected) but the individual item level   
fields are empty, as in:

0


0


0


0

.
.
.
When I issue an item level query such as  
http://192.168.56.111:8008/rest/items.xml I get all the items in all  
collections (as expected) but the metadata elements are populated, as  
in:


contributor
0
author
dc
Fonds, Paige


date
0
accessioned
dc
2012-02-05T01:03:07Z


date
0
available
dc
2012-02-05T01:03:07Z


This has to be related to https://jira.duraspace.org/browse/DS-922  I  
am using DSpace 1.8 and the latest version of the REST API.  I  
understand that the module is experimental but if this is easy to fix,  
that would be much appreciated. I'm not a java programmer but I am  
happy to help however I can.

Thanks very much.
Maury Bouchard
Simmons GSLIS



--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] DSpace REST API: SQL error (500)

2012-02-23 Thread maurice . bouchard
I solved this problem.

The REST API is using class oracle.jdbc.OracleDriver which is found in  
the ojdbc14.jar  This jar was not in my classpath.  I copied it to  
$JAVA_HOME/jre/lib/ext and after that, the API works.  Everything is  
obvious in retrospect but I am still confused as to why my  
dspace-1.8.0 install was working perfectly well with jspui and xmlui,  
both happily populating my oracle tables. Clearly, these apps are  
using a different db connection mechanism (i.e., db.url found in  
dspace.cfg) than the REST API.  Is there a technical reason why the  
API couldn't use the same mechanism?

Regards,
Maury Bouchard
Simmons College, GSLIS

Quoting maurice.bouch...@simmons.edu:

> Thanks for the response, but I'm not sure what I'm looking in that
> java file. In the startProviders method, I found the following code:
> // for dev testing only COMMENT IN WORKING ENVIRONMENT
>  if (config.contains("dspace.dir")) {
>  config = "/devel/dspace/config/dspace.cfg";
>  }
>
> which was *not* commented so I commented that code and rebuilt.
> Sadly, there was no change in the behavior.
>
> The method builds the entityProvider list.  Is there supposed to be a
> database initialization there?  That seems unlikely.  If the web.xml
> file under the dspace-rest/webapp/WEB-INF directory points at my
> dspace.cfg, why wouldn't it connect to the database using the jdbc
> connect in db.url?  I noticed the pom.xml for the dspace-rest code has
> ojdbc14 under Oracle db support.  Is that correct?
>
> Thanks,
> Maury Bouchard
> Simmons GSLIS
>
>
> Quoting Bojan Suzic :
>
>> Hi Maury,
>>
>> this error refers to the problem with the database access, connection
>> cannot be established.
>> Can you check the contents of
>> org/dspace/rest/servlet/DS16DirectServlet.java, method startProviders?
>> Maybe it is not  initialized there.
>>
>> Regards
>> Bojan
>>
>>
>> Am 22.02.2012 16:58, schrieb maurice.bouch...@simmons.edu:
>>> Hello,
>>> I am attempting to use the REST API against a test repository. I am
>>> using dspace 1.8.0 and Oracle express.  My repository is working fine
>>> (using the xmlui, I can add, change, and view communities,
>>> collections, and items).  I've checked out and built the REST API
>>> after having changed its web.xml to point at my dspace.cfg. I can get
>>> to all the documentation (e.g.,
>>> http://192.168.56.111:8008/rest/describe and yes, I am using port 8008
>>> since oracle apex is listening on 8080). When I attempt to retrieve
>>> any communities (e.g.,
>>> http://192.168.56.111:8008/rest/communities.xml), collections, or
>>> items, in either json or xml format, I get 500 - Internal server
>>> errors.  The tomcat (v6.0.33) log shows:
>>>
>>> Setting the REST servlet context to: /rest
>>> Setting the manager servlet context to: /rest
>>> stor2/communities.xml
>>> WARN Could not process entity: SQL error (500)[null]: Internal server error
>>>
>>> The dspace log shows:
>>>
>>> org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:585)
>>>   at org.dspace.core.Context.(Context.java:95)
>>> .
>>> .
>>> .
>>> I've set the logging level to FINE and verified that the proper
>>> dspace.cfg is working. I've searched the dspace open issue database
>>> and the web but haven't found anything.
>>>
>>> What am I missing? Any suggestions will be much appreciated.
>>>
>>> Thanks very much,
>>> Maury Bouchard
>>> Simmons College, GSLIS
>>>
>>
>> --
>> Virtualization & Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> ___
>> DSpace-tech mailing list
>> DSpace-tech@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>>
>
>
>
>
>
> --
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>




--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] DSpace REST API: SQL error (500)

2012-02-22 Thread maurice . bouchard
Thanks for the response, but I'm not sure what I'm looking in that  
java file. In the startProviders method, I found the following code:
// for dev testing only COMMENT IN WORKING ENVIRONMENT
 if (config.contains("dspace.dir")) {
 config = "/devel/dspace/config/dspace.cfg";
 }

which was *not* commented so I commented that code and rebuilt.   
Sadly, there was no change in the behavior.

The method builds the entityProvider list.  Is there supposed to be a  
database initialization there?  That seems unlikely.  If the web.xml  
file under the dspace-rest/webapp/WEB-INF directory points at my  
dspace.cfg, why wouldn't it connect to the database using the jdbc  
connect in db.url?  I noticed the pom.xml for the dspace-rest code has  
ojdbc14 under Oracle db support.  Is that correct?

Thanks,
Maury Bouchard
Simmons GSLIS


Quoting Bojan Suzic :

> Hi Maury,
>
> this error refers to the problem with the database access, connection
> cannot be established.
> Can you check the contents of
> org/dspace/rest/servlet/DS16DirectServlet.java, method startProviders?
> Maybe it is not  initialized there.
>
> Regards
> Bojan
>
>
> Am 22.02.2012 16:58, schrieb maurice.bouch...@simmons.edu:
>> Hello,
>> I am attempting to use the REST API against a test repository. I am
>> using dspace 1.8.0 and Oracle express.  My repository is working fine
>> (using the xmlui, I can add, change, and view communities,
>> collections, and items).  I've checked out and built the REST API
>> after having changed its web.xml to point at my dspace.cfg. I can get
>> to all the documentation (e.g.,
>> http://192.168.56.111:8008/rest/describe and yes, I am using port 8008
>> since oracle apex is listening on 8080). When I attempt to retrieve
>> any communities (e.g.,
>> http://192.168.56.111:8008/rest/communities.xml), collections, or
>> items, in either json or xml format, I get 500 - Internal server
>> errors.  The tomcat (v6.0.33) log shows:
>>
>> Setting the REST servlet context to: /rest
>> Setting the manager servlet context to: /rest
>> stor2/communities.xml
>> WARN Could not process entity: SQL error (500)[null]: Internal server error
>>
>> The dspace log shows:
>>
>> org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:585)
>>   at org.dspace.core.Context.(Context.java:95)
>> .
>> .
>> .
>> I've set the logging level to FINE and verified that the proper
>> dspace.cfg is working. I've searched the dspace open issue database
>> and the web but haven't found anything.
>>
>> What am I missing? Any suggestions will be much appreciated.
>>
>> Thanks very much,
>> Maury Bouchard
>> Simmons College, GSLIS
>>
>
> --
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>





--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


[Dspace-tech] DSpace REST API: SQL error (500)

2012-02-22 Thread maurice . bouchard
Hello,
I am attempting to use the REST API against a test repository. I am  
using dspace 1.8.0 and Oracle express.  My repository is working fine  
(using the xmlui, I can add, change, and view communities,  
collections, and items).  I've checked out and built the REST API  
after having changed its web.xml to point at my dspace.cfg. I can get  
to all the documentation (e.g.,  
http://192.168.56.111:8008/rest/describe and yes, I am using port 8008  
since oracle apex is listening on 8080). When I attempt to retrieve  
any communities (e.g.,  
http://192.168.56.111:8008/rest/communities.xml), collections, or  
items, in either json or xml format, I get 500 - Internal server  
errors.  The tomcat (v6.0.33) log shows:

Setting the REST servlet context to: /rest
Setting the manager servlet context to: /rest
stor2/communities.xml
WARN Could not process entity: SQL error (500)[null]: Internal server error

The dspace log shows:

2012-02-22 10:45:55,996 WARN  org.dspace.storage.rdbms.DataSourceInit  
@ Exception initializing DB pool
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
 at  
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
 at  
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:186)
 at  
org.dspace.storage.rdbms.DataSourceInit.getDatasource(DataSourceInit.java:38)
 at  
org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1513)
 at  
org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:585)
 at org.dspace.core.Context.(Context.java:95)
.
.
.
I've set the logging level to FINE and verified that the proper  
dspace.cfg is working. I've searched the dspace open issue database  
and the web but haven't found anything.

What am I missing? Any suggestions will be much appreciated.

Thanks very much,
Maury Bouchard
Simmons College, GSLIS



--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


[Dspace-tech] DSpaceI18NTransformer error (v1.6.1) Error obtaining catalogue 'messages'

2011-12-09 Thread maurice . bouchard
Greetings,

I've inherited a DSpace 1.6.1 repository and we're having problems  
with the XMLUI.  Specifically, variable *names* like  
xmlui.ArtifactBrowser.FrontPageSearch.para1 for example are displaying  
in the web browser instead of the *data* contained therein.  Here's a  
snippet of the html via view source:
xmlui.general.dspace_home





 

xmlui.general.dspace_home
xmlui.dri2xhtml.structural.head-subtitle


xmlui.general.dspace_home




xmlui.dri2xhtml.structural.login




You can view site at http://melba.simmons.edu:8080/xmlui

The dspace.log has the following error:
at  
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:437)
 at java.lang.Thread.run(Thread.java:636)
Caused by: java.net.MalformedURLException:  
context://i18n/aspects/Statistics/ could not be found. (possible  
context problem)
 at  
org.apache.cocoon.components.source.impl.ContextSourceFactory.getSource(ContextSourceFactory.java:128)
 at  
org.apache.cocoon.components.source.CocoonSourceResolver.resolveURI(CocoonSourceResolver.java:153)
 at  
org.apache.cocoon.components.source.CocoonSourceResolver.resolveURI(CocoonSourceResolver.java:183)
 at  
org.apache.cocoon.i18n.XMLResourceBundleFactory.getSourceURI(XMLResourceBundleFactory.java:349)
 ... 214 more
2011-12-09 09:30:40,472 ERROR  
org.dspace.app.xmlui.cocoon.DSpaceI18NTransformer @ Error obtaining  
catalogue 'messages' from  <[Ljava.lang.String;@18e5a5f> for locale  
en_US
org.apache.excalibur.source.SourceNotFoundException: Cannot resolve  
catalogue base URI 
 at  
org.apache.cocoon.i18n.XMLResourceBundleFactory.getSourceURI(XMLResourceBundleFactory.java:362)
 at  
org.apache.cocoon.i18n.XMLResourceBundleFactory.getCacheKey(XMLResourceBundleFactory.java:319)
 at  
org.apache.cocoon.i18n.XMLResourceBundleFactory.getCacheKey(XMLResourceBundleFactory.java:321)
 at  
org.apache.cocoon.i18n.XMLResourceBundleFactory._select(XMLResourceBundleFactory.java:234)
 at  
org.apache.cocoon.i18n.XMLResourceBundleFactory.select(XMLResourceBundleFactory.java:203)
 at  
org.apache.cocoon.transformation.I18nTransformer$CatalogueInfo.getCatalogue(I18nTransformer.java:2273)

The last 10 lines of cocoon.log are:

2011-12-09 11:30:07,470 INFO   
org.apache.cocoon.components.source.impl.ContextSourceFactory  -  
context://i18n/aspects/Statistics/ could not be found. (possible  
context problem)
2011-12-09 11:30:07,473 INFO   
org.apache.cocoon.components.source.impl.ContextSourceFactory  -  
context://i18n/aspects/Statistics/ could not be found. (possible  
context problem)
2011-12-09 11:30:07,475 INFO   
org.apache.cocoon.components.source.impl.ContextSourceFactory  -  
context://i18n/aspects/Statistics/ could not be found. (possible  
context problem)
2011-12-09 11:30:07,477 INFO   
org.apache.cocoon.components.source.impl.ContextSourceFactory  -  
context://i18n/aspects/Statistics/ could not be found. (possible  
context problem)
2011-12-09 11:30:07,481 INFO   
org.apache.cocoon.components.source.impl.ContextSourceFactory  -  
context://i18n/aspects/Statistics/ could not be found. (possible  
context problem)
2011-12-09 11:30:07,483 INFO   
org.apache.cocoon.components.source.impl.ContextSourceFactory  -  
context://i18n/aspects/Statistics/ could not be found. (possible  
context problem)
2011-12-09 11:30:07,485 INFO   
org.apache.cocoon.components.source.impl.ContextSourceFactory  -  
context://i18n/aspects/Statistics/ could not be found. (possible  
context problem)
2011-12-09 11:30:07,488 INFO  cocoon.access  - '' Processed by Apache  
Cocoon in 123 milliseconds.
2011-12-09 11:30:07,499 INFO  cocoon.access  -  
'themes/Reference/lib/style.css' Processed by Apache Cocoon in 3  
milliseconds.
2011-12-09 11:30:07,512 INFO  cocoon.access  -  
'themes/Reference/images/manakin_logo.jpg' Processed by Apache Cocoon  
in 2 milliseconds.


I've checked the tech list archives and Nabble but haven't found this  
problem reported before.  We have likely misconfigured something but,  
after several hours of searching and educating myself on jetty,  
dspace, log4j, etc I'm at a loss. Has anyone seen this before?  I'd  
appreciate some advice on where to look.

Thanks very much.
Maury Bouchard
Simmons College
GSLIS



--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech