On 23/08/16 17:07, Abduladem Eljamel wrote:
Thanks AndySorry, it could be a basic question. I could not understand what I
have done wrong to make my project call old jena library. I removed all jena
2.11 libraries from my project but I still get this exception.
ThanksAbdul
There is some incompatible jar on the runtime execution classpath.
https://docs.oracle.com/javase/8/docs/api/java/lang/NoSuchMethodError.html
In 2.11, org.apache.jena.atlas.lib.Cache was in jena-arq. In Jena 3.1.0,
it is in jena-base.
Some org.apache.jena.atlas.lib.Cache is on the classpath, maybe multiple
times. The first one found is not compatible though.
Something is still wrong with the setup but theer is no evidence as to
what in the emails.
Andy
From: Andy Seaborne <[email protected]>
To: [email protected]
Sent: Tuesday, 23 August 2016, 16:06
Subject: Re: No Such Method Error
On 23/08/16 15:08, Abduladem Eljamel wrote:
Hi ALL
I have migrated from Jena 2.11 to Jena 3.1.0 Lately. After modifying my code
to fit JENA 3.1.0 I have gotten this error exception:
java.lang.NoSuchMethodError:
org.apache.jena.atlas.lib.Cache.getIfPresent(Ljava/lang/Object;)Ljava/lang/Object;
After searching the jena-users mailing list, I found that it had to do with
different versions of Jean being found in the classpath or one of jena
libraries in my code calling an old class it didn't have the method. I tried
with my best knowledge (which is not enough) to find a solution, but I have
failed. the only thing I could find is that the method wich are responsible for
this error in my could is:
OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM,
null);
Could any one help me please.
Thanks in Advance
Abdul
What you found searching the list is correct.
In Jena 3.1.0, the Cache class is in the jena-base jar.
Andy