Git Product home page Git Product logo

Comments (9)

dsmiley avatar dsmiley commented on May 25, 2024

Wouldn't a test hit this?

Looking at Jericho's POM http://mvnrepository.com/artifact/net.htmlparser.jericho/jericho-html/3.4 I see it's loggers are listed as optional. It seems it shouldn't matter? But somehow you hit this exception so it does.

from solrtexttagger.

joekiller avatar joekiller commented on May 25, 2024

Yeah I'll try to determine a root cause but it's not high priority. I just
got the libraries required.
On Jan 27, 2016 4:07 PM, "David Smiley" [email protected] wrote:

Wouldn't some test this this?

Looking at Jericho's POM
http://mvnrepository.com/artifact/net.htmlparser.jericho/jericho-html/3.4
I see it's loggers are listed as optional. It seems it shouldn't matter?
But somehow you hit this exception so it does.


Reply to this email directly or view it on GitHub
#48 (comment)
.

from solrtexttagger.

LusciousPear avatar LusciousPear commented on May 25, 2024

+1

from solrtexttagger.

dsmiley avatar dsmiley commented on May 25, 2024

My suspicion is that Jericho's internal logger picking algorithm might have a Log4j impl detecting one that isn't compatible with Solr. We might need to manually tell it which one to use. See http://jericho.htmlparser.net/docs/javadoc/net/htmlparser/jericho/Config.html#LoggerProvider I would appreciate it if someone tinkers with this further so we can get this fixed. It appears it'd require a one-liner at the spot where we first reference Jericho to set it's logger to LoggerProvider.SLF4J

from solrtexttagger.

dsmiley avatar dsmiley commented on May 25, 2024

BTW FWIW Solr 7.4 (not released yet) now uses Log4j 2. So whatever's going on here should soon become a non-issue.

from solrtexttagger.

nageshgnn avatar nageshgnn commented on May 25, 2024

Any updates on this issue? We are also getting this issue.
After adding the jar, log4j-api-2.4.1, issue got fixed. is there any way to fix this issue with out adding a new jar.

2018-07-26 15:17:45,872 [http-nio-8080-exec-4] ERROR - 74: (doFilter) Filter [JSPFilter];
javax.servlet.ServletException: javax.servlet.ServletException: org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.servlet.ServletException: org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
... 24 more
Caused by: org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:560)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:461)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
... 30 more
Caused by: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
... 39 more
Caused by: java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
at net.htmlparser.jericho.LoggerProviderLog4J.getLogger(LoggerProviderLog4J.java:35)
at net.htmlparser.jericho.LoggerProviderLog4J.getSourceLogger(LoggerProviderLog4J.java:41)
at net.htmlparser.jericho.Source.newLogger(Source.java:1685)
at net.htmlparser.jericho.Source.(Source.java:119)
at net.htmlparser.jericho.Source.(Source.java:132)
at net.htmlparser.jericho.Source.(Source.java:174)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
... 51 more

from solrtexttagger.

dsmiley avatar dsmiley commented on May 25, 2024

@nageshgnn did you see my comment where I said "It appears it'd require a one-liner at the spot where we first reference Jericho to set it's logger to LoggerProvider.SLF4J" Does that help? What version of Solr are you using?

from solrtexttagger.

nageshgnn avatar nageshgnn commented on May 25, 2024

Thanks @dsmiley for a resonse.
We have excluded the few Log method as below including org.slf4j in our pom.xml . Do you think this exclusion has caused the issue. If we remove this exclusion for org.slf4j , the issue should be resolved?.

Group ID: org.springframework.boot
ArtifactId : spring-boot-starter-web

		<exclusions>
			<exclusion>
				<artifactId>log4j-over-slf4j</artifactId>
				<groupId>org.slf4j</groupId>
			</exclusion>
			<exclusion>
				<artifactId>logback-classic</artifactId>
				<groupId>ch.qos.logback</groupId>
			</exclusion>
			<exclusion>
				<artifactId>logback-core</artifactId>
				<groupId>ch.qos.logback</groupId>
			</exclusion>
			<exclusion>
				<artifactId>tomcat-embed-el</artifactId>
				<groupId>org.apache.tomcat.embed</groupId>
			</exclusion>
			<exclusion>
				<artifactId>tomcat-embed-core</artifactId>
				<groupId>org.apache.tomcat.embed</groupId>
			</exclusion>
			<exclusion>
				<artifactId>tomcat-embed-websocket</artifactId>
				<groupId>org.apache.tomcat.embed</groupId>
			</exclusion>
		</

from solrtexttagger.

dsmiley avatar dsmiley commented on May 25, 2024

By showing me a Maven POM, I suspect the situation is a bit different than the start of the conversation/issue above. What does your Spring Boot app have to do with Solr? Is it the client of Solr? If so, it doesn't need the Solr Text Tagger, only SolrJ to communicate with Solr -- and in that case there you should communicate with the Apache Solr project mailing list or other support resources, not this plugin which runs inside Solr. Or maybe you are embedding Solr via EmbeddedSolrServer? In that case, especially with bringing in whatever other frameworks you have and their own logging dependencies, this becomes a general Java question of how to use Maven to include the right logging libraries while excluding the ones you don't want (sadly a common and annoying problem), and not so much an issue specific to this plugin.

from solrtexttagger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.