Link to home
Start Free TrialLog in
Avatar of rnicholus
rnicholus

asked on

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

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>(StandardServer.java:83)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:206)
        at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
        at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)
        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(Digester.java:1562)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

Open in new window

Avatar of rnicholus
rnicholus

ASKER

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.
Avatar of CEHJ
In Tomcat 6 it's in catalina.jar, which is in the lib directory
It's tomcat5.
Is it possible that whatever in that directory is now corrupted?
Download the jar from

http://technojeeves.com/joomla/index.php/free/45-jarsearch 

and execute it thus


java -jar jarsearch.jar $CATALINA_HOME TransactionRef

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of rnicholus
rnicholus

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK - good