query-autofiltering-component icon indicating copy to clipboard operation
query-autofiltering-component copied to clipboard

Unsupported major.minor version 52.0

Open Bhaskar13 opened this issue 10 years ago • 6 comments
trafficstars

org/apache/solr/handler/component/QueryAutoFilteringComponent : Unsupported major.minor version 52.0

I am using solr 4.10.4

Bhaskar13 avatar Oct 26 '15 12:10 Bhaskar13

Hi Bhaskar - this looks to be a Java version issue not Solr. I am guessing that Solr 4.10.4 is running on Java 1.7 and you compiled the code in Java 1.8 - also make sure that you use the Solr4x version as there are API changes in 5.x

detnavillus avatar Oct 26 '15 13:10 detnavillus

Thanks for your quick response :).

When I am running with the correct java version(javac 1.6.0_65) it gives 2 compile time errors on running the ant command.

compile: [javac] Compiling 1 source file to /Users/mi0096/Desktop/syno_final/query-autofiltering-component/solr4.x/build/java [javac] /Users/mi0096/Desktop/syno_final/query-autofiltering-component/solr4.x/src/main/java/org/apache/solr/handler/component/QueryAutoFilteringComponent.java:545: illegal start of type [javac] FST.Arc<BytesRef> scratchArc = new FST.Arc<>( ); [javac] ^ [javac] /Users/mi0096/Desktop/syno_final/query-autofiltering-component/solr4.x/src/main/java/org/apache/solr/handler/component/QueryAutoFilteringComponent.java:795: illegal start of type [javac] FST.Arc<BytesRef> scratchArc = new FST.Arc<>( ); [javac] ^ [javac] 2 errors

Could you please help me out here

Bhaskar13 avatar Oct 28 '15 12:10 Bhaskar13

As Ted pointed out, Solr 4x requires Java 1.7, not 1.6

You should not have to re-compile if you downloaded a release if your runtime environment is at least Java 1.7, although you certainly can recompile if you want.

Best, Erick

On Wed, Oct 28, 2015 at 5:45 AM, Bhaskar Singhal [email protected] wrote:

Thanks for your quick response :).

When I am running with the correct java version(javac 1.6.0_65) it gives 2 compile time errors on running the ant command.

compile: [javac] Compiling 1 source file to /Users/mi0096/Desktop/syno_final/query-autofiltering-component/solr4.x/build/java [javac] /Users/mi0096/Desktop/syno_final/query-autofiltering-component/solr4.x/src/main/java/org/apache/solr/handler/component/QueryAutoFilteringComponent.java:545: illegal start of type [javac] FST.Arc scratchArc = new FST.Arc<>( ); [javac] ^ [javac] /Users/mi0096/Desktop/syno_final/query-autofiltering-component/solr4.x/src/main/java/org/apache/solr/handler/component/QueryAutoFilteringComponent.java:795: illegal start of type [javac] FST.Arc scratchArc = new FST.Arc<>( ); [javac] ^ [javac] 2 errors

Could you please help me out here

— Reply to this email directly or view it on GitHub https://github.com/LucidWorks/query-autofiltering-component/issues/1#issuecomment-151832653 .

GitNotify avatar Oct 28 '15 13:10 GitNotify

Hi Bashkar

Java 6 is not supported (this is a generic syntax that came out in Java 7)

  • the current version of java is 1.8 .

I would recommend that you update your JVM to Java 8 (jdk 1.8) if possible. I have not compiled/tested the code in Java 1.6. I think that the Lucene/Solr code in 4.10 is Java 1.7 so you should at least have that version.

Ted

On Wed, Oct 28, 2015 at 8:45 AM, Bhaskar Singhal [email protected] wrote:

Thanks for your quick response :).

When I am running with the correct java version(javac 1.6.0_65) it gives 2 compile time errors on running the ant command.

compile: [javac] Compiling 1 source file to /Users/mi0096/Desktop/syno_final/query-autofiltering-component/solr4.x/build/java [javac] /Users/mi0096/Desktop/syno_final/query-autofiltering-component/solr4.x/src/main/java/org/apache/solr/handler/component/QueryAutoFilteringComponent.java:545: illegal start of type [javac] FST.Arc scratchArc = new FST.Arc<>( ); [javac] ^ [javac] /Users/mi0096/Desktop/syno_final/query-autofiltering-component/solr4.x/src/main/java/org/apache/solr/handler/component/QueryAutoFilteringComponent.java:795: illegal start of type [javac] FST.Arc scratchArc = new FST.Arc<>( ); [javac] ^ [javac] 2 errors

Could you please help me out here

— Reply to this email directly or view it on GitHub https://github.com/LucidWorks/query-autofiltering-component/issues/1#issuecomment-151832653 .

detnavillus avatar Oct 28 '15 14:10 detnavillus

we are using java 1.6 in Solr 4.10.4. Please see if you can compile it on java 1.6

Bhaskar13 avatar Oct 28 '15 15:10 Bhaskar13

Solr 4.x is not supported under Java 1.6, it requires Java 1.7 and will compile/run under Java 1.8 as well.

On Wed, Oct 28, 2015 at 8:16 AM, Bhaskar Singhal [email protected] wrote:

we are using java 1.6 in Solr 4.10.4. Please see if you can compile it on java 1.6

— Reply to this email directly or view it on GitHub https://github.com/LucidWorks/query-autofiltering-component/issues/1#issuecomment-151878193 .

GitNotify avatar Oct 28 '15 15:10 GitNotify