Trying to solve Tomcat error: java.lang.NoClassDefFoundError: org/apache/naming/TransactionRef

Posted on 2008-11-18
Last Modified: 2013-12-02
I got this error below when starting Tomcat.
I google and found that it means I'm missing naming-factory.jar.
But actually I do have it in common/lib.

Can someone please advise?

Thanks in advance for the help.
Nov 18, 2008 1:24:15 PM org.apache.tomcat.util.digester.Digester startElement

SEVERE: Begin event threw error

java.lang.NoClassDefFoundError: org/apache/naming/TransactionRef

        at org.apache.catalina.core.StandardServer.<init>(

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(

        at java.lang.reflect.Constructor.newInstance(

        at java.lang.Class.newInstance0(

        at java.lang.Class.newInstance(

        at org.apache.tomcat.util.digester.ObjectCreateRule.begin(

        at org.apache.tomcat.util.digester.Rule.begin(

        at org.apache.tomcat.util.digester.Digester.startElement(

        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)

        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)

        at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)

        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

        at org.apache.tomcat.util.digester.Digester.parse(

        at org.apache.catalina.startup.Catalina.load(

        at org.apache.catalina.startup.Catalina.load(

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(

Open in new window

Question by:rnicholus

    Author Comment

    I think this starts the problem.

    There was this symbolic link inside /common/lib:
    naming-factory.jar --> /usr/local/ .....

    Then I accidentally added naming-factory.jar (the actual file) into that directory.
    I remove this file and then the error starts happening eventhough the naming-factory.jar symbolic link is still there.
    LVL 86

    Expert Comment

    In Tomcat 6 it's in catalina.jar, which is in the lib directory

    Author Comment

    It's tomcat5.

    Author Comment

    Is it possible that whatever in that directory is now corrupted?
    LVL 86

    Expert Comment

    Download the jar from

    and execute it thus

    java -jar jarsearch.jar $CATALINA_HOME TransactionRef

    Open in new window


    Accepted Solution


    I downloaded Tomcat 5 package again and reimport whatever in the /lib directory.
    Now Tomcat works ok again.
    LVL 86

    Expert Comment

    OK - good

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now