Getting this exception when the app comes up in tomcat server and don't have much insight on why we are seeing this error in our app. Any help is appreciated.
Aug 10, 2022 9:59:50 PM org.apache.catalina.core.ApplicationContext log SEVERE: StandardWrapper.Throwable java.lang.IncompatibleClassChangeError: class com.homedepot.ta.ca.jmf.asm.visitors.ClassFile has interface org.objectweb.asm.ClassVisitor as super class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at com.homedepot.ta.ca.jmf.ConsumerStarterServlet.init(ConsumerStarterServlet.java:110) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
this is the class in the exception.
package com.xxx.ta.ca.jmf.asm.visitors;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.Attribute;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
/**
* ASM ClassVisitor used to scan compiled classes. Currently this ClassVisitor is
* only concerned with the name of the class and it's superclass. This visitor could
* easily be modified in the future to capture more information about classes if
* necessary.
*
* This was written originally with ASM version 3.1. This is the same version we are
* using to implement RESTful services. If a newer version becomes available this could
* be modified to extend EmptyVisitor instead (which would remove the unimplemented
* methods and clean the class up).
*
* @see ClassVisitor
*/
public class ClassFile extends ClassVisitor
{
public ClassFile() {
super(Opcodes.ASM5);
}
private static final char PATH_SEPERATOR = '/';
private static final char PACKAGE_SEPERATOR = '.';
private static final String CLASSNAME_PREFIX = "L";
private static final String CLASSNAME_SUFFIX = ";";
private static final String CLASS_SUFFIX = ".class";
/** Name of the class */
private String mName;
/** Superclass of class */
private String mSuperClass;
/**
* Capture the name and superclass of the compiled class being scanned
*
* @see ClassVisitor#visit(int, int, String, String, String, String[])
*/
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
{
mName = normalize(name);
mSuperClass = normalize(superName);
} // end function visit()
/**
* Currently not implemented
*
* @see ClassVisitor#visitAnnotation(String, boolean)
*/
public AnnotationVisitor visitAnnotation(String desc, boolean visible)
{
return null;
} // end function visitAnnotation()
/**
* Currently not implemented
*
* @see ClassVisitor#visitAttribute(Attribute)
*/
public void visitAttribute(Attribute attr)
{
} // end function visitAttribute()
/**
* Currently not implemented
*
* @see ClassVisitor#visitEnd()
*/
public void visitEnd()
{
} // end function visitEnd()
/**
* Currently not implemented
*
* @see ClassVisitor#visitField(int, String, String, String, Object)
*/
public FieldVisitor visitField(int access, String name, String desc, String signature, Object value)
{
return null;
} // end function visitField()
/**
* Currently not implemented
*
* @see ClassVisitor#visitInnerClass(String, String, String, int)
*/
public void visitInnerClass(String name, String outerName, String innerName, int access)
{
} // end function visitInnerClass()
/**
* Currently not implemented
*
* @see ClassVisitor#visitMethod(int, String, String, String, String[])
*/
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
{
return null;
} // end function visitMethod()
public void visitOuterClass(String owner, String name, String desc)
{
} // end function visitOuterClass()
/**
* Currently not implemented
*
* @see ClassVisitor#visitSource(String, String)
*/
public void visitSource(String source, String debug)
{
} // end function visitSource()
private String normalize(String name)
{
String normalized = name;
if(normalized != null)
{
// if the name in the compiled class starts with L and ends with ;
if(normalized.startsWith(CLASSNAME_PREFIX) && normalized.endsWith(CLASSNAME_SUFFIX))
{
normalized = normalized.substring(CLASSNAME_PREFIX.length(), normalized.indexOf(CLASSNAME_SUFFIX));
} // end if(normalized.startsWith(CLASSNAME_PREFIX) && normalized.endsWith(CLASSNAME_SUFFIX))
// if the name ends with .class
if(name.endsWith(CLASS_SUFFIX))
{
normalized = normalized.substring(0, normalized.indexOf(CLASSNAME_SUFFIX));
} // end if(name.endsWith(CLASS_SUFFIX))
// replace the / with . to build the fully qualified name of the class
normalized = normalized.replace(PATH_SEPERATOR, PACKAGE_SEPERATOR);
} // end if(name != null)
return normalized;
} // end function normalize()
/**
* Get the class name
*
* @return Normalized name of the class
*/
public String getName()
{
return mName;
} // end function getName()
/**
* Get the super class name
*
* @return Normalized name of the superclass or null
*/
public String getSuperClass()
{
return mSuperClass;
} // end function getSuperClass()
} // end class ClassVisitor
thanks, Ramto