Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-21333

NoSuchMethodError running 5.0.d SOLR4 on JDK 7

    Details

      Description

      Alfresco 5.0 is supposed to have a minimum requirement of Java 7 to be run. The 5.0.d actually ships Java 8 and seems to have been compiled against the Java 8 class library. As a result, there can be incompatibilities with Java 7 when a specific signature expectation has been compiled into Alfresco classes.

      Step to reproduce one example NoSuchMethodError in SOLR4

      1) Make sure to execute SOLR4 with JDK 7 (i.e. via setting JAVA_HOME environment variable)
      2) Start Repository and SOLR4
      3) Access SOLR4 admin console
      4) Select one of the cores in the drop down list and load the core overview
      5) Click on the "optimize now" button in the overview
      6) Observe Tomcat console / solr.log

      Expectation: Operation performs without an error
      Observation: NoSuchMethodError is thrown because compiler has compiled a signature expectation for Java 8 class library into Alfresco class file (as a result of using implementation class instead of interface for parameter type declaration)

      2015-04-25 20:23:08,223 ERROR [org.apache.solr.servlet.SolrDispatchFilter] null:java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
      at org.alfresco.solr.tracker.TrackerStats.aggregateResults(TrackerStats.java:80)
      at org.alfresco.solr.tracker.TrackerStats.getModelTimes(TrackerStats.java:69)
      at org.alfresco.solr.AlfrescoCoreAdminHandler.addCoreSummary(AlfrescoCoreAdminHandler.java:1104)
      at org.alfresco.solr.AlfrescoCoreAdminHandler.actionSUMMARY(AlfrescoCoreAdminHandler.java:932)
      at org.alfresco.solr.AlfrescoCoreAdminHandler.handleCustomAction(AlfrescoCoreAdminHandler.java:291)
      at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:182)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
      at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:729)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:258)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)

        Attachments

        1. Optimize Now - SOLR4.png
          111 kB
          Axel Faust
        2. solr.log
          11 kB
          Axel Faust

          Structure

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                afaust Axel Faust
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                  Structure Helper Panel