You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by "Oliver Strässer (JIRA)" <ji...@apache.org> on 2010/04/28 17:34:35 UTC

[jira] Created: (CLEREZZA-197) TDB + ConcurrentModificationException

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.


[jira] Commented: (CLEREZZA-197) TDB + ConcurrentModificationException

Posted by "Oliver Strässer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLEREZZA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863276#action_12863276 ] 

Oliver Strässer commented on CLEREZZA-197:
------------------------------------------

ConcurrentModificationException - in executeSparqlQuery()

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 org.apache.clerezza.rdf.utils.UnionMGraph$1.hasNext(UnionMGraph.java:69)
        at org.apache.clerezza.rdf.utils.UnionMGraph$1.hasNext(UnionMGraph.java:78)
        at org.apache.clerezza.rdf.core.impl.AbstractTripleCollection$1.hasNext(AbstractTripleCollection.java:77)
        at org.apache.clerezza.rdf.jena.facade.JenaGraph$1.hasNext(JenaGraph.java:91)
        at com.hp.hpl.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:64)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.hasNextBinding(QueryIterTriplePattern.java:181)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:60)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:87)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:55)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:52)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:50)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:30)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:30)
        at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
        at com.hp.hpl.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java:62)
        at org.apache.clerezza.rdf.jena.sparql.ResultSetWrapper.<init>(ResultSetWrapper.java:39)
        at org.apache.clerezza.rdf.jena.sparql.JenaSparqlEngine.execute(JenaSparqlEngine.java:68)
        at org.apache.clerezza.rdf.core.access.TcManager.executeSparqlQuery(TcManager.java:656)
        at net.getunik.clerezza.app.clips.core.ClipsProvider.refreshCLIPItems(ClipsProvider.java:513)
        at net.getunik.clerezza.app.clips.core.ClipsProvider$1$1.run(ClipsProvider.java:209)
        at java.security.AccessController.doPrivileged(Native Method)
        at net.getunik.clerezza.app.clips.core.ClipsProvider$1.run(ClipsProvider.java:201)
        at java.util.TimerThread.mainLoop(Timer.java:512)


> 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.


[jira] Commented: (CLEREZZA-197) TDB + ConcurrentModificationException

Posted by "Oliver Strässer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLEREZZA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863306#action_12863306 ] 

Oliver Strässer commented on CLEREZZA-197:
------------------------------------------

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.


[jira] Assigned: (CLEREZZA-197) TDB + ConcurrentModificationException

Posted by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLEREZZA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reto Bachmann-Gmür reassigned CLEREZZA-197:
-------------------------------------------

    Assignee: Reto Bachmann-Gmür

> TDB + ConcurrentModificationException
> -------------------------------------
>
>                 Key: CLEREZZA-197
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-197
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Oliver Strässer
>            Assignee: Reto Bachmann-Gmür
>            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.


[jira] Issue Comment Edited: (CLEREZZA-197) TDB + ConcurrentModificationException

Posted by "Oliver Strässer (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Issue Comment Edited: (CLEREZZA-197) TDB + ConcurrentModificationException

Posted by "Oliver Strässer (JIRA)" <ji...@apache.org>.
    [ 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:33 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


Line 774:      logger.info(uriRefTested.getUnicodeString());


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):
    
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)

  
> 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.


[jira] Closed: (CLEREZZA-197) TDB + ConcurrentModificationException

Posted by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLEREZZA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reto Bachmann-Gmür closed CLEREZZA-197.
---------------------------------------

    Resolution: Won't Fix

Its responsability of the application to do appropriate read-locks. A separate issue is sparql, I've created CLEREZZA-252

> TDB + ConcurrentModificationException
> -------------------------------------
>
>                 Key: CLEREZZA-197
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-197
>             Project: Clerezza
>          Issue Type: Bug
>            Reporter: Oliver Strässer
>            Assignee: Reto Bachmann-Gmür
>            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.