Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Duplicate entry error when publishing webapps to tomcat
Duplicate entry error when publishing webapps to tomcat [message #195112] Wed, 27 June 2007 20:29 Go to next message
Andreas Pakulat is currently offline Andreas PakulatFriend
Messages: 127
Registered: July 2009
Senior Member
Hi,

I've got 2 web applications that depend on a common java project. This java
project contains a template library and exports a few .jar files. Its bound
to the web applications as J2EE Module Dependecy

When publishing the 2 web apps into a Tomcat server (5.5.20) I'm getting an
error message reading:

Error creating TagLib.jar: duplicate entry META-INF/zgdv.tld

Now I do have that file in the source directory of the TagLib project. This
project works fine @work, but fails to publish here. All that changed from
work to here is that I'm using Eclipse 3.3rc4 and used the Quick-Fix for
properly exporting the jars that are included in the TagLib project. Then I
removed these exported jars from the 2 webapps to resolve the now-appearing
conflicts. However now I face this error and I really don't know how to
deal with that.

Andreas
Re: Duplicate entry error when publishing webapps to tomcat [message #195386 is a reply to message #195112] Mon, 02 July 2007 16:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pakulat.rostock.zgdv.de

Andreas Pakulat schrieb:
> Hi,
>
> I've got 2 web applications that depend on a common java project. This java
> project contains a template library and exports a few .jar files. Its bound
> to the web applications as J2EE Module Dependecy
>
> When publishing the 2 web apps into a Tomcat server (5.5.20) I'm getting an
> error message reading:
>
> Error creating TagLib.jar: duplicate entry META-INF/zgdv.tld
>
> Now I do have that file in the source directory of the TagLib project. This
> project works fine @work, but fails to publish here. All that changed from
> work to here is that I'm using Eclipse 3.3rc4 and used the Quick-Fix for
> properly exporting the jars that are included in the TagLib project. Then I
> removed these exported jars from the 2 webapps to resolve the now-appearing
> conflicts. However now I face this error and I really don't know how to
> deal with that.

Nobody with an idea? I really don't see why this would happen in the
project there is only 1 .tld file under META-INF and I doubt Eclipse
generates its own tld file.

Andreas
Re: Duplicate entry error when publishing webapps to tomcat [message #195401 is a reply to message #195386] Mon, 02 July 2007 16:57 Go to previous messageGo to next message
Rob Frost is currently offline Rob FrostFriend
Messages: 64
Registered: July 2009
Member
hi Andreas,

I'm not exactly clear on how things differ between your two installations:
from the original message in this thread, it sounds like you got the
scenario working at your "work" install, however, based on your last message
from the "Accessing Classes in jar that are exported in J2EE Module Project"
thread, it sounded like you got this same scenario working at your "home"
install.

Why don't you go ahead and open up a bugzilla (j2ee component) and either
attach the projects or include sufficient details to enable a repro of the
problem and I'll investigate further.

-Rob

"Andreas Pakulat" <pakulat@rostock.zgdv.de> wrote in message
news:f6b7pr$m0r$1@build.eclipse.org...
> Andreas Pakulat schrieb:
>> Hi,
>>
>> I've got 2 web applications that depend on a common java project. This
>> java
>> project contains a template library and exports a few .jar files. Its
>> bound
>> to the web applications as J2EE Module Dependecy
>>
>> When publishing the 2 web apps into a Tomcat server (5.5.20) I'm getting
>> an
>> error message reading:
>>
>> Error creating TagLib.jar: duplicate entry META-INF/zgdv.tld
>>
>> Now I do have that file in the source directory of the TagLib project.
>> This
>> project works fine @work, but fails to publish here. All that changed
>> from
>> work to here is that I'm using Eclipse 3.3rc4 and used the Quick-Fix for
>> properly exporting the jars that are included in the TagLib project. Then
>> I
>> removed these exported jars from the 2 webapps to resolve the
>> now-appearing
>> conflicts. However now I face this error and I really don't know how to
>> deal with that.
>
> Nobody with an idea? I really don't see why this would happen in the
> project there is only 1 .tld file under META-INF and I doubt Eclipse
> generates its own tld file.
>
> Andreas
Re: Duplicate entry error when publishing webapps to tomcat [message #195416 is a reply to message #195401] Mon, 02 July 2007 17:47 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
I've been short on cycles lately. At this point, all I have is this
scenario to show the problem:

1. In a new workspace, create a server runtime (I used Tomcat 5.5).
2. Create a Java utility project.
3. Create a Dynamic Web Project.
4. Make the Java utility project a dependency of the web project.
5. In the META-INF folder of the utility project create a file (I used
an empty test.txt file)
6. Add the web project to the server and publish. No problems so far.
7. Add external jar to utility project and export the jar.
8. Use Quick Fix to "publish/export" the jar and republish the server.
The "duplicate entry" error now appears for the test.txt file.

Cheers,
Larry

Rob Frost wrote:
> hi Andreas,
>
> I'm not exactly clear on how things differ between your two installations:
> from the original message in this thread, it sounds like you got the
> scenario working at your "work" install, however, based on your last message
> from the "Accessing Classes in jar that are exported in J2EE Module Project"
> thread, it sounded like you got this same scenario working at your "home"
> install.
>
> Why don't you go ahead and open up a bugzilla (j2ee component) and either
> attach the projects or include sufficient details to enable a repro of the
> problem and I'll investigate further.
>
> -Rob
>
> "Andreas Pakulat" <pakulat@rostock.zgdv.de> wrote in message
> news:f6b7pr$m0r$1@build.eclipse.org...
>> Andreas Pakulat schrieb:
>>> Hi,
>>>
>>> I've got 2 web applications that depend on a common java project. This
>>> java
>>> project contains a template library and exports a few .jar files. Its
>>> bound
>>> to the web applications as J2EE Module Dependecy
>>>
>>> When publishing the 2 web apps into a Tomcat server (5.5.20) I'm getting
>>> an
>>> error message reading:
>>>
>>> Error creating TagLib.jar: duplicate entry META-INF/zgdv.tld
>>>
>>> Now I do have that file in the source directory of the TagLib project.
>>> This
>>> project works fine @work, but fails to publish here. All that changed
>>> from
>>> work to here is that I'm using Eclipse 3.3rc4 and used the Quick-Fix for
>>> properly exporting the jars that are included in the TagLib project. Then
>>> I
>>> removed these exported jars from the 2 webapps to resolve the
>>> now-appearing
>>> conflicts. However now I face this error and I really don't know how to
>>> deal with that.
>> Nobody with an idea? I really don't see why this would happen in the
>> project there is only 1 .tld file under META-INF and I doubt Eclipse
>> generates its own tld file.
>>
>> Andreas
>
>
Re: Duplicate entry error when publishing webapps to tomcat [message #195424 is a reply to message #195416] Mon, 02 July 2007 18:11 Go to previous messageGo to next message
Rob Frost is currently offline Rob FrostFriend
Messages: 64
Registered: July 2009
Member
Thanks, Larry

I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=195166 to track this
and I'll do some initial investigation and determine if this is Tomcat
specific or an underlying j2ee publishing issue.

-Rob

"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:f6bdmq$5m3$1@build.eclipse.org...
> I've been short on cycles lately. At this point, all I have is this
> scenario to show the problem:
>
> 1. In a new workspace, create a server runtime (I used Tomcat 5.5).
> 2. Create a Java utility project.
> 3. Create a Dynamic Web Project.
> 4. Make the Java utility project a dependency of the web project.
> 5. In the META-INF folder of the utility project create a file (I used an
> empty test.txt file)
> 6. Add the web project to the server and publish. No problems so far.
> 7. Add external jar to utility project and export the jar.
> 8. Use Quick Fix to "publish/export" the jar and republish the server. The
> "duplicate entry" error now appears for the test.txt file.
>
> Cheers,
> Larry
>
> Rob Frost wrote:
>> hi Andreas,
>>
>> I'm not exactly clear on how things differ between your two
>> installations: from the original message in this thread, it sounds like
>> you got the scenario working at your "work" install, however, based on
>> your last message from the "Accessing Classes in jar that are exported in
>> J2EE Module Project" thread, it sounded like you got this same scenario
>> working at your "home" install.
>>
>> Why don't you go ahead and open up a bugzilla (j2ee component) and either
>> attach the projects or include sufficient details to enable a repro of
>> the problem and I'll investigate further.
>>
>> -Rob
>>
>> "Andreas Pakulat" <pakulat@rostock.zgdv.de> wrote in message
>> news:f6b7pr$m0r$1@build.eclipse.org...
>>> Andreas Pakulat schrieb:
>>>> Hi,
>>>>
>>>> I've got 2 web applications that depend on a common java project. This
>>>> java
>>>> project contains a template library and exports a few .jar files. Its
>>>> bound
>>>> to the web applications as J2EE Module Dependecy
>>>>
>>>> When publishing the 2 web apps into a Tomcat server (5.5.20) I'm
>>>> getting an
>>>> error message reading:
>>>>
>>>> Error creating TagLib.jar: duplicate entry META-INF/zgdv.tld
>>>>
>>>> Now I do have that file in the source directory of the TagLib project.
>>>> This
>>>> project works fine @work, but fails to publish here. All that changed
>>>> from
>>>> work to here is that I'm using Eclipse 3.3rc4 and used the Quick-Fix
>>>> for
>>>> properly exporting the jars that are included in the TagLib project.
>>>> Then I
>>>> removed these exported jars from the 2 webapps to resolve the
>>>> now-appearing
>>>> conflicts. However now I face this error and I really don't know how to
>>>> deal with that.
>>> Nobody with an idea? I really don't see why this would happen in the
>>> project there is only 1 .tld file under META-INF and I doubt Eclipse
>>> generates its own tld file.
>>>
>>> Andreas
>>
Re: Duplicate entry error when publishing webapps to tomcat [message #195432 is a reply to message #195424] Mon, 02 July 2007 18:56 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Andreas,

You may want to add yourself as a CC for the bug Rob created to track
handling for this bug. When the jar is "publish/exported", some
handling is triggered to include this jar in the Class-Path setting of
the MANIFEST.MF for the utility jar. A bug in this handling causes any
additional file added to the utility project's META-INF folder to invoke
the "duplicate entry" problem. The only workaround I see is to patch
the org.eclipse.jst.j2ee plug-in. If you have installed the source for
JST, this is fairly straightforward to do, if you are interested.

Cheers,
Larry

Rob Frost wrote:
> Thanks, Larry
>
> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=195166 to track this
> and I'll do some initial investigation and determine if this is Tomcat
> specific or an underlying j2ee publishing issue.
>
> -Rob
>
> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
> news:f6bdmq$5m3$1@build.eclipse.org...
>> I've been short on cycles lately. At this point, all I have is this
>> scenario to show the problem:
>>
>> 1. In a new workspace, create a server runtime (I used Tomcat 5.5).
>> 2. Create a Java utility project.
>> 3. Create a Dynamic Web Project.
>> 4. Make the Java utility project a dependency of the web project.
>> 5. In the META-INF folder of the utility project create a file (I used an
>> empty test.txt file)
>> 6. Add the web project to the server and publish. No problems so far.
>> 7. Add external jar to utility project and export the jar.
>> 8. Use Quick Fix to "publish/export" the jar and republish the server. The
>> "duplicate entry" error now appears for the test.txt file.
>>
>> Cheers,
>> Larry
>>
>> Rob Frost wrote:
>>> hi Andreas,
>>>
>>> I'm not exactly clear on how things differ between your two
>>> installations: from the original message in this thread, it sounds like
>>> you got the scenario working at your "work" install, however, based on
>>> your last message from the "Accessing Classes in jar that are exported in
>>> J2EE Module Project" thread, it sounded like you got this same scenario
>>> working at your "home" install.
>>>
>>> Why don't you go ahead and open up a bugzilla (j2ee component) and either
>>> attach the projects or include sufficient details to enable a repro of
>>> the problem and I'll investigate further.
>>>
>>> -Rob
>>>
>>> "Andreas Pakulat" <pakulat@rostock.zgdv.de> wrote in message
>>> news:f6b7pr$m0r$1@build.eclipse.org...
>>>> Andreas Pakulat schrieb:
>>>>> Hi,
>>>>>
>>>>> I've got 2 web applications that depend on a common java project. This
>>>>> java
>>>>> project contains a template library and exports a few .jar files. Its
>>>>> bound
>>>>> to the web applications as J2EE Module Dependecy
>>>>>
>>>>> When publishing the 2 web apps into a Tomcat server (5.5.20) I'm
>>>>> getting an
>>>>> error message reading:
>>>>>
>>>>> Error creating TagLib.jar: duplicate entry META-INF/zgdv.tld
>>>>>
>>>>> Now I do have that file in the source directory of the TagLib project.
>>>>> This
>>>>> project works fine @work, but fails to publish here. All that changed
>>>>> from
>>>>> work to here is that I'm using Eclipse 3.3rc4 and used the Quick-Fix
>>>>> for
>>>>> properly exporting the jars that are included in the TagLib project.
>>>>> Then I
>>>>> removed these exported jars from the 2 webapps to resolve the
>>>>> now-appearing
>>>>> conflicts. However now I face this error and I really don't know how to
>>>>> deal with that.
>>>> Nobody with an idea? I really don't see why this would happen in the
>>>> project there is only 1 .tld file under META-INF and I doubt Eclipse
>>>> generates its own tld file.
>>>>
>>>> Andreas
>
Re: Duplicate entry error when publishing webapps to tomcat [message #195441 is a reply to message #195432] Mon, 02 July 2007 19:26 Go to previous messageGo to next message
Rob Frost is currently offline Rob FrostFriend
Messages: 64
Registered: July 2009
Member
Other workarounds would be to structure your application to avoid having a
utilty project that both exposes JARs for export/publish and includes
additional content under META-INF (i.e. expose the common JARs using a User
Library, that you mark for export publish, use multiple dependent utility
projects)

-Rob


"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:f6bhp1$ea2$1@build.eclipse.org...
> Andreas,
>
> You may want to add yourself as a CC for the bug Rob created to track
> handling for this bug. When the jar is "publish/exported", some handling
> is triggered to include this jar in the Class-Path setting of the
> MANIFEST.MF for the utility jar. A bug in this handling causes any
> additional file added to the utility project's META-INF folder to invoke
> the "duplicate entry" problem. The only workaround I see is to patch the
> org.eclipse.jst.j2ee plug-in. If you have installed the source for JST,
> this is fairly straightforward to do, if you are interested.
>
> Cheers,
> Larry
>
> Rob Frost wrote:
>> Thanks, Larry
>>
>> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=195166 to track
>> this and I'll do some initial investigation and determine if this is
>> Tomcat specific or an underlying j2ee publishing issue.
>>
>> -Rob
>>
>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>> news:f6bdmq$5m3$1@build.eclipse.org...
>>> I've been short on cycles lately. At this point, all I have is this
>>> scenario to show the problem:
>>>
>>> 1. In a new workspace, create a server runtime (I used Tomcat 5.5).
>>> 2. Create a Java utility project.
>>> 3. Create a Dynamic Web Project.
>>> 4. Make the Java utility project a dependency of the web project.
>>> 5. In the META-INF folder of the utility project create a file (I used
>>> an empty test.txt file)
>>> 6. Add the web project to the server and publish. No problems so far.
>>> 7. Add external jar to utility project and export the jar.
>>> 8. Use Quick Fix to "publish/export" the jar and republish the server.
>>> The "duplicate entry" error now appears for the test.txt file.
>>>
>>> Cheers,
>>> Larry
>>>
>>> Rob Frost wrote:
>>>> hi Andreas,
>>>>
>>>> I'm not exactly clear on how things differ between your two
>>>> installations: from the original message in this thread, it sounds like
>>>> you got the scenario working at your "work" install, however, based on
>>>> your last message from the "Accessing Classes in jar that are exported
>>>> in J2EE Module Project" thread, it sounded like you got this same
>>>> scenario working at your "home" install.
>>>>
>>>> Why don't you go ahead and open up a bugzilla (j2ee component) and
>>>> either attach the projects or include sufficient details to enable a
>>>> repro of the problem and I'll investigate further.
>>>>
>>>> -Rob
>>>>
>>>> "Andreas Pakulat" <pakulat@rostock.zgdv.de> wrote in message
>>>> news:f6b7pr$m0r$1@build.eclipse.org...
>>>>> Andreas Pakulat schrieb:
>>>>>> Hi,
>>>>>>
>>>>>> I've got 2 web applications that depend on a common java project.
>>>>>> This java
>>>>>> project contains a template library and exports a few .jar files. Its
>>>>>> bound
>>>>>> to the web applications as J2EE Module Dependecy
>>>>>>
>>>>>> When publishing the 2 web apps into a Tomcat server (5.5.20) I'm
>>>>>> getting an
>>>>>> error message reading:
>>>>>>
>>>>>> Error creating TagLib.jar: duplicate entry META-INF/zgdv.tld
>>>>>>
>>>>>> Now I do have that file in the source directory of the TagLib
>>>>>> project. This
>>>>>> project works fine @work, but fails to publish here. All that changed
>>>>>> from
>>>>>> work to here is that I'm using Eclipse 3.3rc4 and used the Quick-Fix
>>>>>> for
>>>>>> properly exporting the jars that are included in the TagLib project.
>>>>>> Then I
>>>>>> removed these exported jars from the 2 webapps to resolve the
>>>>>> now-appearing
>>>>>> conflicts. However now I face this error and I really don't know how
>>>>>> to
>>>>>> deal with that.
>>>>> Nobody with an idea? I really don't see why this would happen in the
>>>>> project there is only 1 .tld file under META-INF and I doubt Eclipse
>>>>> generates its own tld file.
>>>>>
>>>>> Andreas
>>
Re: Duplicate entry error when publishing webapps to tomcat [message #195527 is a reply to message #195441] Tue, 03 July 2007 10:19 Go to previous message
Eclipse UserFriend
Originally posted by: pakulat.rostock.zgdv.de

Thanks for investigating. I can create a patched jar for the local
usage, as none of the workarounds will work properly with our project
structure.

Andreas

Rob Frost schrieb:
> Other workarounds would be to structure your application to avoid having a
> utilty project that both exposes JARs for export/publish and includes
> additional content under META-INF (i.e. expose the common JARs using a User
> Library, that you mark for export publish, use multiple dependent utility
> projects)
>
> -Rob
>
>
> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
> news:f6bhp1$ea2$1@build.eclipse.org...
>> Andreas,
>>
>> You may want to add yourself as a CC for the bug Rob created to track
>> handling for this bug. When the jar is "publish/exported", some handling
>> is triggered to include this jar in the Class-Path setting of the
>> MANIFEST.MF for the utility jar. A bug in this handling causes any
>> additional file added to the utility project's META-INF folder to invoke
>> the "duplicate entry" problem. The only workaround I see is to patch the
>> org.eclipse.jst.j2ee plug-in. If you have installed the source for JST,
>> this is fairly straightforward to do, if you are interested.
>>
>> Cheers,
>> Larry
>>
>> Rob Frost wrote:
>>> Thanks, Larry
>>>
>>> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=195166 to track
>>> this and I'll do some initial investigation and determine if this is
>>> Tomcat specific or an underlying j2ee publishing issue.
>>>
>>> -Rob
>>>
>>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>>> news:f6bdmq$5m3$1@build.eclipse.org...
>>>> I've been short on cycles lately. At this point, all I have is this
>>>> scenario to show the problem:
>>>>
>>>> 1. In a new workspace, create a server runtime (I used Tomcat 5.5).
>>>> 2. Create a Java utility project.
>>>> 3. Create a Dynamic Web Project.
>>>> 4. Make the Java utility project a dependency of the web project.
>>>> 5. In the META-INF folder of the utility project create a file (I used
>>>> an empty test.txt file)
>>>> 6. Add the web project to the server and publish. No problems so far.
>>>> 7. Add external jar to utility project and export the jar.
>>>> 8. Use Quick Fix to "publish/export" the jar and republish the server.
>>>> The "duplicate entry" error now appears for the test.txt file.
>>>>
>>>> Cheers,
>>>> Larry
>>>>
>>>> Rob Frost wrote:
>>>>> hi Andreas,
>>>>>
>>>>> I'm not exactly clear on how things differ between your two
>>>>> installations: from the original message in this thread, it sounds like
>>>>> you got the scenario working at your "work" install, however, based on
>>>>> your last message from the "Accessing Classes in jar that are exported
>>>>> in J2EE Module Project" thread, it sounded like you got this same
>>>>> scenario working at your "home" install.
>>>>>
>>>>> Why don't you go ahead and open up a bugzilla (j2ee component) and
>>>>> either attach the projects or include sufficient details to enable a
>>>>> repro of the problem and I'll investigate further.
>>>>>
>>>>> -Rob
>>>>>
>>>>> "Andreas Pakulat" <pakulat@rostock.zgdv.de> wrote in message
>>>>> news:f6b7pr$m0r$1@build.eclipse.org...
>>>>>> Andreas Pakulat schrieb:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I've got 2 web applications that depend on a common java project.
>>>>>>> This java
>>>>>>> project contains a template library and exports a few .jar files. Its
>>>>>>> bound
>>>>>>> to the web applications as J2EE Module Dependecy
>>>>>>>
>>>>>>> When publishing the 2 web apps into a Tomcat server (5.5.20) I'm
>>>>>>> getting an
>>>>>>> error message reading:
>>>>>>>
>>>>>>> Error creating TagLib.jar: duplicate entry META-INF/zgdv.tld
>>>>>>>
>>>>>>> Now I do have that file in the source directory of the TagLib
>>>>>>> project. This
>>>>>>> project works fine @work, but fails to publish here. All that changed
>>>>>>> from
>>>>>>> work to here is that I'm using Eclipse 3.3rc4 and used the Quick-Fix
>>>>>>> for
>>>>>>> properly exporting the jars that are included in the TagLib project.
>>>>>>> Then I
>>>>>>> removed these exported jars from the 2 webapps to resolve the
>>>>>>> now-appearing
>>>>>>> conflicts. However now I face this error and I really don't know how
>>>>>>> to
>>>>>>> deal with that.
>>>>>> Nobody with an idea? I really don't see why this would happen in the
>>>>>> project there is only 1 .tld file under META-INF and I doubt Eclipse
>>>>>> generates its own tld file.
>>>>>>
>>>>>> Andreas
>
>
Previous Topic:The preferences for the xdoclet runtime does not point to a valid installation.
Next Topic:Acessing Classes in jar that are exported from J2EE Module Project
Goto Forum:
  


Current Time: Fri Apr 19 06:47:37 GMT 2024

Powered by FUDForum. Page generated in 0.02508 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top