Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Doubts using Java EE Modules Dependencies.
icon5.gif  Doubts using Java EE Modules Dependencies. [message #524386] Wed, 31 March 2010 18:23 Go to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
Hello everyone, im kinda a beggineer w/ eclipse and having a problem using WTP w/ eclipse galileo SR2 and apache tomcat 5.5.25 (Im working on a old project using axis which conflict w/ tomcat 6) using Windows XP.

First the doubt when i try to reproduce the problem on a new project.

First i create the server using a fresh install from zip of tomcat 5.5.25. Then i create a new dynamic web project using default options.

Under Java Build Path of this project i add in Libraries one external JAR (In my test xstream-1.3.jar), then i select this jar on Java EE Module Dependencies.

I add the project on the Tomcat v5.5 Server on eclipse, and use the option Publish.

I check on .metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebap ps\Test\WEB-INF\lib and the xstream jar is there, everything fine so far.

Now, i go on Java Build Path again, and add another external jar: xpp3_min-1.1.4c.jar from xstream, go in Java EE Module Dependencies and select this new JAR. Press OK

And now its the problem, i use the option Clean.. on the Tomcat server, publish again and the new jar isn't published on WEB-INF\lib directory, even if i delete the server on Servers and create again, the new jar isn't published.

If after do this, i create a new server, using tomcat 6.0.20 the new jar still not published.

And the weirdest thing is if i export the project to a war file all jars are correctly @ WEB-INF\lib.

So finally my question? What i have to do to eclipse publish new jar files selected @ Java EE Module Dependencies.

On my real project, i checkout from SVN, but when i add some new jars it don't publish then i can't debug, some old developers are using Europa and its working just fine.

Thanks
Re: Doubts using Java EE Modules Dependencies. [message #524587 is a reply to message #524386] Thu, 01 April 2010 14:16 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Please post the ".classpath" and
".settings/org.eclipse.wst.common.component" file contents so I can
verify what exactly the project says should be included. So far, I have
yet to duplicate this or guess the cause of the behavior.

Cheers,
Larry

Samuel wrote:
> Hello everyone, im kinda a beggineer w/ eclipse and having a problem
> using WTP w/ eclipse galileo SR2 and apache tomcat 5.5.25 (Im working on
> a old project using axis which conflict w/ tomcat 6) using Windows XP.
>
> First the doubt when i try to reproduce the problem on a new project.
>
> First i create the server using a fresh install from zip of tomcat
> 5.5.25. Then i create a new dynamic web project using default options.
>
> Under Java Build Path of this project i add in Libraries one external
> JAR (In my test xstream-1.3.jar), then i select this jar on Java EE
> Module Dependencies.
>
> I add the project on the Tomcat v5.5 Server on eclipse, and use the
> option Publish.
>
> I check on .metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebap
> ps\Test\WEB-INF\lib and the xstream jar is there, everything fine so far.
>
> Now, i go on Java Build Path again, and add another external jar:
> xpp3_min-1.1.4c.jar from xstream, go in Java EE Module Dependencies and
> select this new JAR. Press OK
>
> And now its the problem, i use the option Clean.. on the Tomcat server,
> publish again and the new jar isn't published on WEB-INF\lib directory,
> even if i delete the server on Servers and create again, the new jar
> isn't published.
> If after do this, i create a new server, using tomcat 6.0.20 the new jar
> still not published.
>
> And the weirdest thing is if i export the project to a war file all jars
> are correctly @ WEB-INF\lib.
>
> So finally my question? What i have to do to eclipse publish new jar
> files selected @ Java EE Module Dependencies.
>
> On my real project, i checkout from SVN, but when i add some new jars it
> don't publish then i can't debug, some old developers are using Europa
> and its working just fine.
>
> Thanks
Re: Doubts using Java EE Modules Dependencies. [message #524637 is a reply to message #524587] Thu, 01 April 2010 16:22 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
Larry Isaacs wrote on Thu, 01 April 2010 10:16
Please post the ".classpath" and
".settings/org.eclipse.wst.common.component" file contents so I can
verify what exactly the project says should be included. So far, I have
yet to duplicate this or guess the cause of the behavior.

Cheers,
Larry



Ok, the .classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_20">
		<attributes>
			<attribute name="owner.project.facets" value="jst.java"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5">
		<attributes>
			<attribute name="owner.project.facets" value="jst.web"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
	<classpathentry kind="lib" path="D:/Projetos/trunk/Ant-Base/lib/xstream/xstream-1.3/xstream-1.3.jar">
		<attributes>
			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="lib" path="D:/Projetos/trunk/Ant-Base/lib/xstream/xstream-1.3/xpp3_min-1.1.4c.jar">
		<attributes>
			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="build/classes"/>
</classpath>


The .settings/org.eclipse.wst.common.component:

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="Teste1">
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="Teste1"/>
<property name="java-output-path" value="/Teste1/build/classes"/>
</wb-module>
</project-modules>


Re: Doubts using Java EE Modules Dependencies. [message #524787 is a reply to message #524637] Fri, 02 April 2010 13:56 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Samuel wrote:
> Larry Isaacs wrote on Thu, 01 April 2010 10:16
>> Please post the ".classpath" and
>> ".settings/org.eclipse.wst.common.component" file contents so I can
>> verify what exactly the project says should be included. So far, I
>> have yet to duplicate this or guess the cause of the behavior.
>>
>> Cheers,
>> Larry
>
>
> Ok, the .classpath:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> <classpathentry kind="src" path="src"/>
> <classpathentry kind="con"
> path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.debug.ui.launcher.StandardVMType/jdk1.5.0_20 ">
>
> <attributes>
> <attribute name="owner.project.facets" value="jst.java"/>
> </attributes>
> </classpathentry>
> <classpathentry kind="con"
> path=" org.eclipse.jst.server.core.container/org.eclipse.jst.server .tomcat.runtimeTarget/Apache
> Tomcat v5.5">
> <attributes>
> <attribute name="owner.project.facets" value="jst.web"/>
> </attributes>
> </classpathentry>
> <classpathentry kind="con"
> path="org.eclipse.jst.j2ee.internal.web.container"/>
> <classpathentry kind="con"
> path="org.eclipse.jst.j2ee.internal.module.container"/>
> <classpathentry kind="lib"
> path=" D:/Projetos/trunk/Ant-Base/lib/xstream/xstream-1.3/xstream-1 .3.jar ">
> <attributes>
> <attribute name="org.eclipse.jst.component.dependency"
> value="/WEB-INF/lib"/>
> </attributes>
> </classpathentry>
> <classpathentry kind="lib"
> path=" D:/Projetos/trunk/Ant-Base/lib/xstream/xstream-1.3/xpp3_min- 1.1.4c.jar ">
>
> <attributes>
> <attribute name="org.eclipse.jst.component.dependency"
> value="/WEB-INF/lib"/>
> </attributes>
> </classpathentry>
> <classpathentry kind="output" path="build/classes"/>
> </classpath>
>
>
> The .settings/org.eclipse.wst.common.component:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
> <wb-module deploy-name="Teste1">
> <wb-resource deploy-path="/" source-path="/WebContent"/>
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
> <property name="context-root" value="Teste1"/>
> <property name="java-output-path" value="/Teste1/build/classes"/>
> </wb-module>
> </project-modules>
>
>
>

These both look fine. If you right-click on the server and select
"Clean...", which jars appear under the "tmp0\wtpwebapps\Test1\WEB-INF\lib"?

Thanks,
Larry
Re: Doubts using Java EE Modules Dependencies. [message #525021 is a reply to message #524787] Mon, 05 April 2010 12:17 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
Larry Isaacs wrote on Fri, 02 April 2010 09:56


These both look fine. If you right-click on the server and select
"Clean...", which jars appear under the "tmp0\wtpwebapps\Test1\WEB-INF\lib"?

Thanks,
Larry



The new jars isn't published, i try clean, delete and create server again. Only the first jars i select before first build/publish is published.
Re: Doubts using Java EE Modules Dependencies. [message #525027 is a reply to message #525021] Mon, 05 April 2010 13:10 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Samuel wrote:
> Larry Isaacs wrote on Fri, 02 April 2010 09:56
>> These both look fine. If you right-click on the server and select
>> "Clean...", which jars appear under the
>> "tmp0\wtpwebapps\Test1\WEB-INF\lib"?
>>
>> Thanks,
>> Larry
>
>
>
> The new jars isn't published, i try clean, delete and create server
> again. Only the first jars i select before first build/publish is
> published.

I'm not clear on what you mean exactly by "new jars". The files you
posted show only two external jars specified, xstream-1.3.jar and
xpp3_min-1.1.4c.jar. Are you saying that one or both of these jars
didn't publish, or that there are other jar(s) you are expecting didn't
publish? Your use of "first jars i select" (i.e. plural) seems to imply
those two jars did publish. If you were expecting others to publish
(excluding any that may be in the WebContent/WEB-INF/lib) they are not
reflected in the content of the files you posted.

Cheers,
Larry
Re: Doubts using Java EE Modules Dependencies. [message #525028 is a reply to message #525027] Mon, 05 April 2010 13:16 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
Larry Isaacs wrote on Mon, 05 April 2010 09:10

I'm not clear on what you mean exactly by "new jars". The files you
posted show only two external jars specified, xstream-1.3.jar and
xpp3_min-1.1.4c.jar. Are you saying that one or both of these jars
didn't publish, or that there are other jar(s) you are expecting didn't
publish? Your use of "first jars i select" (i.e. plural) seems to imply
those two jars did publish. If you were expecting others to publish
(excluding any that may be in the WebContent/WEB-INF/lib) they are not
reflected in the content of the files you posted.

Cheers,
Larry


When i create the project, i add only one external jar (on my test xstream-1.3.jar) then i publish, the problem is when i add another after first publish.

The xpp* on this case, i add it after, but w/e i try, this xpp*.jar isn't published.
Re: Doubts using Java EE Modules Dependencies. [message #525039 is a reply to message #525028] Mon, 05 April 2010 14:21 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Samuel wrote:
> Larry Isaacs wrote on Mon, 05 April 2010 09:10
>> I'm not clear on what you mean exactly by "new jars". The files you
>> posted show only two external jars specified, xstream-1.3.jar and
>> xpp3_min-1.1.4c.jar. Are you saying that one or both of these jars
>> didn't publish, or that there are other jar(s) you are expecting
>> didn't publish? Your use of "first jars i select" (i.e. plural) seems
>> to imply those two jars did publish. If you were expecting others to
>> publish (excluding any that may be in the WebContent/WEB-INF/lib) they
>> are not reflected in the content of the files you posted.
>>
>> Cheers,
>> Larry
>
>
> When i create the project, i add only one external jar (on my test
> xstream-1.3.jar) then i publish, the problem is when i add another after
> first publish.
>
> The xpp* on this case, i add it after, but w/e i try, this xpp*.jar
> isn't published.

All I can confirm at this point is that this scenario works fine for me
using XStream 1.3.1 (i.e. it has xstream-1.3.1.jar). Also, the
".classpath" file you posted also works fine for me tweaked slightly to
match my system. This is using Galileo SR2 and WTP 3.1.2. At the
moment, I can only speculate about what is different about your system
that is causing this behavior. You could try creating a new project and
add the xpp3_min-1.1.4c.jar first. Then publish and add the
xstream-1.3.jar second. If your theory is correct, the xstream jar
would be the one that doesn't publish.

Cheers,
Larry
Re: Doubts using Java EE Modules Dependencies. [message #525061 is a reply to message #525039] Mon, 05 April 2010 17:01 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
Larry Isaacs wrote on Mon, 05 April 2010 10:21

All I can confirm at this point is that this scenario works fine for me
using XStream 1.3.1 (i.e. it has xstream-1.3.1.jar). Also, the
".classpath" file you posted also works fine for me tweaked slightly to
match my system. This is using Galileo SR2 and WTP 3.1.2. At the
moment, I can only speculate about what is different about your system
that is causing this behavior. You could try creating a new project and
add the xpp3_min-1.1.4c.jar first. Then publish and add the
xstream-1.3.jar second. If your theory is correct, the xstream jar
would be the one that doesn't publish.

Cheers,
Larry


Thank u for the try, isn't a problem w/ xstream jar, is any jar i try to include after first publish isn't published. And i only ask here cos the same thing happens on 2 different machines, i'll try to replicate on a third one and reply the result here.
Re: Doubts using Java EE Modules Dependencies. [message #525338 is a reply to message #525028] Tue, 06 April 2010 05:42 Go to previous messageGo to next message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Il 05/04/2010 15.16, Samuel ha scritto:
> When i create the project, i add only one external jar (on my test
> xstream-1.3.jar) then i publish, the problem is when i add another after
> first publish.

How do you add these new jars? Via file system or via Eclipse? Is
Eclipse seeing these jars in the Webapp Libraries of your projects? If
not, have you tried to hit F5 on your project (or on your WEB-INF/lib
folder) to refresh contents from the file system?

Mauro.
Re: Doubts using Java EE Modules Dependencies. [message #525396 is a reply to message #525338] Tue, 06 April 2010 13:25 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
Mauro Molinari wrote on Tue, 06 April 2010 01:42


How do you add these new jars? Via file system or via Eclipse? Is
Eclipse seeing these jars in the Webapp Libraries of your projects? If
not, have you tried to hit F5 on your project (or on your WEB-INF/lib
folder) to refresh contents from the file system?

Mauro.


I try it, same result, the second jar i add never is published.
Re: Doubts using Java EE Modules Dependencies. [message #525427 is a reply to message #524386] Tue, 06 April 2010 14:36 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
I test the same scenario on another computer using eclipse europa and it works correctly, after Clean... the new jars are published.

It's something how i configure my enviroment, the 2 computers i test was my desktop and my notebook, can't find what really are causing the problem, but i find a workaround, annoying but better then nothing.

After i add the new jar, i close the project, clean the server, open and publish again, the new jars r published.
Re: Doubts using Java EE Modules Dependencies. [message #525454 is a reply to message #525396] Tue, 06 April 2010 15:50 Go to previous messageGo to next message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Il 06/04/2010 15.25, Samuel ha scritto:
> I try it, same result, the second jar i add never is published.

But:
1) how do you add the second jar?
2) does Eclipse rebuild your project when you add that JAR or not?
3) does Eclipse republish your project to the server when you add that
JAR or not?
4) is the JAR shown under <your project>/Web App Libraries (in Package
Explorer) or <your project>/Java Resources/Libraries/Web App Libraries
(in Project Explorer)?
5) is the menu item Project | "Build automatically" selected?
6) is "Automatically publish when resources change" selected for your
server?
7) does your project have any buildpath problem?

It has always worked perfectly for me.
Mauro.
Re: Doubts using Java EE Modules Dependencies. [message #525470 is a reply to message #525454] Tue, 06 April 2010 16:37 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
Mauro Molinari wrote on Tue, 06 April 2010 11:50

But:
1) how do you add the second jar?
2) does Eclipse rebuild your project when you add that JAR or not?
3) does Eclipse republish your project to the server when you add that
JAR or not?
4) is the JAR shown under <your project>/Web App Libraries (in Package
Explorer) or <your project>/Java Resources/Libraries/Web App Libraries
(in Project Explorer)?
5) is the menu item Project | "Build automatically" selected?
6) is "Automatically publish when resources change" selected for your
server?
7) does your project have any buildpath problem?

It has always worked perfectly for me.
Mauro.


1) Properties of the project, Java Build Path, Add External Jar.
Then i go on Java EE Module Dependencies and select the new entries.

2) Yes, w/ the build automatic option the project is rebuild, but i try using Project -> Clean... option to ensure that.

3) I can't tell for sure, but when i add the [Stopped, Synchronized] string on the server status doesn't change, so i think isn't published, and i check the option to automatic publish when resource change.

4) It's under Java Resources: src -> Libraries.

5) Yes

6) Yes

7) No, as im testing this on a new dynamic web project, as don't have any code doesn't matter if there are jars or not.
Re: Doubts using Java EE Modules Dependencies. [message #525519 is a reply to message #525470] Tue, 06 April 2010 17:51 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Samuel wrote:
> Mauro Molinari wrote on Tue, 06 April 2010 11:50
>> But:
>> 1) how do you add the second jar?
>> 2) does Eclipse rebuild your project when you add that JAR or not?
>> 3) does Eclipse republish your project to the server when you add that
>> JAR or not?
>> 4) is the JAR shown under <your project>/Web App Libraries (in Package
>> Explorer) or <your project>/Java Resources/Libraries/Web App Libraries
>> (in Project Explorer)?
>> 5) is the menu item Project | "Build automatically" selected?
>> 6) is "Automatically publish when resources change" selected for your
>> server?
>> 7) does your project have any buildpath problem?
>>
>> It has always worked perfectly for me.
>> Mauro.
>
>
> 1) Properties of the project, Java Build Path, Add External Jar.
> Then i go on Java EE Module Dependencies and select the new entries.
>
> 2) Yes, w/ the build automatic option the project is rebuild, but i try
> using Project -> Clean... option to ensure that.
>
> 3) I can't tell for sure, but when i add the [Stopped, Synchronized]
> string on the server status doesn't change, so i think isn't published,
> and i check the option to automatic publish when resource change.
>
> 4) It's under Java Resources: src -> Libraries.
>
> 5) Yes
>
> 6) Yes
>
> 7) No, as im testing this on a new dynamic web project, as don't have
> any code doesn't matter if there are jars or not.
>

The impact of step 1 is that you should see entries added to the
..classpath file like the following for the jar(s) you added:

<classpathentry kind="lib" path="path_to_your_jar"/>

The impact of step 2 is to update those entries like the following for
the jar(s) you checked:

<classpathentry kind="lib" path="path_to_your_jar">
<attributes>
<attribute name="org.eclipse.jst.component.dependency"
value="/WEB-INF/lib"/>
</attributes>
</classpathentry>

Is your .classpath file being modified as expected as you step through
the problem scenario? If so, it would imply that something is
interfering with WTP seeing the impact of step 2. Closing and
re-opening the project should force things so WTP could see the changes.
Is the "Clean..." really necessary to get the publish to work
correctly after closing and re-opening the project. I wouldn't think
so, but I don't understand how this could be happening either.

Cheers,
Larry
Re: Doubts using Java EE Modules Dependencies. [message #525544 is a reply to message #525519] Tue, 06 April 2010 20:04 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
Larry Isaacs wrote on Tue, 06 April 2010 13:51
The impact of step 1 is that you should see entries added to the
..classpath file like the following for the jar(s) you added:

<classpathentry kind="lib" path="path_to_your_jar"/>

The impact of step 2 is to update those entries like the following for
the jar(s) you checked:

<classpathentry kind="lib" path="path_to_your_jar">
<attributes>
<attribute name="org.eclipse.jst.component.dependency"
value="/WEB-INF/lib"/>
</attributes>
</classpathentry>

Is your .classpath file being modified as expected as you step through
the problem scenario? If so, it would imply that something is
interfering with WTP seeing the impact of step 2. Closing and
re-opening the project should force things so WTP could see the changes.
Is the "Clean..." really necessary to get the publish to work
correctly after closing and re-opening the project. I wouldn't think
so, but I don't understand how this could be happening either.

Cheers,
Larry



The new project was my attempt to replicate the problem im having on my current work code, but the workaround i find to the small project doesn't work on the project i need to work.

But the project is too big, w/ really a lot of deps.


I find about the .options file w/ the debug option of eclipse, w/ the content:

org.eclipse.jdt.core/debug=true
org.eclipse.wst.server.core/debug=true

But i didn't find anything about these missing jars, anyone know what string on option file to check this specific task, wtp deploy?

Another weird thing, the project have libraries as external jars and java projects, if i select the project it's published ok on wtp, if i uncheck on EE module dependencies and then Clear tomcat server the .jar of the java project is erased, that is the right behaviour, but the same thing don't happen w/ external jar libraries, so im try to figure out why? Or else i'll have to format my machine and try again on a clean windows install.

ps: Yes, i check the <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
entries on .classpath file and its there.

ps2: If i export the project as a WAR file, all files selected on module ee dependencies r there, only happens on wtp deploy.
Re: Doubts using Java EE Modules Dependencies. [message #525560 is a reply to message #525544] Tue, 06 April 2010 16:38 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Samuel wrote:
> Larry Isaacs wrote on Tue, 06 April 2010 13:51
>> The impact of step 1 is that you should see entries added to the
>> ..classpath file like the following for the jar(s) you added:
>>
>> <classpathentry kind="lib" path="path_to_your_jar"/>
>>
>> The impact of step 2 is to update those entries like the following for
>> the jar(s) you checked:
>>
>> <classpathentry kind="lib" path="path_to_your_jar">
>> <attributes>
>> <attribute name="org.eclipse.jst.component.dependency"
>> value="/WEB-INF/lib"/>
>> </attributes>
>> </classpathentry>
>>
>> Is your .classpath file being modified as expected as you step through
>> the problem scenario? If so, it would imply that something is
>> interfering with WTP seeing the impact of step 2. Closing and
>> re-opening the project should force things so WTP could see the
>> changes. Is the "Clean..." really necessary to get the publish to
>> work correctly after closing and re-opening the project. I wouldn't
>> think so, but I don't understand how this could be happening either.
>>
>> Cheers,
>> Larry
>
>
>
> The new project was my attempt to replicate the problem im having on my
> current work code, but the workaround i find to the small project
> doesn't work on the project i need to work.
>
> But the project is too big, w/ really a lot of deps.
>
> I find about the .options file w/ the debug option of eclipse, w/ the
> content:
>
> org.eclipse.jdt.core/debug=true
> org.eclipse.wst.server.core/debug=true

This last one would show you what ever there was to be seen. However,
this behavior is so bizarre, it would not be surprising for there not to
be logging where we would need it.

>
> But i didn't find anything about these missing jars, anyone know what
> string on option file to check this specific task, wtp deploy?
>
> Another weird thing, the project have libraries as external jars and
> java projects, if i select the project it's published ok on wtp, if i
> uncheck on EE module dependencies and then Clear tomcat server the .jar
> of the java project is erased, that is the right behaviour, but the same
> thing don't happen w/ external jar libraries, so im try to figure out
> why? Or else i'll have to format my machine and try again on a clean
> windows install.
>
> ps: Yes, i check the <attribute
> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
> entries on .classpath file and its there.
>
> ps2: If i export the project as a WAR file, all files selected on module
> ee dependencies r there, only happens on wtp deploy.

It's not unheard of that Export WAR yielding different results than
publish in unusual circumstances since they currently use different
mechanisms to decide what to include.

One other experiment would be to create a new server. In the server
editor, enable "Serve Modules Without Publishing". Add your problem
project and publish. In the
".metadata\.plugins\org.eclipse.wst.server.core\tmp?\conf" directory,
inspect the server.xml file. In the Context for the project, search for
a "virtualClasspath" attribute. It contains a semicolon separated list
that should include the absolute path for each jar that should appear in
WEB-INF/lib. I would be curious if this list also has the problem jars
missing. If so, and the .classpath file has the
"org.eclipse.jst.component.dependency" attribute for that jar, then that
would confirm that issue is has to do with what WTP thinks comprises the
project and not a problem in trying to copy the jar.

What is contained in your Eclipse installation? I've been assuming you
are using the Java EE Developers package. What additional plug-ins have
been installed? If there are additional any plug-ins, you could try
creating a new Eclipse installation with just the Java EE Developers
package. Create a new workspace and import a problem project, making
sure you copy the project to the new workspace. Then see if the problem
behavior occurs in the new workspace. If not, it would indicate that
one of the added plug-ins is at least contributing to the problem behavior.

If this yields no answers, then brute force debugging may be the only
way to get to the bottom of this. This would imply that you would use
one of your problem Eclipses and create a new workspace. You would pull
into that workspace source for WTP plug-ins as needed (we probably start
with the org.eclipse.jst.server.tomcat.core plug-in). You would run
Eclipse in a debug session that uses your original workspace. Using
breakpoints, we would determine where the publish process is going awry.
If you are willing, I can provide the setup details, what source is
needed, where to set breakpoints, and what to look for. You could use
any problem project, but the smaller the better.

Cheers,
Larry
Re: Doubts using Java EE Modules Dependencies. [message #525621 is a reply to message #525470] Wed, 07 April 2010 08:41 Go to previous messageGo to next message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Larry is assisting you better than I could do, however here I write how
I do work with these things, maybe a different approach can help you to
work around your issue, too...

Il 06/04/2010 18.37, Samuel ha scritto:
> 1) Properties of the project, Java Build Path, Add External Jar.
> Then i go on Java EE Module Dependencies and select the new entries.

I personally avoid using the Java EE Module Dependencies page because it
has several problems: items sometimes don't get checked, sometimes they
are unexpectedly unchecked, they are not ordered, and so on...
Fortunately, it has been replaced with a new Module Assembly Page in WTP
3.2!

This is what I do to add dependencies that must be deployed with my
dynamic web project:

1) to add a dependency on a JAR, I copy that JAR to
WebContent/WEB-INF/lib folder; in this way, WTP "sees" the new JAR, adds
it to the project build path (you'll see it in Java
Resources/Libraries/Web App Libraries) and automatically deploys it on
the server. Please note that if you copy the JAR from outside Eclipse,
you have to issue a refresh on the lib folder from within Eclipse to
make it synchronize with the file system.

2) to add a dependency on a project, then I use the Java EE Module
Dependencies page (and I don't select the project in the Properties |
Java Build Path page, because it's not needed and, in some
circumstances, the two settings may produce confusion and unexpected
problems); in this way, the project I depend on is automatically added
to the build path and deployed as a JAR in WEB-INF/lib; this has always
worked for me with no problems

> 3) I can't tell for sure, but when i add the [Stopped, Synchronized]
> string on the server status doesn't change, so i think isn't published,
> and i check the option to automatic publish when resource change.

To ensure the contents are published, without forcing a project clean,
just click on the Publish button in the Server view. If the project
needs publishing (after you add your JAR), then you'll see Eclipse do
that. Otherwise, it won't do anything.

Mauro.
Re: Doubts using Java EE Modules Dependencies. [message #526666 is a reply to message #525427] Mon, 12 April 2010 14:33 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Samuel wrote:
> I test the same scenario on another computer using eclipse europa and it
> works correctly, after Clean... the new jars are published.
>
> It's something how i configure my enviroment, the 2 computers i test was
> my desktop and my notebook, can't find what really are causing the
> problem, but i find a workaround, annoying but better then nothing.
>
> After i add the new jar, i close the project, clean the server, open and
> publish again, the new jars r published.

A separate post revealed that a WTP 3.1.2patch was available for a while
that contained a regression that may explain this behavior. Could you
check the version that is tacked onto the end of the org.eclipse.wst.web
plug-in jar in the plugins directory of your problem Eclipse installs.
My install has the unpatched version
"org.eclipse.wst.web_1.1.301.v200911302230.jar", which may be why its
working for me.

Cheers,
Larry
Re: Doubts using Java EE Modules Dependencies. [message #526741 is a reply to message #524386] Mon, 12 April 2010 19:06 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
I just check and is the same version.
Re: Doubts using Java EE Modules Dependencies. [message #526754 is a reply to message #525560] Mon, 12 April 2010 19:36 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
Larry Isaacs wrote on Tue, 06 April 2010 12:38

One other experiment would be to create a new server. In the server
editor, enable "Serve Modules Without Publishing". Add your problem
project and publish. In the
".metadata\.plugins\org.eclipse.wst.server.core\tmp?\conf" directory,
inspect the server.xml file. In the Context for the project, search for
a "virtualClasspath" attribute. It contains a semicolon separated list
that should include the absolute path for each jar that should appear in
WEB-INF/lib. I would be curious if this list also has the problem jars
missing. If so, and the .classpath file has the
"org.eclipse.jst.component.dependency" attribute for that jar, then that
would confirm that issue is has to do with what WTP thinks comprises the
project and not a problem in trying to copy the jar.



When i try to run the server using the option Serve Modules without publishing, the server.xml have all the jars on VirtualClasspath, and even better, the big project worked just fine. I'll work w/ that option for now.


Larry Isaacs wrote on Tue, 06 April 2010 12:38

What is contained in your Eclipse installation? I've been assuming you
are using the Java EE Developers package. What additional plug-ins have
been installed? If there are additional any plug-ins, you could try
creating a new Eclipse installation with just the Java EE Developers
package. Create a new workspace and import a problem project, making
sure you copy the project to the new workspace. Then see if the problem
behavior occurs in the new workspace. If not, it would indicate that
one of the added plug-ins is at least contributing to the problem behavior.

If this yields no answers, then brute force debugging may be the only
way to get to the bottom of this. This would imply that you would use
one of your problem Eclipses and create a new workspace. You would pull
into that workspace source for WTP plug-ins as needed (we probably start
with the org.eclipse.jst.server.tomcat.core plug-in). You would run
Eclipse in a debug session that uses your original workspace. Using
breakpoints, we would determine where the publish process is going awry.
If you are willing, I can provide the setup details, what source is
needed, where to set breakpoints, and what to look for. You could use
any problem project, but the smaller the better.

Cheers,
Larry


I just download eclipse-jee-galileo-SR2-win32.zip from eclipse.org download page and unzip, not any additional plugin.

I couldn't find enough time to try the same steps on another computer, when i try i'll reply here.
Re: Doubts using Java EE Modules Dependencies. [message #527600 is a reply to message #524386] Thu, 15 April 2010 17:47 Go to previous messageGo to next message
Samuel  is currently offline Samuel Friend
Messages: 12
Registered: March 2010
Junior Member
And the past bite me...

I'll have to check what the problems w/ the project to migrate for jboss EAP, and the problem of not publishing jar files checked on EE Module dependencies are back, and didn't find any serve modules without publishing like tomcat have.

Anyone knows if that option exist for JBOSS eap. Thanks
Re: Doubts using Java EE Modules Dependencies. [message #527626 is a reply to message #527600] Thu, 15 April 2010 19:33 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Samuel wrote:
> And the past bite me...
>
> I'll have to check what the problems w/ the project to migrate for jboss
> EAP, and the problem of not publishing jar files checked on EE Module
> dependencies are back, and didn't find any serve modules without
> publishing like tomcat have.
> Anyone knows if that option exist for JBOSS eap. Thanks

For the server adapters available with WTP, Tomcat is the only one that
has the "Serve Modules Without Publishing" option. Server adapters from
other vendors could provide something equivalent, but I don't know if
they do.

Cheers,
Larry
Previous Topic:Generate XML from XSD
Next Topic:Customization of WSDL Editor
Goto Forum:
  


Current Time: Tue Apr 16 06:23:33 GMT 2024

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

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

Back to the top