0

The code is working in main method separately. But not working, when it is called in Spring running on Apache.

I compiled my code in main method. It works ok without any issue. But when I call block of code in Spring running on Apache. Does anyone have any idea?

Caused By: java.lang.NoClassDefFoundError: reactor/core/CorePublisher . . .

Line of code causes the error: client is SearchClient from Azure SDK.

SearchPagedIterable searchResultsIterable = searchClient.search("text");

JImmy
  • 21
  • 2
  • 1
    Without the code the best we could do is try and guess what is wrong. – Spectric Feb 01 '21 at 03:01
  • 1
    Spring can't run on Apache, since the [Apache HTTP Server](https://httpd.apache.org/) is not a Java application, and Spring is a Java library. --- Did you perhaps mean the [Apache Tomcat Servlet Container](http://tomcat.apache.org/)? If so, it is referred to in short as Tomcat, not as Apache. – Andreas Feb 01 '21 at 03:17
  • *"when I call block of code"* How do you do that? You need to show us more information. All we can say right now, is that the error means you're missing one or more jar files from the classpath, and tell you to read this: [Why am I getting a NoClassDefFoundError in Java?](https://stackoverflow.com/q/34413/5221149) – Andreas Feb 01 '21 at 03:23
  • could you post your code block you've tried? – Daniel.Wang Feb 01 '21 at 04:26
  • I've removed the [tag:apache] tag (see Andreas' comment above and the tag's description). When you add detail to your question, pick a tag that matches your system. Please see [ask] for some hints on what we need in order to help. – Olaf Kock Feb 01 '21 at 07:37

0 Answers0