Hi everybody,

I am working on REST module for DSpace. In my servlet I am using the following 
code to access the list of communities (simplified):

    Context context = null;
    context = new Context();
    Collection[] communities = null;
    communities = Collection.findAll(context);

It is not working (communities not initialized), and after checking with 
exceptions I have got the following message:

org.postgresql.util.PSQLException: ERROR: relation "handle" does not exist

If there are no communities then variable communities is initialized and 
contain 0 elements. So, this is as expected.

I am using it on dspace-dao-prototype which is still in development phase.

Has someone idea what may be causing this, or to point me in right direction 
where to find error further?

Thanks
Bojan


Attached is stacktrace:

INFO: Server startup in 22551 ms
Jul 23, 2009 4:46:49 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jul 23, 2009 4:46:52 PM org.apache.catalina.core.StandardContext 
addApplicationListener
INFO: The listener "org.apache.commons.fileupload.servlet.FileCleanerCleanup" 
is already configured for this context. The duplicate definition has been 
ignored.
Jul 23, 2009 4:46:52 PM org.apache.catalina.core.StandardContext 
addApplicationListener
INFO: The listener "org.dspace.app.util.DSpaceContextListener" is already 
configured for this context. The duplicate definition has been ignored.
INFO: Loading provided config file: /dspace/config/dspace.cfg
INFO: Using dspace provided log configuration (log.init.config)
INFO: Loading: /dspace/config/log4j.properties
Jul 23, 2009 4:46:53 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
  org.dspace.rest.resources
Jul 23, 2009 4:46:53 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Root resource classes found:
  class org.dspace.rest.resources.Communities
Jul 23, 2009 4:46:53 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Provider classes found:
org.postgresql.util.PSQLException: ERROR: relation "handle" does not exist
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1531)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1313)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:258)
        at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
        at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
        at 
org.dspace.storage.rdbms.DatabaseManager.query(DatabaseManager.java:221)
        at 
org.dspace.storage.rdbms.DatabaseManager.querySingle(DatabaseManager.java:302)
        at 
org.dspace.handle.HandleManager.getHandleInternal(HandleManager.java:369)
        at org.dspace.handle.HandleManager.findHandle(HandleManager.java:306)
        at org.dspace.content.Collection.<init>(Collection.java:169)
        at org.dspace.content.Collection.findAll(Collection.java:306)
        at 
org.dspace.rest.resources.Communities.getClichedMessage(Communities.java:29)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at 
com.sun.jersey.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:136)
        at 
com.sun.jersey.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:85)
        at 
com.sun.jersey.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:123)
        at 
com.sun.jersey.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
        at 
com.sun.jersey.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
        at 
com.sun.jersey.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
        at 
com.sun.jersey.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:722)
        at 
com.sun.jersey.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:692)
        at 
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:344)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:636)




      

------------------------------------------------------------------------------
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to