Publishing fails with duplicate class error
When you are publishing an application to a remote or local WebSphere® Application Server running with the Run server with resources on Server publishing setting, you might encounter the following error message:
Important: Applicable to WebSphere
Application Server traditional
The publish encountered some problems and the application may not have been installed
or it may have been successfully installed but was unable to start.
duplicate entry: history.jar/com/ibm/ejs/container/_EJSWrapper_Stub.class
You can encounter this problem when you
import a Java™ EE archive that
has class files without corresponding source files. During import,
the workbench is going to place these class files into an ImportedClasses folder
in the project. If you later add the source files to the project,
the class files become generated in the output folder for the project.
When you publish the project, you can receive an update request for
the same class file twice. One update is in the ImportedClasses folder
and another in the output folder of the project,
which results in the duplicate entry error.You can work around this limitation by removing the class files that are referenced in the error message from the ImportedClasses folder. If these class files are generated for an EJB, you can safely remove all the generated class files from the ImportedClasses folder.