On 31/10/11 16:34, Simon Helsen wrote:
Hi all,

very sometimes (it is a rare and impossibly difficult to reproduce) we run
into a problem which I can only explain by a concurrency violation. The
stack trace we typically encounter is below. I know that the concrete NPE
which comes as a result is specific to the IBM JDK because of the way they
implement LinkedHashMap, but the bug is not theirs. That the Sun SDK does
not immediately expose the issue is mere luck. Looking at the IRIResolver
code, it seems to me that the cache inside the IRIResolveNormal (
resolvedIRIs) ought to be using a concurrent linked hashMap since there is
only one global cache which can be used by many threads.

Any thoughts?

There is no such operation IRIResolver.resolveGlobalToString anymore. Which version are you using?

Use of private static "globalResolver" may need protecting (see the current system) which has one IRIResolverNormal - there may be others and the class itself IRIResolverNormal does not need it (it has no statics) and there are ways to create new ones.

        Andy


Thanks

Simon

java.lang.NullPointerException
         at java.util.LinkedHashMap.get(LinkedHashMap.java:324)
         at org.openjena.atlas.lib.cache.CacheLRU.get(CacheLRU.java:41)
         at
org.openjena.atlas.lib.cache.CacheWrapper.get(CacheWrapper.java:29)
         at
org.openjena.atlas.lib.cache.CacheWithGetter.get(CacheWithGetter.java:26)
         at
org.openjena.riot.IRIResolver$IRIResolverNormal.resolveSilent(IRIResolver.java:377)
         at
org.openjena.riot.IRIResolver$IRIResolverNormal.resolveToString(IRIResolver.java:363)
         at
org.openjena.riot.IRIResolver.resolveGlobalToString(IRIResolver.java:78)
         at
org.openjena.riot.JenaReaderRIOT.readImpl(JenaReaderRIOT.java:121)
         at org.openjena.riot.JenaReaderRIOT.read(JenaReaderRIOT.java:40)
         at
com.ibm.team.jfs.indexing.service.internal.rdf.RDFUtil.readNTriples(RDFUtil.java:166)

Reply via email to