incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Strässer (JIRA) <j...@apache.org>
Subject [jira] Issue Comment Edited: (CLEREZZA-197) TDB + ConcurrentModificationException
Date Mon, 03 May 2010 11:17:57 GMT

    [ https://issues.apache.org/jira/browse/CLEREZZA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863306#action_12863306
] 

Oliver Strässer edited comment on CLEREZZA-197 at 5/3/10 7:17 AM:
------------------------------------------------------------------


I lock the graph, but get  ConcurrentModificationException

  @GET
    @Path("restorePDF")
    public Response restorePDF() {
        logger.info("restorePDF");
        LockableMGraph graph = googleAlertsProvider.getBundleGraph();

        UriRef pdfFile = new UriRef("http://clerezza.org/2009/12/googleAlerts#pdfFile");

        Lock lockW = graph.getLock().writeLock();
        lockW.lock();
        try {
            Iterator<Triple> pdfFileIter = graph.filter(null, pdfFile, null);
            while (pdfFileIter.hasNext()) {
                GraphNode entry = new GraphNode(pdfFileIter.next().getSubject(), graph);
                Iterator<UriRef> pdfFiles = entry.getUriRefObjects(pdfFile);
                while (pdfFiles.hasNext()) {
                    UriRef uriRef = pdfFiles.next();
                    UriRef uriRefTested = (UriRef) entry.getNode();
                    logger.info(uriRefTested.getUnicodeString());
                    entry.deleteProperties(PDFCREATOR.pdfFile);
                    entry.addProperty(PDFCREATOR.pdfFile, uriRef);
                    entry.deleteProperties(pdfFile);
                    entry.addProperty(PDFCREATOR.pdfFileTested, uriRefTested);
                }
            }


        } finally {
            lockW.unlock();
            logger.info("fertig");
        }
        return Response.status(Status.ACCEPTED).build();


    }


The String "fertig" is printed on at the console



java.util.ConcurrentModificationException
	at com.hp.hpl.jena.tdb.store.GraphTDBBase$MapperIteratorTriples.checkCourrentModification(GraphTDBBase.java:209)
	at com.hp.hpl.jena.tdb.store.GraphTDBBase$MapperIteratorTriples.hasNext(GraphTDBBase.java:217)
	at org.apache.clerezza.rdf.jena.storage.JenaGraphAdaptor$1.hasNext(JenaGraphAdaptor.java:80)
	at org.apache.clerezza.rdf.core.impl.AbstractTripleCollection$1.hasNext(AbstractTripleCollection.java:77)
	at org.apache.clerezza.rdf.core.access.LockingIterator.hasNext(LockingIterator.java:47)
	at net.getunik.clerezza.app.google.alerts.gui.GoogleAlertsGui.restorePDF(GoogleAlertsGui.java:774)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.clerezza.triaxrs.RootResourceExecutorImpl.handleWithMethod(RootResourceExecutorImpl.java:471)
	at org.apache.clerezza.triaxrs.RootResourceExecutorImpl.execute(RootResourceExecutorImpl.java:121)
	at org.apache.clerezza.triaxrs.JaxRsHandler.handle(JaxRsHandler.java:502)
	at org.wymiwyg.wrhapi.util.pathmappings.PathMappingHandler$RegisteredHandler.handle(PathMappingHandler.java:127)
	at org.wymiwyg.wrhapi.util.pathmappings.PathMappingHandler.handle(PathMappingHandler.java:102)
	at org.apache.clerezza.platform.security.auth.AuthenticatingFilter$1.run(AuthenticatingFilter.java:94)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
	at org.apache.clerezza.platform.security.auth.AuthenticatingFilter.handle(AuthenticatingFilter.java:90)
	at org.wymiwyg.wrhapi.filter.impl.FilterRunner.handle(FilterRunner.java:56)
	at org.apache.clerezza.platform.xhtml2html.Xhtml2HtmlFilter.handle(Xhtml2HtmlFilter.java:73)
	at org.wymiwyg.wrhapi.filter.impl.FilterRunner.handle(FilterRunner.java:56)
	at org.wymiwyg.wrhapi.osgi.OsgiWebServerFactory$1.service(OsgiWebServerFactory.java:76)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpServiceContext.java:111)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)


      was (Author: osr):
    java.util.ConcurrentModificationException
	at com.hp.hpl.jena.tdb.store.GraphTDBBase$MapperIteratorTriples.checkCourrentModification(GraphTDBBase.java:209)
	at com.hp.hpl.jena.tdb.store.GraphTDBBase$MapperIteratorTriples.hasNext(GraphTDBBase.java:217)
	at org.apache.clerezza.rdf.jena.storage.JenaGraphAdaptor$1.hasNext(JenaGraphAdaptor.java:80)
	at org.apache.clerezza.rdf.core.impl.AbstractTripleCollection$1.hasNext(AbstractTripleCollection.java:77)
	at org.apache.clerezza.rdf.core.access.LockingIterator.hasNext(LockingIterator.java:47)
	at net.getunik.clerezza.app.google.alerts.gui.GoogleAlertsGui.restorePDF(GoogleAlertsGui.java:774)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.clerezza.triaxrs.RootResourceExecutorImpl.handleWithMethod(RootResourceExecutorImpl.java:471)
	at org.apache.clerezza.triaxrs.RootResourceExecutorImpl.execute(RootResourceExecutorImpl.java:121)
	at org.apache.clerezza.triaxrs.JaxRsHandler.handle(JaxRsHandler.java:502)
	at org.wymiwyg.wrhapi.util.pathmappings.PathMappingHandler$RegisteredHandler.handle(PathMappingHandler.java:127)
	at org.wymiwyg.wrhapi.util.pathmappings.PathMappingHandler.handle(PathMappingHandler.java:102)
	at org.apache.clerezza.platform.security.auth.AuthenticatingFilter$1.run(AuthenticatingFilter.java:94)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
	at org.apache.clerezza.platform.security.auth.AuthenticatingFilter.handle(AuthenticatingFilter.java:90)
	at org.wymiwyg.wrhapi.filter.impl.FilterRunner.handle(FilterRunner.java:56)
	at org.apache.clerezza.platform.xhtml2html.Xhtml2HtmlFilter.handle(Xhtml2HtmlFilter.java:73)
	at org.wymiwyg.wrhapi.filter.impl.FilterRunner.handle(FilterRunner.java:56)
	at org.wymiwyg.wrhapi.osgi.OsgiWebServerFactory$1.service(OsgiWebServerFactory.java:76)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpServiceContext.java:111)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)

  
> TDB + ConcurrentModificationException
> -------------------------------------
>
>                 Key: CLEREZZA-197
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-197
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Oliver Strässer
>            Priority: Blocker
>
> After I changed the Actioncenter from sesame to tdb, i got the following Error:
> java.util.ConcurrentModificationException
>         at com.hp.hpl.jena.tdb.store.GraphTDBBase$MapperIteratorTriples.checkCourrentModification(GraphTDBBase.java:209)
>         at com.hp.hpl.jena.tdb.store.GraphTDBBase$MapperIteratorTriples.hasNext(GraphTDBBase.java:217)
>         at org.apache.clerezza.rdf.jena.storage.JenaGraphAdaptor$1.hasNext(JenaGraphAdaptor.java:80)
>         at org.apache.clerezza.rdf.core.impl.AbstractTripleCollection$1.hasNext(AbstractTripleCollection.java:77)
>         at org.apache.clerezza.rdf.core.access.LockingIterator.hasNext(LockingIterator.java:47)
>         at 
> This problem occurs many times on different places and variations. 
> An error in the same category (i can't reproduce the situation) - occurs while reading
the graph an iterating through the graph - with hasnext / next
> the exceptions was something like "elemntmnotfound" at the next(method).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message