Allocate exception for servlet search

  • Amrita Lakshmi

    Amrita Lakshmi - 2012-12-17

    I've installed wikipedia miner's Java API and it is working correctly. Then I deployed the war file on my tomcat 7 and if I try http://localhost:8080/wikipediaminer/services/ , it works and prints out the html. But when I try to access the search service as in http://localhost:8080/wikipediaminer/services/search?query=education,  I get exceptions with root cause displayed as: Couldn't get lock for /wikipedia-miner-1.2.0/db/

    In my db directory, I can see files called and but they are 0 bytes long.
    Any pointers as to what may be going wrong? Here is the log:

    SEVERE: Allocate exception for servlet search Couldn't get lock for /media/ephemeral0/wikipedia-miner-1.2.0/db/
            at java.util.logging.FileHandler.openFiles(
            at java.util.logging.FileHandler.<init>(
            at org.wikipedia.miner.db.WEnvironment.<init>(Unknown Source)
            at org.wikipedia.miner.model.Wikipedia.<init>(Unknown Source)
            at org.wikipedia.miner.service.ServiceHub.<init>(Unknown Source)
            at org.wikipedia.miner.service.ServiceHub.getInstance(Unknown Source)
            at org.wikipedia.miner.service.Service.init(Unknown Source)
            at org.apache.catalina.core.StandardWrapper.initServlet(
            at org.apache.catalina.core.StandardWrapper.loadServlet(
            at org.apache.catalina.core.StandardWrapper.allocate(
            at org.apache.catalina.core.StandardWrapperValve.invoke(
            at org.apache.catalina.core.StandardContextValve.invoke(
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
            at org.apache.catalina.core.StandardHostValve.invoke(
            at org.apache.catalina.valves.ErrorReportValve.invoke(
            at org.apache.catalina.valves.AccessLogValve.invoke(
            at org.apache.catalina.core.StandardEngineValve.invoke(
            at org.apache.catalina.connector.CoyoteAdapter.service(
            at org.apache.coyote.http11.AbstractHttp11Processor.process(
            at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
            at java.util.concurrent.ThreadPoolExecutor.runWorker(
            at java.util.concurrent.ThreadPoolExecutor$

  • Edgar Meij

    Edgar Meij - 2012-12-17

    Yes, you can delete those files safely and try again.

  • Amrita Lakshmi

    Amrita Lakshmi - 2012-12-19

    Thanks for you input ejmeij.
    The service didn't have permission to create the file in the db directory. Once I changed the permissions, it got fixed.

    BTW, if you have hosted this service yourself, could you tell me how to change the responseFormat parameter to json? It works directly on the original service by just adding &responseFormat=json but when I try this on the service I hosted, it still gives me an xml output.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks