reset password
Author Message
layla08
Posts: 70
Posted 12:45 Jul 25, 2015 |

When I try to run my CSJobs project on the server, I get this error:

I tried looking in my .xml files to see if there were multiple Context tags using the same path, but didn't find anything. 

Here is all that is under my WEB-INF:

My web.xml looks exactly like the example in the video (so I'm assuming it's okay to post it):

In my csjobs-servlet.xml, all I have that references "csjobs" is: 

<context:component-scan base-package="csjobs.web" />

 

I don't see any issues in the .xml files, but don't know where else to look. Would appreciate any advice.

Thanks!

 

hgadhia
Posts: 52
Posted 12:55 Jul 25, 2015 |

If I were to guess, there's no problem in your current project that you are working, but there's one more project with the same context path (i.e. csjobs); meaning that you have more than one project that has a path pointing to <server-name>:<server-port>/csjobs.

The possible reasons are:

  1. You created a copy of a project and did not change the context path.
  2. You gave the same context path to more than one project.

Debugging:

Go to Project Explorer > Right click on project -> Properties -> Web Project Settings, check that all projects has a unique context root here.

Once you update the context root, make sure to restart eclipse and update project.

layla08
Posts: 70
Posted 17:50 Jul 25, 2015 |

Hi Hgadhia,

Thanks for the response. I checked the Context Path of my projects using the path you gave me and there are no duplicates. I've tried restarting Eclipse. I've tried renaming the Web Context. 

No success yet.

Any other suggestions would be much appreciated. 

Thanks!

Last edited by layla08 at 17:50 Jul 25, 2015.
skim144
Posts: 63
Posted 12:41 Jul 26, 2015 |

Hi layla, I had a same problem before. 

On the explorer tab on the left (where your projects are listed), find servers.

Under servers, find server.xml and scroll down to the bottom. There you can find contexts with same path. You can simply change, or remove contexts with duplicate paths.

Hope this helps

Last edited by skim144 at 12:41 Jul 26, 2015.
layla08
Posts: 70
Posted 12:35 Jul 27, 2015 |

In case anyone runs into a similar problem, I resolved my issue by modifying my server.xml file. A quick search for my project name "csjobs" led me to the duplicate that the error message was referring to. 

In my situation, there was an old project that I deleted with the same context path. Even though I deleted it, it remained in the server.xml file.