Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Created by: null on 16-04-2007 07:37:01 PM I have two classes with same name but in different package. I put them in Server\common\classes folder
Server |__Common |_____classes |_______P1 |_________class1.class |_______P2 |_________class1.class
Tomcat throws an error when starts up and fails to load any application.
Loading application 'test'...
An error occurred while loading application 'test'. The error was: There was a problem loading classes from AUDIUM_HOME/common: java.lang.NoClassDefFoundError: P2/class1 (wrong name: P1/class1). This application will be unavailable until the problem is fixed. Note that all voice applications should experience the same error. ***
Subject: RE: Common classes with same name Replied by: null on 19-04-2007 01:05:17 PM Hello Luong,
We have attempted to reproduce your error. We duplicated a class with the same name but in a different package as you described and deployed both packages to the common\classes directory. One test application referenced the class from one package. Another test application referenced the second class from the other package. Tomcat is started; the server did not throw any error, and we were able to call into both test applications. We were not able to reproduce your error.
Please provide more detail regarding your classes and your test application that failed to be loaded.
Regards, Tam
Subject: RE: Common classes with same name Replied by: null on 19-04-2007 03:28:19 PM Hello Luong,
The second class with the same class name deployed to the directory common\classes\P2 has an incorrect package declaration, hence the error message â¿¿java.lang.NoClassDefFoundError: P2/class1 (wrong name: P1/class1)â¿¿.
Correct the package declaration (P2 not P1) and deploy the compiled class to the proper directory.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: