How to resolve error related to duplicate class while building the ear from studio-tool
book
Article ID: KB0070355
calendar_today
Updated On:
Products
Versions
TIBCO BusinessEvents Enterprise Edition
6.x
Description
When we are trying to build the EAR file from the BE console using studio-tools we are getting below error :-
/abc/sampleClass.java:15: error: duplicate class: abc.sampleClass
public class sampleClass {
^/abc/sampleClass2.java:13: error: duplicate class: abc.sampleClass2
public class sampleClass2 {
^/abc/sampleClass.java:15: error: duplicate class: abc.sampleClass
public class sampleClass {
^/abc/sampleClass2.java:13: error: duplicate class: abc.sampleClass2
public class sampleClass2 {
^Note: /Common/abcUtils.java uses or overrides a deprecated API.Note: Recompile with -Xlint:deprecation for details.
Issue/Introduction
This article explains how to resolve the error related to duplicate class while building the ear from studio-tool
Environment
All Supported Environments
Resolution
Here, build fails because you have classes defined in both places at project level as well as in ProjectLib. The Classes sampleClass and sampleClass2 are exact replica of the classes from the project library.
In both cases, the local .java files can be removed from the project as they do not add functionality. Please perform a test by removing the .java files from the local project and try to build the project.