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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
rnicholusAuthor Commented:
It's tomcat5.
0
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

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
rnicholusAuthor Commented:
CEHJ,

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJCommented:
OK - good
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.