Mailing List Archive

Cannot compile Lucene
I'm using Lucene rc4 and JavaCC 2.1. I'm trying to compile Lucene
without Ant, by tossing the files into Project Builder (Mac OS X). I
ran JavaCC on StandardTokenizer.jj with the standard options, tossed
the resulting files into the project, and now I'm running into a few
errors:

1. StandardTokenizer.jj:173 is

org.apache.lucene.analysis.Token next() throws IOException

which is JavaCC'd into StandardTokenizer.java:26 as

final public org.apache.lucene.analysis.Token next() throws
ParseException, IOException

which isn't a valid override. javac says

>next() in org.apache.lucene.analysis.standard.StandardTokenizer
>cannot override next() in org.apache.lucene.analysis.TokenStream;
>overridden method does not throw
>org.apache.lucene.analysis.standard.ParseException

2. StandardTokenizer.java:26 says

token.beginColumn,token.endColumn

and there are no such member variables.

Am I totally missing something here?

Avi

--
Avi Drissman
avi_drissman@baseview.com
Argh! This darn mailserver is trunca

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Cannot compile Lucene [ In reply to ]
I've never used project builder (netbeans on OSX), but you may want to try
not including the .jj files.

--Peter

On 4/24/02 8:02 AM, "Avi Drissman" <avi_drissman@baseview.com> wrote:

> I'm using Lucene rc4 and JavaCC 2.1. I'm trying to compile Lucene
> without Ant, by tossing the files into Project Builder (Mac OS X). I
> ran JavaCC on StandardTokenizer.jj with the standard options, tossed
> the resulting files into the project, and now I'm running into a few
> errors:
>
> 1. StandardTokenizer.jj:173 is
>
> org.apache.lucene.analysis.Token next() throws IOException
>
> which is JavaCC'd into StandardTokenizer.java:26 as
>
> final public org.apache.lucene.analysis.Token next() throws
> ParseException, IOException
>
> which isn't a valid override. javac says
>
>> next() in org.apache.lucene.analysis.standard.StandardTokenizer
>> cannot override next() in org.apache.lucene.analysis.TokenStream;
>> overridden method does not throw
>> org.apache.lucene.analysis.standard.ParseException
>
> 2. StandardTokenizer.java:26 says
>
> token.beginColumn,token.endColumn
>
> and there are no such member variables.
>
> Am I totally missing something here?
>
> Avi


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Cannot compile Lucene [ In reply to ]
At 8:40 AM -0700 4/24/02, Peter Carlson wrote:

>I've never used project builder (netbeans on OSX), but you may want to try
>not including the .jj files.

I don't include the .jj files. I compiled them with JavaCC 2.1 and
included the resulting .java files in Project Builder.

I had to do something similar where I took the existing query parser
.jj file, tweaked it, and JavaCC'd it. I had no problems compiling
the resulting .java files there.

Avi

--
Avi Drissman
avi_drissman@baseview.com
Argh! This darn mailserver is trunca

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Cannot compile Lucene [ In reply to ]
Just curious, what exactly people need to do to 'fix up the
exceptions'? Editing of which files to change what to what?

I'd just like to document that somewhere, that's why I'm asking...

Otis

--- "Robert A. Decker" <decker@robdecker.com> wrote:
> I got it working under Project Builder. You just have to fix up the
> exceptions yourself. Also, you'll get some warnings (121 warnings to
> be
> exact) during the linking stage stating that an Integer Constant is
> too
> large - just ignore these - they're wrong.
>
> thanks,
> rob
>
> http://www.robdecker.com/
> http://www.planetside.com/
>
> On Wed, 24 Apr 2002, Avi Drissman wrote:
>
> > I'm using Lucene rc4 and JavaCC 2.1. I'm trying to compile Lucene
> > without Ant, by tossing the files into Project Builder (Mac OS X).
> I
> > ran JavaCC on StandardTokenizer.jj with the standard options,
> tossed
> > the resulting files into the project, and now I'm running into a
> few
> > errors:
> >
> > 1. StandardTokenizer.jj:173 is
> >
> > org.apache.lucene.analysis.Token next() throws IOException
> >
> > which is JavaCC'd into StandardTokenizer.java:26 as
> >
> > final public org.apache.lucene.analysis.Token next() throws
> > ParseException, IOException
> >
> > which isn't a valid override. javac says
> >
> > >next() in org.apache.lucene.analysis.standard.StandardTokenizer
> > >cannot override next() in org.apache.lucene.analysis.TokenStream;
> > >overridden method does not throw
> > >org.apache.lucene.analysis.standard.ParseException
> >
> > 2. StandardTokenizer.java:26 says
> >
> > token.beginColumn,token.endColumn
> >
> > and there are no such member variables.
> >
> > Am I totally missing something here?
> >
> > Avi
> >
> > --
> > Avi Drissman
> > avi_drissman@baseview.com
> > Argh! This darn mailserver is trunca
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
>


__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Cannot compile Lucene [ In reply to ]
I'm writing a WebObjects application with Lucene and ProjectBuilder and
had to compile the Lucene project via ant and include the jar in my
project resources. Ideally, I would like to create a Framework with the
Lucene source and I haven't figured out how to get the javacc part to
work....I think it's just a hack to the build scripts in the targets
section. I will be curious to see how this is accomplished and will do
some research on this topic.

David



On Wednesday, April 24, 2002, at 11:48 AM, Avi Drissman wrote:

> At 8:40 AM -0700 4/24/02, Peter Carlson wrote:
>
>> I've never used project builder (netbeans on OSX), but you may want to
>> try
>> not including the .jj files.
>
> I don't include the .jj files. I compiled them with JavaCC 2.1 and
> included the resulting .java files in Project Builder.
>
> I had to do something similar where I took the existing query parser
> .jj file, tweaked it, and JavaCC'd it. I had no problems compiling the
> resulting .java files there.
>
> Avi
>
> -- Avi Drissman
> avi_drissman@baseview.com
> Argh! This darn mailserver is trunca
>
> --
> To unsubscribe, e-mail: <mailto:lucene-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-
> help@jakarta.apache.org>
>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Cannot compile Lucene [ In reply to ]
I got it working under Project Builder. You just have to fix up the
exceptions yourself. Also, you'll get some warnings (121 warnings to be
exact) during the linking stage stating that an Integer Constant is too
large - just ignore these - they're wrong.

thanks,
rob

http://www.robdecker.com/
http://www.planetside.com/

On Wed, 24 Apr 2002, Avi Drissman wrote:

> I'm using Lucene rc4 and JavaCC 2.1. I'm trying to compile Lucene
> without Ant, by tossing the files into Project Builder (Mac OS X). I
> ran JavaCC on StandardTokenizer.jj with the standard options, tossed
> the resulting files into the project, and now I'm running into a few
> errors:
>
> 1. StandardTokenizer.jj:173 is
>
> org.apache.lucene.analysis.Token next() throws IOException
>
> which is JavaCC'd into StandardTokenizer.java:26 as
>
> final public org.apache.lucene.analysis.Token next() throws
> ParseException, IOException
>
> which isn't a valid override. javac says
>
> >next() in org.apache.lucene.analysis.standard.StandardTokenizer
> >cannot override next() in org.apache.lucene.analysis.TokenStream;
> >overridden method does not throw
> >org.apache.lucene.analysis.standard.ParseException
>
> 2. StandardTokenizer.java:26 says
>
> token.beginColumn,token.endColumn
>
> and there are no such member variables.
>
> Am I totally missing something here?
>
> Avi
>
> --
> Avi Drissman
> avi_drissman@baseview.com
> Argh! This darn mailserver is trunca
>
> --
> To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Cannot compile Lucene [ In reply to ]
Unfortunately I didn't add the lucene files to source code control until
after I had gotten the project built and working, and therefore after my
edits...

Here's some of the changes I do remember though:
Get the source to the java JDK 1.2 StringBuffer and add it as
org.apache.lucene.StringBuffer. This is because I'm stuck using the 1.1.8
version of the JDK which is missing some StringBuffer methods used by
lucene.

Fix up some exceptions. For example, in
org.apache.lucene.analysis.standard.StandardFilter, the next() method now
throws java.io.IOException,
org.apache.lucene.analysis.standard.ParseException

I believe before it just throw IOException...

I believe the problems mostly just came up in the javaCC generated files.

I think this is another one. In org.apache.lucene.queryparser.QueryParser,
the method final public Query Query(String field) now throws:
org.apache.lucene.queryParser.ParseException,
org.apache.lucene.analysis.standard.ParseException

thanks,
rob

http://www.robdecker.com/
http://www.planetside.com/

On Wed, 24 Apr 2002, Otis Gospodnetic wrote:

> Just curious, what exactly people need to do to 'fix up the
> exceptions'? Editing of which files to change what to what?
>
> I'd just like to document that somewhere, that's why I'm asking...
>
> Otis
>
> --- "Robert A. Decker" <decker@robdecker.com> wrote:
> > I got it working under Project Builder. You just have to fix up the
> > exceptions yourself. Also, you'll get some warnings (121 warnings to
> > be
> > exact) during the linking stage stating that an Integer Constant is
> > too
> > large - just ignore these - they're wrong.
> >
> > thanks,
> > rob
> >
> > http://www.robdecker.com/
> > http://www.planetside.com/
> >
> > On Wed, 24 Apr 2002, Avi Drissman wrote:
> >
> > > I'm using Lucene rc4 and JavaCC 2.1. I'm trying to compile Lucene
> > > without Ant, by tossing the files into Project Builder (Mac OS X).
> > I
> > > ran JavaCC on StandardTokenizer.jj with the standard options,
> > tossed
> > > the resulting files into the project, and now I'm running into a
> > few
> > > errors:
> > >
> > > 1. StandardTokenizer.jj:173 is
> > >
> > > org.apache.lucene.analysis.Token next() throws IOException
> > >
> > > which is JavaCC'd into StandardTokenizer.java:26 as
> > >
> > > final public org.apache.lucene.analysis.Token next() throws
> > > ParseException, IOException
> > >
> > > which isn't a valid override. javac says
> > >
> > > >next() in org.apache.lucene.analysis.standard.StandardTokenizer
> > > >cannot override next() in org.apache.lucene.analysis.TokenStream;
> > > >overridden method does not throw
> > > >org.apache.lucene.analysis.standard.ParseException
> > >
> > > 2. StandardTokenizer.java:26 says
> > >
> > > token.beginColumn,token.endColumn
> > >
> > > and there are no such member variables.
> > >
> > > Am I totally missing something here?
> > >
> > > Avi
> > >
> > > --
> > > Avi Drissman
> > > avi_drissman@baseview.com
> > > Argh! This darn mailserver is trunca
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Games - play chess, backgammon, pool and more
> http://games.yahoo.com/
>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>