facebook

[Closed] Cannot add ‘Spring Capabilities’ to ‘Web project’

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #256123 Reply

    udaikumar
    Member

    Hi,

    I am using MyEclipse 5.0M2 (eclipse 3.2). I created a Web project with JSF capabilities. Now I wanted to add ‘Spring Capabilites’ to it. Then i selected ‘MyEclipse -> Add Spring capabilities’ and selected all the libraries in the next screen. After click OK, I got some error. The following error was logged in the .log file under .metadata. I wanted to add again. But this time ‘Add Spring capabilities’ is disabled. It has NOT created ‘applicationContext.xml’.

    ———err in the .log file
    !ENTRY com.genuitec.eclipse.springframework 1 0 2006-08-03 17:19:04.450
    !MESSAGE
    !STACK 1
    Java Model Exception: Java Model Status [Build path contains duplicate entry: ‘C:Program Files/MyEclipse 5.0M2/eclipse/plugins/com.genuitec.eclipse.springframework_4.9.200/data/1.2/lib/spring-dao.jar’ for project JSFLoginDemo]
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:775)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3016)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3032)
    at com.genuitec.eclipse.springframework.wizards.NewSpringSupportCreationWizard.installLibraryContainers(NewSpringSupportCreationWizard.java:332)
    at com.genuitec.eclipse.springframework.wizards.NewSpringSupportCreationWizard.installSupportLibraries(NewSpringSupportCreationWizard.java:285)
    at com.genuitec.eclipse.springframework.wizards.NewSpringSupportCreationWizard.finishPage(NewSpringSupportCreationWizard.java:112)
    at com.genuitec.eclipse.core.portability.NewElementWizard$2.run(NewElementWizard.java:105)
    at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
    at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:720)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1737)
    at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4023)
    at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
    !SUBENTRY 1 org.eclipse.jdt.core 4 977 2006-08-03 17:19:04.450
    !MESSAGE Build path contains duplicate entry: ‘C:Program Files/MyEclipse 5.0M2/eclipse/plugins/com.genuitec.eclipse.springframework_4.9.200/data/1.2/lib/spring-dao.jar’ for project JSFLoginDemo

    ——— end of the log.

    Please help in this regard.

    Thanks,
    Udai

    #256149 Reply

    Riyad Kalla
    Member

    Udai,
    Given the error, had you manually added the Spring DAO JAR to your build path before running the wizard? I just saw a bug get filed wth this same behavior against the web services module, so it’s possible this faulty logic is in the spring wizard too.

    To “remove” the half-added Sprng functionalities, you can edit your .project file from the Navigator view and remove the spring nature.

    #256151 Reply

    Riyad Kalla
    Member

    Udai,
    I just manually added Spring libraries to my project and then tried to add Spring capabilities and got exactly this problem. The issue is that Spring libs are already on the build path, I’ve filed this as a bug.

    A workaround would be to remove your Spring JARs, and instead go to the Build Path, click Add Library, then MyEclipse Library and add the Spring library or libraries you need. THe Wizard is smart enough to notice the *libraries* that are already there, but not the individual JARs.

    #256262 Reply

    udaikumar
    Member

    Thanks Riyad,

    That worked!

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] Cannot add ‘Spring Capabilities’ to ‘Web project’

You must be logged in to post in the forum log in