You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Md. Mizanur Rahoman" <md...@gmail.com> on 2012/05/23 12:11:18 UTC

Trying to run LARQ Example ExLucene1, but having problem -> Exception in thread "main" java.lang.NoSuchFieldError: DEFAULT_TERMS_INDEX_DIVISOR from IndexBuilderString larqBuilder = new IndexBuilderString() ;

Dear Concern,

I am trying to run LARQ example ExLucene1 from

https://svn.apache.org/repos/asf/jena/trunk/jena-larq/src/test/java/org/apache/jena/larq/examples/ExLucene1.java

But having problem

Exception in thread "main" java.lang.NoSuchFieldError:
DEFAULT_TERMS_INDEX_DIVISOR from  IndexBuilderString larqBuilder = new
IndexBuilderString() ;


I found two patches
(LUCENE-2356.patch<https://issues.apache.org/jira/secure/attachment/12446064/LUCENE-2356.patch>,
LUCENE_1909.patch) from Lucene, though might not be for LARQ, and applied;
still the problem exists. Need help.


*Here is the output:*

ARQ Example: ExLucene1
ARQ: 2.8.7

Exception in thread "main" java.lang.NoSuchFieldError:
DEFAULT_TERMS_INDEX_DIVISOR
    at
org.apache.lucene.index.IndexWriterConfig.<clinit>(IndexWriterConfig.java:93)
    at
org.apache.jena.larq.IndexWriterFactory.create(IndexWriterFactory.java:33)
    at
org.apache.jena.larq.IndexBuilderBase.makeIndex(IndexBuilderBase.java:87)
    at
org.apache.jena.larq.IndexBuilderBase.<init>(IndexBuilderBase.java:50)
    at
org.apache.jena.larq.IndexBuilderNode.<init>(IndexBuilderNode.java:45)
    at
org.apache.jena.larq.IndexBuilderModel.<init>(IndexBuilderModel.java:45)
    at
org.apache.jena.larq.IndexBuilderLiteral.<init>(IndexBuilderLiteral.java:40)
    at
org.apache.jena.larq.IndexBuilderString.<init>(IndexBuilderString.java:37)
    at virtuosoSPARQLExample1.ExLucene1.buildIndex(ExLucene1.java:56)
    at virtuosoSPARQLExample1.ExLucene1.main(ExLucene1.java:35)


-- 

*Md Mizanur Rahoman*

Re: Fwd: Trying to run LARQ Example ExLucene1, but having problem -> Exception in thread "main" java.lang.NoSuchFieldError: DEFAULT_TERMS_INDEX_DIVISOR from IndexBuilderString larqBuilder = new IndexBuilderString() ;

Posted by Andy Seaborne <an...@apache.org>.
See the reply from Paolo after your first message.

Archive:
http://mail-archives.apache.org/mod_mbox/jena-users/

Reply
http://mail-archives.apache.org/mod_mbox/jena-users/201205.mbox/%3C4FBCC70E.6050200%40googlemail.com%3E

	Andy

On 24/05/12 01:58, Md. Mizanur Rahoman wrote:
> -- Sorry, If you get this mail twice. As it's first time to this group, I
> am not used to ... ----------------
>
> Dear Concern,
>
> I am trying to run LARQ example ExLucene1 from
>
> https://svn.apache.org/repos/asf/jena/trunk/jena-larq/src/test/java/org/apache/jena/larq/examples/ExLucene1.java
>
> But having problem
>
> Exception in thread "main" java.lang.NoSuchFieldError:
> DEFAULT_TERMS_INDEX_DIVISOR from  IndexBuilderString larqBuilder = new
> IndexBuilderString() ;
>
>
> I found two patches
> (LUCENE-2356.patch<https://issues.apache.org/jira/secure/attachment/12446064/LUCENE-2356.patch>,
> LUCENE_1909.patch) from Lucene, though might not be for LARQ, and applied;
> still the problem exists. Need help.
>
>
> *Here is the output:*
>
> ARQ Example: ExLucene1
> ARQ: 2.8.7
>
> Exception in thread "main" java.lang.NoSuchFieldError:
> DEFAULT_TERMS_INDEX_DIVISOR
>      at
> org.apache.lucene.index.IndexWriterConfig.<clinit>(IndexWriterConfig.java:93)
>      at
> org.apache.jena.larq.IndexWriterFactory.create(IndexWriterFactory.java:33)
>      at
> org.apache.jena.larq.IndexBuilderBase.makeIndex(IndexBuilderBase.java:87)
>      at
> org.apache.jena.larq.IndexBuilderBase.<init>(IndexBuilderBase.java:50)
>      at
> org.apache.jena.larq.IndexBuilderNode.<init>(IndexBuilderNode.java:45)
>      at
> org.apache.jena.larq.IndexBuilderModel.<init>(IndexBuilderModel.java:45)
>      at
> org.apache.jena.larq.IndexBuilderLiteral.<init>(IndexBuilderLiteral.java:40)
>      at
> org.apache.jena.larq.IndexBuilderString.<init>(IndexBuilderString.java:37)
>      at virtuosoSPARQLExample1.ExLucene1.buildIndex(ExLucene1.java:56)
>      at virtuosoSPARQLExample1.ExLucene1.main(ExLucene1.java:35)
>
>


Re: Fwd: Trying to run LARQ Example ExLucene1, but having problem -> Exception in thread "main" java.lang.NoSuchFieldError: DEFAULT_TERMS_INDEX_DIVISOR from IndexBuilderString larqBuilder = new IndexBuilderString() ;

Posted by Paolo Castagna <ca...@googlemail.com>.
Md. Mizanur Rahoman wrote:
> -- Sorry, If you get this mail twice. As it's first time to this group, I
> am not used to ... ----------------

No, problem.

Make sure you follow instructions to correctly subscribe to the Jena users
mailing list. Here: http://jena.apache.org/help_and_support/

By the way, I replied yesterday to your question. Here:
http://markmail.org/message/ag47rwbtaupvloej

Paolo


Fwd: Trying to run LARQ Example ExLucene1, but having problem -> Exception in thread "main" java.lang.NoSuchFieldError: DEFAULT_TERMS_INDEX_DIVISOR from IndexBuilderString larqBuilder = new IndexBuilderString() ;

Posted by "Md. Mizanur Rahoman" <md...@gmail.com>.
-- Sorry, If you get this mail twice. As it's first time to this group, I
am not used to ... ----------------

Dear Concern,

I am trying to run LARQ example ExLucene1 from

https://svn.apache.org/repos/asf/jena/trunk/jena-larq/src/test/java/org/apache/jena/larq/examples/ExLucene1.java

But having problem

Exception in thread "main" java.lang.NoSuchFieldError:
DEFAULT_TERMS_INDEX_DIVISOR from  IndexBuilderString larqBuilder = new
IndexBuilderString() ;


I found two patches
(LUCENE-2356.patch<https://issues.apache.org/jira/secure/attachment/12446064/LUCENE-2356.patch>,
LUCENE_1909.patch) from Lucene, though might not be for LARQ, and applied;
still the problem exists. Need help.


*Here is the output:*

ARQ Example: ExLucene1
ARQ: 2.8.7

Exception in thread "main" java.lang.NoSuchFieldError:
DEFAULT_TERMS_INDEX_DIVISOR
    at
org.apache.lucene.index.IndexWriterConfig.<clinit>(IndexWriterConfig.java:93)
    at
org.apache.jena.larq.IndexWriterFactory.create(IndexWriterFactory.java:33)
    at
org.apache.jena.larq.IndexBuilderBase.makeIndex(IndexBuilderBase.java:87)
    at
org.apache.jena.larq.IndexBuilderBase.<init>(IndexBuilderBase.java:50)
    at
org.apache.jena.larq.IndexBuilderNode.<init>(IndexBuilderNode.java:45)
    at
org.apache.jena.larq.IndexBuilderModel.<init>(IndexBuilderModel.java:45)
    at
org.apache.jena.larq.IndexBuilderLiteral.<init>(IndexBuilderLiteral.java:40)
    at
org.apache.jena.larq.IndexBuilderString.<init>(IndexBuilderString.java:37)
    at virtuosoSPARQLExample1.ExLucene1.buildIndex(ExLucene1.java:56)
    at virtuosoSPARQLExample1.ExLucene1.main(ExLucene1.java:35)


-- 

*Md Mizanur Rahoman*




-- 

*Md Mizanur Rahoman*
PhD Student
The Graduate University for Advanced Studies
National Institute of Informatics
2-1-2 Hitotsubashi, Chiyoda-ku,
Tokyo 101-8430, Japan.
Cell # +81-80-4076-9044
email: mizan@nii.ac.jp
Web: http://www.nii.ac.jp/en/

&

Lecturer, Department of Computer Science & Engineering
Begum Rokeya University, Rangpur, Bangladesh.
email: mdmizanur.rahoman@gmail.com, mizan@brur.ac.bd
Cell # +88 01823 806618
Web: http://www.brur.ac.bd

Re: Trying to run LARQ Example ExLucene1, but having problem -> Exception in thread "main" java.lang.NoSuchFieldError: DEFAULT_TERMS_INDEX_DIVISOR from IndexBuilderString larqBuilder = new IndexBuilderString() ;

Posted by Paolo Castagna <ca...@googlemail.com>.
Hi,
good catch.

Can you, please, svn update and try again?

Now, I can run ExLucene*.java without problems.

I am not sure I understand what's going on in your case.
I am confused since I see 'ARQ: 2.9.0-incubating' printed out when I run
ExLucene1. Why do you have: 'ARQ: 2.8.7' instead?

As you can see from the LARQ's pom.xml file [1], LARQ 1.0.0-incubating depends
on ARQ 2.9.0-incubating as well as LARQ from trunk (currently) [2]

Paolo

PS:
I should also probably update LARQ's dependency to ARQ and TDB snapshots, I'll
do that soon.

 [1]
http://repo1.maven.org/maven2/org/apache/jena/jena-larq/1.0.0-incubating/jena-larq-1.0.0-incubating.pom
 [2] http://svn.apache.org/repos/asf/jena/trunk/jena-larq/pom.xml

Md. Mizanur Rahoman wrote:
> Dear Concern,
> 
> I am trying to run LARQ example ExLucene1 from
> 
> https://svn.apache.org/repos/asf/jena/trunk/jena-larq/src/test/java/org/apache/jena/larq/examples/ExLucene1.java
> 
> But having problem
> 
> Exception in thread "main" java.lang.NoSuchFieldError:
> DEFAULT_TERMS_INDEX_DIVISOR from  IndexBuilderString larqBuilder = new
> IndexBuilderString() ;
> 
> 
> I found two patches
> (LUCENE-2356.patch<https://issues.apache.org/jira/secure/attachment/12446064/LUCENE-2356.patch>,
> LUCENE_1909.patch) from Lucene, though might not be for LARQ, and applied;
> still the problem exists. Need help.
> 
> 
> *Here is the output:*
> 
> ARQ Example: ExLucene1
> ARQ: 2.8.7
> 
> Exception in thread "main" java.lang.NoSuchFieldError:
> DEFAULT_TERMS_INDEX_DIVISOR
>     at
> org.apache.lucene.index.IndexWriterConfig.<clinit>(IndexWriterConfig.java:93)
>     at
> org.apache.jena.larq.IndexWriterFactory.create(IndexWriterFactory.java:33)
>     at
> org.apache.jena.larq.IndexBuilderBase.makeIndex(IndexBuilderBase.java:87)
>     at
> org.apache.jena.larq.IndexBuilderBase.<init>(IndexBuilderBase.java:50)
>     at
> org.apache.jena.larq.IndexBuilderNode.<init>(IndexBuilderNode.java:45)
>     at
> org.apache.jena.larq.IndexBuilderModel.<init>(IndexBuilderModel.java:45)
>     at
> org.apache.jena.larq.IndexBuilderLiteral.<init>(IndexBuilderLiteral.java:40)
>     at
> org.apache.jena.larq.IndexBuilderString.<init>(IndexBuilderString.java:37)
>     at virtuosoSPARQLExample1.ExLucene1.buildIndex(ExLucene1.java:56)
>     at virtuosoSPARQLExample1.ExLucene1.main(ExLucene1.java:35)
> 
>