Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-49108

Solr 4 Web Plugin Version 2.0.3 does not contain commons-codec.jar

    Details

      Description

      1.Set Solr on tomcat with basic authentication
      Edit conf/tomcat-users.xml

      <role rolename="role"/>
      <user username="username" password="password" roles="role"/>

      Edit solr/WEB-INF/web.xml

      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Protected Solr</web-resource-name>
      <url-pattern>/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>role</role-name>
      </auth-constraint>
      </security-constraint>

      <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>Basic Authentication</realm-name>
      </login-config>

      <security-role>
      <description>role</description>
      <role-name>role</role-name>
      </security-role>

      2.Set Liferay Solr plugin
      Edit solr4-web/WEB-INF/classes/META-INF/solr-spring.xml

      <bean id="com.liferay.portal.search.solr.server.BasicAuthSolrServer" class="com.liferay.portal.search.solr.server.BasicAuthSolrServer">
      <property name="httpRequestInterceptors">
      <list>
      <bean class="com.liferay.portal.search.solr.interceptor.PreemptiveAuthInterceptor" />
      </list>
      </property>
      <property name="username" value="username" />
      <property name="password" value="password" />
      <property name="url" value="http://localhost:9080/solr" />
      </bean>

      3.Reindex.

      The below error will be thrown:
      WARN [liferay/search_writer/SYSTEM_ENGINE-2][ProxyMessageListener:81] java.lang.Exception: java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
      java.lang.Exception: java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
      at com.liferay.portal.kernel.messaging.proxy.ProxyRequest.execute(ProxyRequest.java:94)
      at com.liferay.portal.kernel.messaging.proxy.ProxyMessageListener.receive(ProxyMessageListener.java:51)
      at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
      at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:71)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 14 weeks ago

                Packages

                Version Package
                6.2.X EE
                7.0.0 M1