Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Tomcat WAR Deployment Problem
Tomcat WAR Deployment Problem [message #192562] Wed, 16 May 2007 15:03 Go to next message
Mirza Hadzic is currently offline Mirza HadzicFriend
Messages: 19
Registered: July 2009
Junior Member
Hello,

I exported my service to WAR but classes from projects listed in J2EE
module dependences are not included, only classes of main Dynamic Web
Project. Browsing inside WAR shows that:

- in WEB-INF/libs there are .jars of those dependant projects, but those
jars contain only META-INF/manifest.mf file
- in WEB-INF/classes those projects are not presented. Classes *was*
here, but not any more, what was changed AFAIK is that I switched
server from Tomcat 5 to 5.5 and back to 5 again.

I repeated cycle several times (create web servece, export to WAR) but
still dependent projects are not there...

Am I doing something wrong here?

Thanks,

Mirza
Re: Tomcat WAR Deployment Problem [message #192579 is a reply to message #192562] Wed, 16 May 2007 16:38 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
The problem is the near empty dependant jars in the WAR's WEB-INF/lib.
Which version of Web Tools are you using? Also, if you add the project
to a Tomcat server, are the deployed dependant jars also near empty?

Cheers,
Larry

mirza wrote:
> Hello,
>
> I exported my service to WAR but classes from projects listed in J2EE
> module dependences are not included, only classes of main Dynamic Web
> Project. Browsing inside WAR shows that:
>
> - in WEB-INF/libs there are .jars of those dependant projects, but those
> jars contain only META-INF/manifest.mf file
> - in WEB-INF/classes those projects are not presented. Classes *was*
> here, but not any more, what was changed AFAIK is that I switched
> server from Tomcat 5 to 5.5 and back to 5 again.
>
> I repeated cycle several times (create web servece, export to WAR) but
> still dependent projects are not there...
>
> Am I doing something wrong here?
>
> Thanks,
>
> Mirza
Re: Tomcat WAR Deployment Problem [message #192655 is a reply to message #192579] Thu, 17 May 2007 07:30 Go to previous messageGo to next message
Mirza Hadzic is currently offline Mirza HadzicFriend
Messages: 19
Registered: July 2009
Junior Member
In Tomcat deployment directory, dependent jars are not there at all. But
jars that are added as external jars to module dependecies. Missing are
jars of dependent projects from my workspace (those are simple java
projects). WAR export, it seems, create those jars, but only with one
file: META-INF/manifest.mf.

I am using WTP 1.5.4

Regards,

Mirza



Larry Isaacs wrote:
> The problem is the near empty dependant jars in the WAR's WEB-INF/lib.
> Which version of Web Tools are you using? Also, if you add the project
> to a Tomcat server, are the deployed dependant jars also near empty?
>
> Cheers,
> Larry
>
> mirza wrote:
>> Hello,
>>
>> I exported my service to WAR but classes from projects listed in J2EE
>> module dependences are not included, only classes of main Dynamic Web
>> Project. Browsing inside WAR shows that:
>>
>> - in WEB-INF/libs there are .jars of those dependant projects, but
>> those jars contain only META-INF/manifest.mf file
>> - in WEB-INF/classes those projects are not presented. Classes *was*
>> here, but not any more, what was changed AFAIK is that I switched
>> server from Tomcat 5 to 5.5 and back to 5 again.
>>
>> I repeated cycle several times (create web servece, export to WAR) but
>> still dependent projects are not there...
>>
>> Am I doing something wrong here?
>>
>> Thanks,
>>
>> Mirza
Re: Tomcat WAR Deployment Problem + typo [message #192662 is a reply to message #192579] Thu, 17 May 2007 07:33 Go to previous messageGo to next message
Mirza Hadzic is currently offline Mirza HadzicFriend
Messages: 19
Registered: July 2009
Junior Member
In Tomcat deployment directory, dependent jars are not there at all. But
jars that are added as external jars to module dependencies *are there*.
Missing are jars of dependent projects from my workspace (those are
simple java projects). WAR export, it seems, create those jars, but only
with one file: META-INF/manifest.mf.

I am using WTP 1.5.4

Regards,

Mirza

Larry Isaacs wrote:
> The problem is the near empty dependant jars in the WAR's WEB-INF/lib.
> Which version of Web Tools are you using? Also, if you add the project
> to a Tomcat server, are the deployed dependant jars also near empty?
>
> Cheers,
> Larry
>
> mirza wrote:
>> Hello,
>>
>> I exported my service to WAR but classes from projects listed in J2EE
>> module dependences are not included, only classes of main Dynamic Web
>> Project. Browsing inside WAR shows that:
>>
>> - in WEB-INF/libs there are .jars of those dependant projects, but
>> those jars contain only META-INF/manifest.mf file
>> - in WEB-INF/classes those projects are not presented. Classes *was*
>> here, but not any more, what was changed AFAIK is that I switched
>> server from Tomcat 5 to 5.5 and back to 5 again.
>>
>> I repeated cycle several times (create web servece, export to WAR) but
>> still dependent projects are not there...
>>
>> Am I doing something wrong here?
>>
>> Thanks,
>>
>> Mirza
Re: Tomcat WAR Deployment Problem + typo [message #192692 is a reply to message #192662] Thu, 17 May 2007 14:45 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Just to be sure, if you remove the project from the server, publish the
server, add the project back, and publish the server again, are the jars
for the dependent utility Java projects still missing?

Larry

mirza wrote:
>
> In Tomcat deployment directory, dependent jars are not there at all. But
> jars that are added as external jars to module dependencies *are there*.
> Missing are jars of dependent projects from my workspace (those are
> simple java projects). WAR export, it seems, create those jars, but only
> with one file: META-INF/manifest.mf.
>
> I am using WTP 1.5.4
>
> Regards,
>
> Mirza
>
> Larry Isaacs wrote:
>> The problem is the near empty dependant jars in the WAR's WEB-INF/lib.
>> Which version of Web Tools are you using? Also, if you add the
>> project to a Tomcat server, are the deployed dependant jars also near
>> empty?
>>
>> Cheers,
>> Larry
>>
>> mirza wrote:
>>> Hello,
>>>
>>> I exported my service to WAR but classes from projects listed in J2EE
>>> module dependences are not included, only classes of main Dynamic Web
>>> Project. Browsing inside WAR shows that:
>>>
>>> - in WEB-INF/libs there are .jars of those dependant projects, but
>>> those jars contain only META-INF/manifest.mf file
>>> - in WEB-INF/classes those projects are not presented. Classes *was*
>>> here, but not any more, what was changed AFAIK is that I switched
>>> server from Tomcat 5 to 5.5 and back to 5 again.
>>>
>>> I repeated cycle several times (create web servece, export to WAR)
>>> but still dependent projects are not there...
>>>
>>> Am I doing something wrong here?
>>>
>>> Thanks,
>>>
>>> Mirza
Re: Tomcat WAR Deployment Problem + typo [message #192700 is a reply to message #192692] Thu, 17 May 2007 15:22 Go to previous messageGo to next message
Mirza Hadzic is currently offline Mirza HadzicFriend
Messages: 19
Registered: July 2009
Junior Member
Now those almost-empty-dependent-jars are not inside WEB-INF/lib. But
those dependent projects are correctly listed in Servers view, as
sub-nodes of dynamic project.

Mirza

Larry Isaacs wrote:
> Just to be sure, if you remove the project from the server, publish the
> server, add the project back, and publish the server again, are the jars
> for the dependent utility Java projects still missing?
>
> Larry
>
> mirza wrote:
>>
>> In Tomcat deployment directory, dependent jars are not there at all.
>> But jars that are added as external jars to module dependencies *are
>> there*. Missing are jars of dependent projects from my workspace
>> (those are simple java projects). WAR export, it seems, create those
>> jars, but only with one file: META-INF/manifest.mf.
>>
>> I am using WTP 1.5.4
>>
>> Regards,
>>
>> Mirza
>>
>> Larry Isaacs wrote:
>>> The problem is the near empty dependant jars in the WAR's
>>> WEB-INF/lib. Which version of Web Tools are you using? Also, if you
>>> add the project to a Tomcat server, are the deployed dependant jars
>>> also near empty?
>>>
>>> Cheers,
>>> Larry
>>>
>>> mirza wrote:
>>>> Hello,
>>>>
>>>> I exported my service to WAR but classes from projects listed in
>>>> J2EE module dependences are not included, only classes of main
>>>> Dynamic Web Project. Browsing inside WAR shows that:
>>>>
>>>> - in WEB-INF/libs there are .jars of those dependant projects, but
>>>> those jars contain only META-INF/manifest.mf file
>>>> - in WEB-INF/classes those projects are not presented. Classes *was*
>>>> here, but not any more, what was changed AFAIK is that I switched
>>>> server from Tomcat 5 to 5.5 and back to 5 again.
>>>>
>>>> I repeated cycle several times (create web servece, export to WAR)
>>>> but still dependent projects are not there...
>>>>
>>>> Am I doing something wrong here?
>>>>
>>>> Thanks,
>>>>
>>>> Mirza
Re: Tomcat WAR Deployment Problem + typo [message #192716 is a reply to message #192700] Thu, 17 May 2007 17:50 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Unfortunately, I don't have any good ideas as to what could trip up the
jar creation in this manner. If you create a new "test" Dynamic Web
Project and new dependent Utility Java project with some test class, do
they exhibit the same behavior? I assume there aren't any seemingly
related errors in the Error Log view.

Larry

mirza wrote:
>
> Now those almost-empty-dependent-jars are not inside WEB-INF/lib. But
> those dependent projects are correctly listed in Servers view, as
> sub-nodes of dynamic project.
>
> Mirza
>
> Larry Isaacs wrote:
>> Just to be sure, if you remove the project from the server, publish
>> the server, add the project back, and publish the server again, are
>> the jars for the dependent utility Java projects still missing?
>>
>> Larry
>>
>> mirza wrote:
>>>
>>> In Tomcat deployment directory, dependent jars are not there at all.
>>> But jars that are added as external jars to module dependencies *are
>>> there*. Missing are jars of dependent projects from my workspace
>>> (those are simple java projects). WAR export, it seems, create those
>>> jars, but only with one file: META-INF/manifest.mf.
>>>
>>> I am using WTP 1.5.4
>>>
>>> Regards,
>>>
>>> Mirza
>>>
>>> Larry Isaacs wrote:
>>>> The problem is the near empty dependant jars in the WAR's
>>>> WEB-INF/lib. Which version of Web Tools are you using? Also, if you
>>>> add the project to a Tomcat server, are the deployed dependant jars
>>>> also near empty?
>>>>
>>>> Cheers,
>>>> Larry
>>>>
>>>> mirza wrote:
>>>>> Hello,
>>>>>
>>>>> I exported my service to WAR but classes from projects listed in
>>>>> J2EE module dependences are not included, only classes of main
>>>>> Dynamic Web Project. Browsing inside WAR shows that:
>>>>>
>>>>> - in WEB-INF/libs there are .jars of those dependant projects, but
>>>>> those jars contain only META-INF/manifest.mf file
>>>>> - in WEB-INF/classes those projects are not presented. Classes
>>>>> *was* here, but not any more, what was changed AFAIK is that I
>>>>> switched server from Tomcat 5 to 5.5 and back to 5 again.
>>>>>
>>>>> I repeated cycle several times (create web servece, export to WAR)
>>>>> but still dependent projects are not there...
>>>>>
>>>>> Am I doing something wrong here?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Mirza
Re: Tomcat WAR Deployment Problem + typo [message #192754 is a reply to message #192716] Fri, 18 May 2007 08:10 Go to previous messageGo to next message
Mirza Hadzic is currently offline Mirza HadzicFriend
Messages: 19
Registered: July 2009
Junior Member
Small test project was good idea. I think I found something: seems that
dependent project works fine *IF* in "New Java Project" dialog it is set
to "project Layout -> create separate source and output folders". That
is *not* default setting and it seems that it is not possible to change
this setting for existing projects, except re-creating it.

Mirza

Larry Isaacs wrote:
> Unfortunately, I don't have any good ideas as to what could trip up the
> jar creation in this manner. If you create a new "test" Dynamic Web
> Project and new dependent Utility Java project with some test class, do
> they exhibit the same behavior? I assume there aren't any seemingly
> related errors in the Error Log view.
>
> Larry
>
> mirza wrote:
>>
>> Now those almost-empty-dependent-jars are not inside WEB-INF/lib. But
>> those dependent projects are correctly listed in Servers view, as
>> sub-nodes of dynamic project.
>>
>> Mirza
>>
>> Larry Isaacs wrote:
>>> Just to be sure, if you remove the project from the server, publish
>>> the server, add the project back, and publish the server again, are
>>> the jars for the dependent utility Java projects still missing?
>>>
>>> Larry
>>>
>>> mirza wrote:
>>>>
>>>> In Tomcat deployment directory, dependent jars are not there at all.
>>>> But jars that are added as external jars to module dependencies *are
>>>> there*. Missing are jars of dependent projects from my workspace
>>>> (those are simple java projects). WAR export, it seems, create those
>>>> jars, but only with one file: META-INF/manifest.mf.
>>>>
>>>> I am using WTP 1.5.4
>>>>
>>>> Regards,
>>>>
>>>> Mirza
>>>>
>>>> Larry Isaacs wrote:
>>>>> The problem is the near empty dependant jars in the WAR's
>>>>> WEB-INF/lib. Which version of Web Tools are you using? Also, if
>>>>> you add the project to a Tomcat server, are the deployed dependant
>>>>> jars also near empty?
>>>>>
>>>>> Cheers,
>>>>> Larry
>>>>>
>>>>> mirza wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I exported my service to WAR but classes from projects listed in
>>>>>> J2EE module dependences are not included, only classes of main
>>>>>> Dynamic Web Project. Browsing inside WAR shows that:
>>>>>>
>>>>>> - in WEB-INF/libs there are .jars of those dependant projects, but
>>>>>> those jars contain only META-INF/manifest.mf file
>>>>>> - in WEB-INF/classes those projects are not presented. Classes
>>>>>> *was* here, but not any more, what was changed AFAIK is that I
>>>>>> switched server from Tomcat 5 to 5.5 and back to 5 again.
>>>>>>
>>>>>> I repeated cycle several times (create web servece, export to WAR)
>>>>>> but still dependent projects are not there...
>>>>>>
>>>>>> Am I doing something wrong here?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Mirza
Re: Tomcat WAR Deployment Problem + typo [message #192770 is a reply to message #192754] Fri, 18 May 2007 13:04 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
As you may already be aware, there is a preference setting for
defaulting to separate source and output folders. In Eclipse 3.3, the
default is now "separate". In an existing Java project, you can open
the project's Properties dialog and select the Java Build Path page
followed by the Source tab. Click Add Folder and Create New Folder.
Enter a source folder name, such as "src", and click Finish followed by
OK. A dialog will pop up asking if it is okay to remove the project as
the source folder and use "bin" a new output folder. Answer Yes and
click OK to exit the Properties dialog. Another dialog will pop up
asking about removing the old build output. Answer Yes. You can now
click and drag the folders which still contain your source and drop them
onto the new source folder. This should get you to the same state as
selecting separate source and output folders when creating the project.

The key to properly "linking" utility project to web project is in the
org.eclipse.wst.common.component file found under the ".settings" folder
of both projects. My first notion is that something may be amiss in
these files. You may want to examine these files and see if you can
make some sense out of them. Maybe compare what you see in some working
test projects with what you see in your problem projects. In a quick
test of the above "separate source and output folder project
conversion", the org.eclipse.wst.common.component file was updated
properly. If you haven't already altered or recreated those Java
projects, you might give the conversion a try and see if it fixes the
org.eclipse.wst.common.component file (assuming that is the problem).
My only other shot in the dark guess would be that the problem projects
need to be refreshed in your workspace, though I think it's likely you
have already tried that.

Cheers,
Larry
mirza wrote:
> Small test project was good idea. I think I found something: seems that
> dependent project works fine *IF* in "New Java Project" dialog it is set
> to "project Layout -> create separate source and output folders". That
> is *not* default setting and it seems that it is not possible to change
> this setting for existing projects, except re-creating it.
>
> Mirza
>
> Larry Isaacs wrote:
>> Unfortunately, I don't have any good ideas as to what could trip up
>> the jar creation in this manner. If you create a new "test" Dynamic
>> Web Project and new dependent Utility Java project with some test
>> class, do they exhibit the same behavior? I assume there aren't any
>> seemingly related errors in the Error Log view.
>>
>> Larry
>>
>> mirza wrote:
>>>
>>> Now those almost-empty-dependent-jars are not inside WEB-INF/lib. But
>>> those dependent projects are correctly listed in Servers view, as
>>> sub-nodes of dynamic project.
>>>
>>> Mirza
>>>
>>> Larry Isaacs wrote:
>>>> Just to be sure, if you remove the project from the server, publish
>>>> the server, add the project back, and publish the server again, are
>>>> the jars for the dependent utility Java projects still missing?
>>>>
>>>> Larry
>>>>
>>>> mirza wrote:
>>>>>
>>>>> In Tomcat deployment directory, dependent jars are not there at
>>>>> all. But jars that are added as external jars to module
>>>>> dependencies *are there*. Missing are jars of dependent projects
>>>>> from my workspace (those are simple java projects). WAR export, it
>>>>> seems, create those jars, but only with one file:
>>>>> META-INF/manifest.mf.
>>>>>
>>>>> I am using WTP 1.5.4
>>>>>
>>>>> Regards,
>>>>>
>>>>> Mirza
>>>>>
>>>>> Larry Isaacs wrote:
>>>>>> The problem is the near empty dependant jars in the WAR's
>>>>>> WEB-INF/lib. Which version of Web Tools are you using? Also, if
>>>>>> you add the project to a Tomcat server, are the deployed dependant
>>>>>> jars also near empty?
>>>>>>
>>>>>> Cheers,
>>>>>> Larry
>>>>>>
>>>>>> mirza wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I exported my service to WAR but classes from projects listed in
>>>>>>> J2EE module dependences are not included, only classes of main
>>>>>>> Dynamic Web Project. Browsing inside WAR shows that:
>>>>>>>
>>>>>>> - in WEB-INF/libs there are .jars of those dependant projects,
>>>>>>> but those jars contain only META-INF/manifest.mf file
>>>>>>> - in WEB-INF/classes those projects are not presented. Classes
>>>>>>> *was* here, but not any more, what was changed AFAIK is that I
>>>>>>> switched server from Tomcat 5 to 5.5 and back to 5 again.
>>>>>>>
>>>>>>> I repeated cycle several times (create web servece, export to
>>>>>>> WAR) but still dependent projects are not there...
>>>>>>>
>>>>>>> Am I doing something wrong here?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Mirza
Previous Topic:Are there any examples for WTP?
Next Topic:New Server Runtime is blank
Goto Forum:
  


Current Time: Fri Mar 29 06:47:24 GMT 2024

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

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

Back to the top