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

rnicholusAsked:
Who is Participating?
 
rnicholusConnect With a Mentor Author Commented:
CEHJ,

I downloaded Tomcat 5 package again and reimport whatever in the /lib directory.
Now Tomcat works ok again.
0
 
rnicholusAuthor Commented:
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.
0
 
CEHJCommented:
In Tomcat 6 it's in catalina.jar, which is in the lib directory
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
rnicholusAuthor Commented:
It's tomcat5.
0
 
rnicholusAuthor Commented:
Is it possible that whatever in that directory is now corrupted?
0
 
CEHJCommented:
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

0
 
CEHJCommented:
OK - good
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.