Hi, I'm running dspace 3.0 using xmlui.
I recently had to make a change to AbstractAdapter.java as I needed a
change in my mets. I'm adding a "fake" fileSec section for certain
items. I run a simple db query via the DatabaseManager class to
determine which items.
Context context = new Context();
String query = "select metadatavalue.text_value from metadatavalue where
item_id=" + item_id + " and metadatavalue.metadata_field_id=1";
TableRow row = DatabaseManager.querySingle(context, query );
String result = row.getStringColumn("text_value");
Now I am getting this error a lot.
java.util.NoSuchElementException: Timeout waiting for idle object
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjec
tPool.java:958)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSourc
e.java:106)
at
org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.j
ava:588)
at org.dspace.core.Context.<init>(Context.java:90)
at
org.dspace.app.xmlui.utils.ContextUtil.obtainContext(ContextUtil.java:89
)
at
org.dspace.app.xmlui.utils.ContextUtil.obtainContext(ContextUtil.java:54
)
at
org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer.setup(AbstractDSpa
ceTransformer.java:78)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invo
ke(PoolableProxyHandler.java:71)
at $Proxy24.setup(Unknown Source)
...
I assume this has to do with the Context? Is there a better way of
running my query or resolving my issue ?
Matthew Drover
Programmer Consultant
Immersive Technology
Distance Education, Learning and Teaching Support
Memorial University of Newfoundland
P. 709 864-6265
F. 709 864-7941
This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette