You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by semantickyweb <li...@semantickyweb.sk> on 2011/08/23 12:45:29 UTC

java.util.ConcurrentModificationException while loading multiple files to TDB

Dear sirs,

I want to import multiple files in to the TDB, therefore I created this
code:

Model model =
TDBFactory.createModel("/home/futuros/tdb-root/sestate-0.5.3/");
InputStream in = FileManager.get().open("myowlfile1.owl");
model.read(in,"");
InputStream in = FileManager.get().open("myowlfile2.owl");
model.read(in,"");
model.close();

The code works only when I import only one file. In other case, the
system returns:

Exception in thread "main" java.util.ConcurrentModificationException:
Iterator: started at 76, now 77.

Could you please help me?  I apologize if this was already discussed.
regards
Miroslav Liska


Re: java.util.ConcurrentModificationException while loading multiple files to TDB

Posted by Ian Dickinson <ia...@epimorphics.com>.
On 23/08/11 12:22, Ian Dickinson wrote:
> Hello Miroslav,
>
> On 23/08/11 11:45, semantickyweb wrote:
>> Dear sirs,
>>
>> I want to import multiple files in to the TDB, therefore I created this
>> code:
>>
>> Model model =
>> TDBFactory.createModel("/home/futuros/tdb-root/sestate-0.5.3/");
>> InputStream in = FileManager.get().open("myowlfile1.owl");
>> model.read(in,"");
>> InputStream in = FileManager.get().open("myowlfile2.owl");
>> model.read(in,"");
>> model.close();
>>
>> The code works only when I import only one file. In other case, the
>> system returns:
>>
>> Exception in thread "main" java.util.ConcurrentModificationException:
>> Iterator: started at 76, now 77.

Closing this thread after some off-list dialogue, this is a bug that is 
fixed in the latest version of TDB (0.8.11-SNAPSHOT from the repo-dev 
maven repository on openjena.org)

Ian


-- 
____________________________________________________________
Ian Dickinson                   Epimorphics Ltd, Bristol, UK
mailto:ian@epimorphics.com        http://www.epimorphics.com
cell: +44-7786-850536              landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd.  is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
               Portishead, Bristol BS20 6PT, UK


Re: java.util.ConcurrentModificationException while loading multiple files to TDB

Posted by Ian Dickinson <ia...@epimorphics.com>.
Hello Miroslav,

On 23/08/11 11:45, semantickyweb wrote:
> Dear sirs,
>
> I want to import multiple files in to the TDB, therefore I created this
> code:
>
> Model model =
> TDBFactory.createModel("/home/futuros/tdb-root/sestate-0.5.3/");
> InputStream in = FileManager.get().open("myowlfile1.owl");
> model.read(in,"");
> InputStream in = FileManager.get().open("myowlfile2.owl");
> model.read(in,"");
> model.close();
>
> The code works only when I import only one file. In other case, the
> system returns:
>
> Exception in thread "main" java.util.ConcurrentModificationException:
> Iterator: started at 76, now 77.
I'm afraid there's not enough information there to give any useful 
advice. Can you please either post a complete minimal example of the 
not-working code (something that we can run to see what's going on) or 
at the very least please post the full details of the stacktrace from 
the ConcurrentModificationException

Ian

-- 
____________________________________________________________
Ian Dickinson                   Epimorphics Ltd, Bristol, UK
mailto:ian@epimorphics.com        http://www.epimorphics.com
cell: +44-7786-850536              landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd.  is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
               Portishead, Bristol BS20 6PT, UK