Discussion:
Error building PyLucene with added classes
Daniel Duma
2015-01-15 17:00:16 UTC
Permalink
Hi all,

I have added some classes that I need to Lucene and now I cannot build
PyLucene 4.9.

Everything runs fine inside Eclipse, but when copying the .java files to
the corresponding folders inside the PyLucene source directory and
rebuilding, I get this error:




*C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\core\src\java\org\apache\lucene\queryparser\classic\FieldAgnosticQueryParser.java:12:
error: cannot find symbolsymbol: class QueryParser*Here is the full output:

ivy-configure:
[ivy:configure] :: Apache Ivy 2.4.0-rc1 - 20140315220245 ::
http://ant.apache.org/ivy/ ::
[ivy:configure] :: loading settings :: file =
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\ivy-settings.xml

resolve:

init:

-clover.disable:

-clover.load:

-clover.classpath:

-clover.setup:

clover:

compile-core:
[javac] Compiling 734 source files to
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\build\core\classes\java
[javac]
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\core\src\java\org\apache\lucene\queryparser\classic\FieldAgnosticMultiFieldQueryParser.java:15:
error: cannot find symbol
[javac] MultiFieldQueryParser {
[javac] ^
[javac] symbol: class MultiFieldQueryParser
[javac]
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\core\src\java\org\apache\lucene\queryparser\classic\FieldAgnosticQueryParser.java:12:
error: cannot find symbol
[javac] public class FieldAgnosticQueryParser extends QueryParser {
[javac] ^
[javac] symbol: class QueryParser
[javac]
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\core\src\java\org\apache\lucene\queryparser\classic\FieldAgnosticMultiFieldQueryParser.java:23:
error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^

BUILD FAILED
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\common-build.xml:694: The
following error occurred while executing this line:
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\common-build.xml:480: The
following error occurred while executing this line:
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\common-build.xml:1755:
Compile failed; see the compiler error output for details.

PyLucene builds just fine without the added files, and I have checked and
the files it can't find are where they should be!

Cheers,
Daniel
Daniel Duma
2015-01-15 17:31:41 UTC
Permalink
Update: never mind, I was placing the files in the wrong folder. Solved!

Thanks,
Daniel
Post by Daniel Duma
Hi all,
I have added some classes that I need to Lucene and now I cannot build
PyLucene 4.9.
Everything runs fine inside Eclipse, but when copying the .java files to
the corresponding folders inside the PyLucene source directory and
[ivy:configure] :: loading settings :: file =
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\ivy-settings.xml
[javac] Compiling 734 source files to
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\build\core\classes\java
[javac]
error: cannot find symbol
[javac] MultiFieldQueryParser {
[javac] ^
[javac] symbol: class MultiFieldQueryParser
[javac]
error: cannot find symbol
[javac] public class FieldAgnosticQueryParser extends QueryParser {
[javac] ^
[javac] symbol: class QueryParser
[javac]
error: method does not override or implement a method from a supertype
[javac] ^
BUILD FAILED
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\common-build.xml:694: The
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\common-build.xml:480: The
Compile failed; see the compiler error output for details.
PyLucene builds just fine without the added files, and I have checked and
the files it can't find are where they should be!
Cheers,
Daniel
Andi Vajda
2015-01-15 18:01:01 UTC
Permalink
Post by Daniel Duma
Update: never mind, I was placing the files in the wrong folder. Solved!
Good, that was going to be my first question since you didn't tell us anything about your new class(es).

The proper way to add things to lucene and pylucene is to put your stuff into your own package and to create a jar file from that package. Then, to add it to pylucene, you just add it to the list of jar files its build processes, with jcc's --jar parameter.

Andi..
Post by Daniel Duma
Thanks,
Daniel
Post by Daniel Duma
Hi all,
I have added some classes that I need to Lucene and now I cannot build
PyLucene 4.9.
Everything runs fine inside Eclipse, but when copying the .java files to
the corresponding folders inside the PyLucene source directory and
[ivy:configure] :: loading settings :: file =
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\ivy-settings.xml
[javac] Compiling 734 source files to
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\build\core\classes\java
[javac]
error: cannot find symbol
[javac] MultiFieldQueryParser {
[javac] ^
[javac] symbol: class MultiFieldQueryParser
[javac]
error: cannot find symbol
[javac] public class FieldAgnosticQueryParser extends QueryParser {
[javac] ^
[javac] symbol: class QueryParser
[javac]
error: method does not override or implement a method from a supertype
[javac] ^
BUILD FAILED
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\common-build.xml:694: The
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\common-build.xml:480: The
Compile failed; see the compiler error output for details.
PyLucene builds just fine without the added files, and I have checked and
the files it can't find are where they should be!
Cheers,
Daniel
Daniel Duma
2015-01-15 23:34:14 UTC
Permalink
Thanks Andi,

I'd love to do it "the proper way", but I have no idea how to go about
building my own jar files, much less where to put that -jar parameter for
jcc. Is there a tutorial on this somewhere?

Cheers,
Daniel
Post by Andi Vajda
Post by Daniel Duma
Update: never mind, I was placing the files in the wrong folder. Solved!
Good, that was going to be my first question since you didn't tell us
anything about your new class(es).
The proper way to add things to lucene and pylucene is to put your stuff
into your own package and to create a jar file from that package. Then, to
add it to pylucene, you just add it to the list of jar files its build
processes, with jcc's --jar parameter.
Andi..
Post by Daniel Duma
Thanks,
Daniel
Post by Daniel Duma
Hi all,
I have added some classes that I need to Lucene and now I cannot build
PyLucene 4.9.
Everything runs fine inside Eclipse, but when copying the .java files to
the corresponding folders inside the PyLucene source directory and
error: cannot find symbolsymbol: class QueryParser*Here is the full
[ivy:configure] :: loading settings :: file =
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\ivy-settings.xml
[javac] Compiling 734 source files to
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\build\core\classes\java
[javac]
error: cannot find symbol
[javac] MultiFieldQueryParser {
[javac] ^
[javac] symbol: class MultiFieldQueryParser
[javac]
error: cannot find symbol
[javac] public class FieldAgnosticQueryParser extends QueryParser {
[javac] ^
[javac] symbol: class QueryParser
[javac]
error: method does not override or implement a method from a supertype
[javac] ^
BUILD FAILED
The
The
Post by Daniel Duma
Post by Daniel Duma
Compile failed; see the compiler error output for details.
PyLucene builds just fine without the added files, and I have checked
and
Post by Daniel Duma
Post by Daniel Duma
the files it can't find are where they should be!
Cheers,
Daniel
Andi Vajda
2015-01-16 01:54:45 UTC
Permalink
Hi Daniel,
Post by Daniel Duma
Thanks Andi,
I'd love to do it "the proper way", but I have no idea how to go about
building my own jar files,
http://docs.oracle.com/javase/tutorial/deployment/jar/build.html
Post by Daniel Duma
much less where to put that -jar parameter for
jcc. Is there a tutorial on this somewhere?
That parameter is visible line 319 of PyLucene 4.9's Makefile.
Look for --jar.

Andi..
Post by Daniel Duma
Cheers,
Daniel
Post by Andi Vajda
Post by Daniel Duma
Update: never mind, I was placing the files in the wrong folder. Solved!
Good, that was going to be my first question since you didn't tell us
anything about your new class(es).
The proper way to add things to lucene and pylucene is to put your stuff
into your own package and to create a jar file from that package. Then, to
add it to pylucene, you just add it to the list of jar files its build
processes, with jcc's --jar parameter.
Andi..
Post by Daniel Duma
Thanks,
Daniel
Post by Daniel Duma
Hi all,
I have added some classes that I need to Lucene and now I cannot build
PyLucene 4.9.
Everything runs fine inside Eclipse, but when copying the .java files to
the corresponding folders inside the PyLucene source directory and
error: cannot find symbolsymbol: class QueryParser*Here is the full
[ivy:configure] :: loading settings :: file =
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\ivy-settings.xml
[javac] Compiling 734 source files to
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\build\core\classes\java
[javac]
error: cannot find symbol
[javac] MultiFieldQueryParser {
[javac] ^
[javac] symbol: class MultiFieldQueryParser
[javac]
error: cannot find symbol
[javac] public class FieldAgnosticQueryParser extends QueryParser {
[javac] ^
[javac] symbol: class QueryParser
[javac]
error: method does not override or implement a method from a supertype
[javac] ^
BUILD FAILED
The
The
Post by Daniel Duma
Post by Daniel Duma
Compile failed; see the compiler error output for details.
PyLucene builds just fine without the added files, and I have checked
and
Post by Daniel Duma
Post by Daniel Duma
the files it can't find are where they should be!
Cheers,
Daniel
Daniel Duma
2015-01-20 00:07:28 UTC
Permalink
Thank you! I will look into it =)

Cheers,
Daniel
Post by Andi Vajda
Hi Daniel,
Thanks Andi,
Post by Daniel Duma
I'd love to do it "the proper way", but I have no idea how to go about
building my own jar files,
http://docs.oracle.com/javase/tutorial/deployment/jar/build.html
much less where to put that -jar parameter for
Post by Daniel Duma
jcc. Is there a tutorial on this somewhere?
That parameter is visible line 319 of PyLucene 4.9's Makefile.
Look for --jar.
Andi..
Post by Daniel Duma
Cheers,
Daniel
Post by Andi Vajda
Post by Daniel Duma
Update: never mind, I was placing the files in the wrong folder. Solved!
Good, that was going to be my first question since you didn't tell us
anything about your new class(es).
The proper way to add things to lucene and pylucene is to put your stuff
into your own package and to create a jar file from that package. Then, to
add it to pylucene, you just add it to the list of jar files its build
processes, with jcc's --jar parameter.
Andi..
Post by Daniel Duma
Thanks,
Daniel
Post by Daniel Duma
Hi all,
I have added some classes that I need to Lucene and now I cannot build
PyLucene 4.9.
Everything runs fine inside Eclipse, but when copying the .java files to
the corresponding folders inside the PyLucene source directory and
*C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\core\
src\java\org\apache\lucene\queryparser\classic\
Post by Daniel Duma
error: cannot find symbolsymbol: class QueryParser*Here is the full
Post by Daniel Duma
[ivy:configure] :: loading settings :: file =
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\ivy-settings.xml
[javac] Compiling 734 source files to
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\
build\core\classes\java
[javac]
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\core\
src\java\org\apache\lucene\queryparser\classic\
Post by Daniel Duma
error: cannot find symbol
Post by Daniel Duma
[javac] MultiFieldQueryParser {
[javac] ^
[javac] symbol: class MultiFieldQueryParser
[javac]
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\core\
src\java\org\apache\lucene\queryparser\classic\
Post by Daniel Duma
error: cannot find symbol
Post by Daniel Duma
[javac] public class FieldAgnosticQueryParser extends QueryParser {
[javac] ^
[javac] symbol: class QueryParser
[javac]
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\core\
src\java\org\apache\lucene\queryparser\classic\
Post by Daniel Duma
error: method does not override or implement a method from a supertype
Post by Daniel Duma
[javac] ^
BUILD FAILED
The
The
Post by Daniel Duma
C:\NLP\pylucene-4.9.0-0\lucene-java-4.9.0\lucene\
Compile failed; see the compiler error output for details.
PyLucene builds just fine without the added files, and I have checked
and
the files it can't find are where they should be!
Post by Daniel Duma
Cheers,
Daniel
Loading...