Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8080

'bin/solr start' should print informative errors when the JVM version is insufficient

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.4, 6.0
    • Fix Version/s: 6.3, 7.0
    • Component/s: scripts and tools
    • Labels:
      None

      Description

      From the unpacked 5.3.0 distribution, with Java6 set in $JAVA_HOME and the $PATH, there is some indication that there is a problem (Java7 is minimum supported JVM version) - bin/solr times out waiting for Solr to start up - but no info is printed about what the problem might be:

      $ echo $JAVA_HOME
      /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
      
      $ java -version
      java version "1.6.0_65"
      Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
      Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
      
      $ bin/solr start
      Waiting up to 30 seconds to see Solr running on port 8983 [\]  Still not seeing Solr listening on 8983 after 30 seconds!
      tail:~/temp/solr-5.3.0/server/logs/solr.log: No such file or directory
      

      On trunk (built via ant server with Java8), the situation is worse - although Solr started, it's not in a usable state, and there is no indication given that there is a problem:

      $ java -version
      java version "1.7.0_71"
      Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
      
      $ echo $JAVA_HOME
      /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
      
      sarowe@smb [2048]$ bin/solr start
      Waiting up to 30 seconds to see Solr running on port 8983 [/]  
      Started Solr server on port 8983 (pid=50551). Happy searching!
      

      From server/logs/solr.log:

      2015-09-21 17:15:28.991 WARN  (main) [   ] o.e.j.u.c.AbstractLifeCycle FAILED So
      lrRequestFilter: java.lang.UnsupportedClassVersionError: org/apache/solr/servlet
      /SolrDispatchFilter : Unsupported major.minor version 52.0
      java.lang.UnsupportedClassVersionError: org/apache/solr/servlet/SolrDispatchFilt
      er : Unsupported major.minor version 52.0
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
      2)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      
      [...]
      
      2015-09-21 17:15:29.020 INFO  (main) [   ] o.e.j.s.ServerConnector Started ServerConnector@24d25ddc{HTTP/1.1}{0.0.0.0:8983}
      2015-09-21 17:15:29.020 INFO  (main) [   ] o.e.j.s.Server Started @1237ms
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                janhoy Jan Høydahl
                Reporter:
                steve_rowe Steve Rowe
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: