Re: [Dspace-tech] DSpace REST API: SQL error (500)
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)
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
Re: [Dspace-tech] DSpace REST API: SQL error (500)
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
[Dspace-tech] DSpace REST API: SQL error (500)
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