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

ClassNotFoundException: org.bouncycastle.asn1.cms.CMSObjectIdentifiers - missing JAR

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 8.11.1
    • 9.0
    • None
    • Azul Zulu Java 11

      Solr 8.11.1

      CentOS Linux

    Description

      Hello everyone!

      We have faced with the ClassNotFoundException for the org.bouncycastle.asn1.cms.CMSObjectIdentifiers class.

      Exception happens during processing of the PDF file.

      After some research on the JARs available in the contrib/extraction/lib we found out that basically there is no JAR available which provides CMSObjectIdentifiers interface class.

      SOLUTION: After adding bcutil-jdk15on JAR into the contrib/extraction/lib folder and restarting Solr - exception has gone.

      This is a kind of very rare exception which we have faced for the first time during last >5 years of using Solr. But anyway suppose it would be really helpful for everyone to have the bcutil-jdk15on JAR included in contrib by default, if possible.

      Thank you!

       

      Adding Exception listing below:

       

      ua.app.jmc.docman.DocManagerException:
          at ua.app.jmc.docman.SolrDocManager.insertFile(SolrDocManager.java:182)
          at ua.app.jmc.docman.AppSolrDocManager.insertFile(AppSolrDocManager.java:81)
          at ua.app.jmc.MongoConnectorWorker.processOpLogOperation(MongoConnectorWorker.java:367)
          at ua.app.jmc.MongoConnectorWorker.lambda$processOpLogOperation$0(MongoConnectorWorker.java:296)
          at java.base/java.util.ArrayList.forEach(Unknown Source)
          at ua.app.jmc.MongoConnectorWorker.processOpLogOperation(MongoConnectorWorker.java:291)
          at ua.app.jmc.MongoConnectorWorker.runWithCursor(MongoConnectorWorker.java:210)
          at ua.app.jmc.MongoConnectorWorker.run(MongoConnectorWorker.java:149)
      Caused by: org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr: Expected mime type application/octet-stream but got text/html. <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
      <title>Error 500 java.lang.NoClassDefFoundError: org/bouncycastle/asn1/cms/CMSObjectIdentifiers</title>
      </head>
      <body><h2>HTTP ERROR 500 java.lang.NoClassDefFoundError: org/bouncycastle/asn1/cms/CMSObjectIdentifiers</h2>
      <table>
      <tr><th>URI:</th><td>/solr/dev1_1/update/extract</td></tr>
      <tr><th>STATUS:</th><td>500</td></tr>
      <tr><th>MESSAGE:</th><td>java.lang.NoClassDefFoundError: org/bouncycastle/asn1/cms/CMSObjectIdentifiers</td></tr>
      <tr><th>SERVLET:</th><td>default</td></tr>
      <tr><th>CAUSED BY:</th><td>java.lang.NoClassDefFoundError: org/bouncycastle/asn1/cms/CMSObjectIdentifiers</td></tr>
      <tr><th>CAUSED BY:</th><td>java.lang.ClassNotFoundException: org.bouncycastle.asn1.cms.CMSObjectIdentifiers</td></tr>
      </table>
      <h3>Caused by:</h3><pre>java.lang.NoClassDefFoundError: org/bouncycastle/asn1/cms/CMSObjectIdentifiers
          at org.bouncycastle.operator.jcajce.OperatorHelper.&lt;clinit&gt;(Unknown Source)
          at org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder.&lt;init&gt;(Unknown Source)
          at org.apache.tika.parser.crypto.Pkcs7Parser.parse(Pkcs7Parser.java:68)
          at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:281)
          at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:281)
          at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143)
          at org.apache.solr.handler.extraction.ExtractingDocumentLoader.load(ExtractingDocumentLoader.java:229)
          at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:82)
          at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:216)
          at org.apache.solr.core.SolrCore.execute(SolrCore.java:2637)
          at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:794)
          at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:567)
          at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:427)
          at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:357)
          at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
          at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
          at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
          at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
          at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
          at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
          at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
          at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
          at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
          at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
          at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
          at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
          at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
          at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
          at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)
          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
          at org.eclipse.jetty.server.Server.handle(Server.java:516)
          at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)
          at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)
          at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)
          at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:352)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)
          at org.eclipse.jetty.http2.HTTP2Connection.produce(HTTP2Connection.java:183)
          at org.eclipse.jetty.http2.HTTP2Connection.onFillable(HTTP2Connection.java:138)
          at org.eclipse.jetty.http2.HTTP2Connection$FillableCallback.succeeded(HTTP2Connection.java:361)
          at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
          at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)
          at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
          at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
          at java.base/java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.cms.CMSObjectIdentifiers
          at java.base/java.net.URLClassLoader.findClass(Unknown Source)
          at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
          at java.base/java.net.FactoryURLClassLoader.loadClass(Unknown Source)
          at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
          ... 58 more
      </pre></body>
      </html>    at org.apache.solr.client.solrj.impl.Http2SolrClient.processErrorsAndResponse(Http2SolrClient.java:705)
          at org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:421)
          at org.apache.solr.client.solrj.impl.Http2SolrClient.request(Http2SolrClient.java:776)
          at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:214)
          at ua.app.jmc.docman.SolrDocManager.insertFile(SolrDocManager.java:180)
          ... 7 more 

       

      Thanks!

      Attachments

        1. img2.png
          20 kB
          Andrew
        2. img1.jpg
          73 kB
          Andrew
        3. image-2022-02-09-22-25-49-297.png
          14 kB
          Andrew

        Issue Links

          Activity

            People

              Unassigned Unassigned
              AndrewGr Andrew
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: