New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile the source files using mvn #2

Closed
hwidongna opened this Issue Jan 24, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@hwidongna

hwidongna commented Jan 24, 2014

I've cloned the latest commit ebaa47f. I get the following errors.

$ mvn
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.dawidweiss:compound-splitter:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for org.apache.lucene:lucene-core:jar should not point at files within the project directory, ${basedir}/lib/lucene-core-4.0-SNAPSHOT.jar will be unresolvable by dependent projects @ line 25, column 19
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple German Compound Splitter 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ compound-splitter ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ compound-splitter ---
[INFO] Compiling 3 source files to /home/leona/git/compound-splitter/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.914s
[INFO] Finished at: Fri Jan 24 13:42:11 KST 2014
[INFO] Final Memory: 7M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project compound-splitter: Compilation failure: Compilation failure:
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[12,16] package org.slf4j does not exist
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[13,16] package org.slf4j does not exist
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[31,19] cannot find symbol
[ERROR] symbol  : class Logger
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitter
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[7,0] package org.apache.lucene.analysis.util does not exist
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[8,16] package org.slf4j does not exist
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[9,16] package org.slf4j does not exist
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[12,4] cannot find symbol
[ERROR] symbol: class TokenFilterFactory
[ERROR] TokenFilterFactory {
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[13,17] cannot find symbol
[ERROR] symbol  : class Logger
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilterFactory
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilter.java:[4,42] package org.apache.lucene.analysis.compound does not exist
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilter.java:[6,16] package org.slf4j does not exist
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilter.java:[7,16] package org.slf4j does not exist
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilter.java:[10,4] cannot find symbol
[ERROR] symbol: class CompoundWordTokenFilterBase
[ERROR] CompoundWordTokenFilterBase {
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilter.java:[11,17] cannot find symbol
[ERROR] symbol  : class Logger
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilter
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[31,32] cannot find symbol
[ERROR] symbol  : variable LoggerFactory
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitter
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[226,32] getBytesReader(int) in org.apache.lucene.util.fst.FST<java.lang.Object> cannot be applied to ()
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[230,32] getBytesReader(int) in org.apache.lucene.util.fst.FST<java.lang.Object> cannot be applied to ()
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[273,33] getBytesReader(int) in org.apache.lucene.util.fst.FST<java.lang.Object> cannot be applied to ()
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[13,30] cannot find symbol
[ERROR] symbol  : variable LoggerFactory
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilterFactory
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[21,4] cannot find symbol
[ERROR] symbol  : variable super
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilterFactory
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[19,2] method does not override or implement a method from a supertype
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[40,49] cannot find symbol
[ERROR] symbol  : variable luceneMatchVersion
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilterFactory
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[40,11] incompatible types
[ERROR] found   : org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilter
[ERROR] required: org.apache.lucene.analysis.TokenStream
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilterFactory.java:[38,2] method does not override or implement a method from a supertype
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilter.java:[11,30] cannot find symbol
[ERROR] symbol  : variable LoggerFactory
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilter
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilter.java:[25,38] cannot find symbol
[ERROR] symbol  : variable termAtt
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilter
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilter.java:[41,23] cannot find symbol
[ERROR] symbol  : class CompoundToken
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilter
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitterTokenFilter.java:[41,8] cannot find symbol
[ERROR] symbol  : variable tokens
[ERROR] location: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitterTokenFilter
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

It seems to miss dependencies on sjf4j and lucene-analyzers-common, so I added them the pom.xml as follows:

    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-analyzers-common</artifactId>
      <version>4.0.0</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.5</version>
      <type>jar</type>

It still gives the following error, though.

$ mvn
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.dawidweiss:compound-splitter:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for org.apache.lucene:lucene-core:jar should not point at files within the project directory, ${basedir}/lib/lucene-core-4.0-SNAPSHOT.jar will be unresolvable by dependent projects @ line 25, column 19
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple German Compound Splitter 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ compound-splitter ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ compound-splitter ---
[INFO] Compiling 3 source files to /home/leona/git/compound-splitter/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.008s
[INFO] Finished at: Fri Jan 24 13:49:29 KST 2014
[INFO] Final Memory: 8M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project compound-splitter: Compilation failure: Compilation failure:
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[226,32] getBytesReader(int) in org.apache.lucene.util.fst.FST<java.lang.Object> cannot be applied to ()
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[230,32] getBytesReader(int) in org.apache.lucene.util.fst.FST<java.lang.Object> cannot be applied to ()
[ERROR] 
[ERROR] /home/leona/git/compound-splitter/src/main/java/org/apache/lucene/analysis/de/compounds/GermanCompoundSplitter.java:[273,33] getBytesReader(int) in org.apache.lucene.util.fst.FST<java.lang.Object> cannot be applied to ()
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
@dweiss

This comment has been minimized.

Show comment
Hide comment
@dweiss

dweiss Jan 24, 2014

Owner

It's because of this merge: ebaa47f

Eh... always test before trusting people :).

I'll fix and push a new version promptly.

Owner

dweiss commented Jan 24, 2014

It's because of this merge: ebaa47f

Eh... always test before trusting people :).

I'll fix and push a new version promptly.

@dweiss

This comment has been minimized.

Show comment
Hide comment
@dweiss

dweiss Jan 24, 2014

Owner

I've reverted the offending pull request.

Owner

dweiss commented Jan 24, 2014

I've reverted the offending pull request.

@ikonov

This comment has been minimized.

Show comment
Hide comment
@ikonov

ikonov Oct 19, 2015

how to use this package correctly with solr-4.10.4? I've built a jar file with mvn (the lucene-core version changed to 4.10.4, without errors) and put it into WEB-INF/lib/ .
In schema.xml I've added: .
After reloading I am getting the error message: "Plugin init failure for [schema.xml] analyzer/filter: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitter caused by "java.lang.ClassCastException: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitter
at java.lang.Class.asSubclass(Class.java:3208)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:474)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:593)
at org.apache.solr.schema.FieldTypePluginLoader$3.create(FieldTypePluginLoader.java:382)
at org.apache.solr.schema.FieldTypePluginLoader$3.create(FieldTypePluginLoader.java:376)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)"

ikonov commented Oct 19, 2015

how to use this package correctly with solr-4.10.4? I've built a jar file with mvn (the lucene-core version changed to 4.10.4, without errors) and put it into WEB-INF/lib/ .
In schema.xml I've added: .
After reloading I am getting the error message: "Plugin init failure for [schema.xml] analyzer/filter: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitter caused by "java.lang.ClassCastException: class org.apache.lucene.analysis.de.compounds.GermanCompoundSplitter
at java.lang.Class.asSubclass(Class.java:3208)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:474)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:593)
at org.apache.solr.schema.FieldTypePluginLoader$3.create(FieldTypePluginLoader.java:382)
at org.apache.solr.schema.FieldTypePluginLoader$3.create(FieldTypePluginLoader.java:376)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment