Class not found exception in old ant-based web-app

29 Views Asked by At

I'm trying to get an older application based on ANT to run on Tomcat. I'm getting the following error when I run it in Eclipse:

Caused by: java.lang.NoClassDefFoundError: org/eclipse/birt/core/exception/BirtException
    at java.base/java.lang.Class.getDeclaredFields0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3297)
    at java.base/java.lang.Class.getDeclaredFields(Class.java:2371)
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
    at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:269)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:89)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:329)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:783)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:114)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4804)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
    ... 6 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.birt.core.exception.BirtException
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
    ... 19 more

The class BirtException is defined in the coreapi.jar file which is on the build path. It's also mentioned in the build.xml file like this:

<path id="MDS 3.0 Single Code.classpath">
        <path refid="JSF 2 Libraries.userclasspath"/>
        <path refid="Oracle Libraries.userclasspath"/>
        <path refid="Tomahawk Libraries.userclasspath"/>
        <path refid="tomahawk.userclasspath"/>
        <path refid="Oracle.userclasspath"/>
        <path refid="JSF Libraries.userclasspath"/>
        <path refid="EclipseLink.userclasspath"/>
        <path refid="Tomcat.userclasspath"/>
        <pathelement location="${ECLIPSE_HOME}configuration/org.eclipse.osgi/105/0/.cp/data/2.5.2/engineapi.jar"/>
<pathelement location="Libraries/eclipse_config_libs/coreapi.jar"/>

So, it seems like it should be available at run time. What am I missing here? I'm using tomcat 8.5 and eclipse 4.29

0

There are 0 best solutions below