Carmen

It would be helpful if you showed us what you are doing, otherwise we can
only guess and offer vague suggestions.

Assuming you are using Maven as previously stated please provide the
<dependencies> section of your POM

It is also worth running mvn dependency:tree and checking that you don't
have multiple entries for Jena libraries present.  Including the output of
this would also help us debug your problem

Rob

On 29/07/2014 12:08, "Carmen Manzulli" <[email protected]> wrote:

>i've proved with jena-arq and jena-core 2.12.0 but these don't fix my
>problem...the output is the same:
>
>NoClassDefFoundError: com/hp/hpl/jena/shared/PrefixMapping
>
>
>can you suggest me a right way to insert jena as dependency keeping in
>mind
>that i need only Query and QueryFactory classes?
>
>
>2014-07-28 18:21 GMT+02:00 Andy Seaborne <[email protected]>:
>
>> On 28/07/14 16:36, Carmen Manzulli wrote:
>>
>>> ok....i'm using giraph 1.1.0, hadoop 1.2.1  jena arq 2.12.0 and
>>> com.hp.hpl.jena 2.8.8; I've introduced the last one because there were
>>> class not found exceptions for query and queryfactory....i make use of
>>> these two classes to implement a simple select  and just for the moment
>>> i'm
>>> using select* as query string to test the code!
>>>
>>
>> jena arq 2.12.0 and jena-core 2.8.8 don't mix.
>>
>> Use a consistent cut of jena.
>>
>>         Andy
>>
>>
>>
>>>
>>> 2014-07-28 16:43 GMT+02:00 Andy Seaborne <[email protected]>:
>>>
>>>  On 28/07/14 15:00, Carmen Manzulli wrote:
>>>>
>>>>  Hi experts,
>>>>>
>>>>> i'm trying to use some jena classes (as Query and QueryFactory) in a
>>>>> project  but when i run my code i get:
>>>>>
>>>>>    java.lang.NoClassDefFoundError:
>>>>> com/hp/hpl/jena/shared/PrefixMapping$IllegalPrefixException
>>>>>          at com.hp.hpl.jena.query.QueryFactory.create(
>>>>> QueryFactory.java:68)
>>>>>          at com.hp.hpl.jena.query.QueryFactory.create(
>>>>> QueryFactory.java:40)
>>>>>          at com.hp.hpl.jena.query.QueryFactory.create(
>>>>> QueryFactory.java:28)
>>>>>          at sisinflab.Query2.compute(Query2.java:27)
>>>>>
>>>>> and also :
>>>>>
>>>>> java.lang.ClassNotFoundException:
>>>>> com.hp.hpl.jena.shared.PrefixMapping$IllegalPrefixException
>>>>>          at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>>>>>          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>>>>>          at java.security.AccessController.doPrivileged(Native
>>>>>Method)
>>>>>          at 
>>>>>java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>>>>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>>>>>          at sun.misc.Launcher$AppClassLoader.loadClass(
>>>>> Launcher.java:308)
>>>>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>>>>>          ... 12 more
>>>>>
>>>>> who can help me?
>>>>>
>>>>>
>>>> "NoClassDefFoundError" means it was there are compile time (of Jena)
>>>>and
>>>> not at runtime (of your code).
>>>>
>>>> You have an incomplete or incompatible set of jars files.
>>>>
>>>>          Andy
>>>>
>>>> PS Please could you include things like version numbers (needed for
>>>>line
>>>> numbers to mean anything), the query in question, etc when describing
>>>> something.
>>>>
>>>>
>>>>
>>>>>
>>>>
>>>
>>




Reply via email to