cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

I have included SparkJDBC42.jar in my war file. but when i start my application using tomcat, i get EOFExceptions from log4j classes. I need help with what is causing this and How to resolve this issue? Please help.

Ketna
New Contributor

Below is part of the exceptions I am getting:

org.apache.catalina.startup.ContextConfig processAnnotationsJar

SEVERE: Unable to process Jar entry [com/simba/spark/jdbc42/internal/apache/logging/log4j/core/pattern/ThreadIdPatternConverter.class] from Jar [jar:jndi:/localhost/channeldcvi/WEB-INF/lib/channeldcvi-1.0.jar!/] for annotations

java.io.EOFException

               at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)

               at org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:796)

               at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)

               at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:57)

               at org.apache.tomcat.util.bcel.classfile.Method.<init>(Method.java:71)

               at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)

               at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)

               at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)

               at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)

               at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)

               at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)

               at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)

               at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)

              

               

Jan 12, 2022 12:33:22 PM org.apache.catalina.startup.ContextConfig processAnnotationsJar

SEVERE: Unable to process Jar entry [com/simba/spark/jdbc42/internal/apache/logging/log4j/core/pattern/PlainTextRenderer.class] from Jar [jar:jndi:/localhost/channeldcvi/WEB-INF/lib/channeldcvi-1.0.jar!/] for annotations

java.io.EOFException

               at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)

               at org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:796)

               at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)

               at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:57)

               at org.apache.tomcat.util.bcel.classfile.Method.<init>(Method.java:71)

               at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)

               at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)

               at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)

               at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)

               at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)

               at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)

               at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)

               at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)

               at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)

               

               

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz
Community Manager
Community Manager

Hi @Ketna Khalasi​ , For Log4j related queries, please go through this post.

View solution in original post

2 REPLIES 2

Anonymous
Not applicable

Hello, @Ketna Khalasi​ ! My name is Piper, and I'm a moderator here at Databricks. Thank you for posting your question and I'm sorry to hear you're having this problem. We generally give the community a chance to respond before jumping in. Thanks in advance for your patience.

Kaniz
Community Manager
Community Manager

Hi @Ketna Khalasi​ , For Log4j related queries, please go through this post.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.