My build fails whenever MyEclipse tries to deploy my application to my OC4J application server.ANSWER: - Build for a project will fail in a MyEclipse environment if there are 2 maven natures/libraries in the .project and. classpath files. Sometimes Sometimes MyEclipse will automatically create or configure your .classpath and .project file when you check out a project. If If it adds 2 maven natures (org.maven.ide.eclipse and org.eclipse.m2e ) in your project, you will not be able to build your project. The The build will fail when it tries to deploy the application to the application server. The The logs in the server will shows an error indicating that it is unable to load the appplcationContext applicationContext as it cannot create the daoFoundation bean, sessionFactory bean, and so on as a result of a missing object: Student.
To resolve the problem, remove one of the maven natures/libraries in the project configuration. It It can be done via deleting the maven nature from the Libraries in the Java Build Path of the project as shown in the panel below:
Also, you can edit the .classpath and .project file manually. You You need to choose either one of the maven nature or classpath entry. The . Using the org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER, the following are excerpts of the .classpath & and .project files that are configured properly:
|