Reply
New Contributor
Posts: 6
Registered: ‎05-05-2015

Could not find the main class: org.apache.solr.util.SimplePostTool

I am trying to setup Cloudera Search (Parcel install CDH 5.4.4)

 

I have followed the instructions in the documentation for "Validating the Deployment with the Solr REST API"

 

However, the instruction -

 

java -Durl=http://$SOLRHOST:8983/solr/collection1/update -jar post.jar *.xml

generates the following error :

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/solr/util/SimplePostTool : Unsupported major.minor version 51.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)

at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)

at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

at java.net.URLClassLoader$1.run(URLClassLoader.java:197)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Could not find the main class: org.apache.solr.util.SimplePostTool. Program will exit.

 

Can anyone please help !

 

Thanks!

 

Cloudera Employee
Posts: 20
Registered: ‎09-29-2015

Re: Could not find the main class: org.apache.solr.util.SimplePostTool

Highlighted
New Contributor
Posts: 6
Registered: ‎05-05-2015

Re: Could not find the main class: org.apache.solr.util.SimplePostTool

I am on the following Java / JDK versions :

 

openjdk version "1.8.0_51"

OpenJDK Runtime Environment (build 1.8.0_51-b16)

OpenJDK 64-Bit Server VM (build 25.51-b03, mixed mode)

 

Do I need to upgrade ? 

 

Can you point me to a resource on how to upgrade the Java version? Do I need to upgrade on each node separately ?

 

Thanks !

 

Contributor
Posts: 56
Registered: ‎02-09-2015

Re: Could not find the main class: org.apache.solr.util.SimplePostTool

actually you need to downgrade to jdk 1.7 , the error :
Unsupported major.minor version 51.0
means J2SE 7