Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Could not publish to the server. Eclipse 3.5 SR-2 Build id: 20100218-1602
Could not publish to the server. Eclipse 3.5 SR-2 Build id: 20100218-1602 [message #526327] Fri, 09 April 2010 16:52 Go to next message
Yiannis  is currently offline Yiannis Friend
Messages: 2
Registered: April 2010
Junior Member
Hi,

After installing the latest Eclipse Java EE IDE for Web Developers web project files are no longer published to the tomcat server when the project include jars in the J2EE module dependencies. The current setup was working fine with at least 2 versions of eclipse and various configurations and operating systems.

In detail:

Having a standalone project and linked to a user library works as it used to and as expected. However if I add one .jar dependency to the project (from another project in the workspace) it fails immediately with the following error: Could not publish to the server.

(Stack trace at the end of the message)

The web project I am working is part of a workspace with a few other projects. Including the projects as J2EE module dependencies works. But the moment I add any of jars from the projects I depend on, I get the could not publish error.

I tried to work around this by combining all the workspace jars my project depends on a user library and then add this library to the J2EE module dependencies. This is solving the error but the result is that none of the files from WebContent directory are published. The .metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebap ps/myproject/ directory contains only the WEB-INF with the classes and the lib folder with the jars. If i publish manually (just copy all the files from my project the wtpwebapps) everything works well, but then auto publish does not work any more for .jsp or plain files (only works for editing java source files).

Still, if my project does not depend on other local projects, everything works fine.

The stack trace is:
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at org.eclipse.core.runtime.Path.initialize(Path.java:577)
at org.eclipse.core.runtime.Path.<init>(Path.java:163)
at org.eclipse.wst.web.internal.deployables.ComponentDeployable.addUtilMember(ComponentDeployable.java:366)
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.addUtilMember(J2EEFlexProjDeployable.java:160)
at org.eclipse.wst.web.internal.deployables.ComponentDeployable.addUtilMembers(ComponentDeployable.java:354)
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.members(J2EEFlexProjDeployable.java:256)
at org.eclipse.wst.server.core.internal.ModulePublishInfo.getDelta(ModulePublishInfo.java:366)
at org.eclipse.wst.server.core.internal.ServerPublishInfo.getDelta(ServerPublishInfo.java:368)
at org.eclipse.wst.server.core.internal.Server.getPublishedResourceDelta(Server.java:1363)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.getPublishedResourceDelta(ServerBehaviourDelegate.java:653)
at org.eclipse.jst.server.tomcat.core.internal.TomcatServerBehaviour.getPublishedResourceDelta(TomcatServerBehaviour.java:896)
at org.eclipse.jst.server.tomcat.core.internal.PublishOperation2.publishDir(PublishOperation2.java:110)
at org.eclipse.jst.server.tomcat.core.internal.PublishOperation2.execute(PublishOperation2.java:78)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.performTasks(ServerBehaviourDelegate.java:1136)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:853)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2731)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:278)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


The session data are:
eclipse.buildId=unknown
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product


Re: Could not publish to the server. Eclipse 3.5 SR-2 Build id: 20100218-1602 [message #526664 is a reply to message #526327] Mon, 12 April 2010 14:23 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Thanks for the stack trace. It shows you are running with the WTP
3.1.2patch that addresses Bug 305306[1] and are suffering from the
regression mentioned in that bug. I assume you picked it up through
Help -> Check for Updates. You can re-install Eclipse Java EE IDE
tar.gz. I believe the problem WTP 3.1.2patch has been removed, so you
could try Check for Updates again and not suffer the same fate, though I
just tried it and no updates were found.

Cheers,
Larry

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=305306

Yiannis wrote:
> Hi,
>
> After installing the latest Eclipse Java EE IDE for Web Developers web
> project files are no longer published to the tomcat server when the
> project include jars in the J2EE module dependencies. The current setup
> was working fine with at least 2 versions of eclipse and various
> configurations and operating systems.
>
> In detail:
>
> Having a standalone project and linked to a user library works as it
> used to and as expected. However if I add one .jar dependency to the
> project (from another project in the workspace) it fails immediately
> with the following error: Could not publish to the server.
>
> (Stack trace at the end of the message)
>
> The web project I am working is part of a workspace with a few other
> projects. Including the projects as J2EE module dependencies works. But
> the moment I add any of jars from the projects I depend on, I get the
> could not publish error.
>
> I tried to work around this by combining all the workspace jars my
> project depends on a user library and then add this library to the J2EE
> module dependencies. This is solving the error but the result is that
> none of the files from WebContent directory are published. The
> .metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebap
> ps/myproject/ directory contains only the WEB-INF with the classes and
> the lib folder with the jars. If i publish manually (just copy all the
> files from my project the wtpwebapps) everything works well, but then
> auto publish does not work any more for .jsp or plain files (only works
> for editing java source files).
>
> Still, if my project does not depend on other local projects, everything
> works fine.
>
> The stack trace is:
> org.eclipse.core.runtime.AssertionFailedException: null argument:
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
> at org.eclipse.core.runtime.Path.initialize(Path.java:577)
> at org.eclipse.core.runtime.Path.<init>(Path.java:163)
> at
> org.eclipse.wst.web.internal.deployables.ComponentDeployable .addUtilMember(ComponentDeployable.java:366)
>
> at
> org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeploy able.addUtilMember(J2EEFlexProjDeployable.java:160)
>
> at
> org.eclipse.wst.web.internal.deployables.ComponentDeployable .addUtilMembers(ComponentDeployable.java:354)
>
> at
> org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeploy able.members(J2EEFlexProjDeployable.java:256)
>
> at
> org.eclipse.wst.server.core.internal.ModulePublishInfo.getDe lta(ModulePublishInfo.java:366)
>
> at
> org.eclipse.wst.server.core.internal.ServerPublishInfo.getDe lta(ServerPublishInfo.java:368)
>
> at
> org.eclipse.wst.server.core.internal.Server.getPublishedReso urceDelta(Server.java:1363)
>
> at
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.ge tPublishedResourceDelta(ServerBehaviourDelegate.java:653)
>
> at
> org.eclipse.jst.server.tomcat.core.internal.TomcatServerBeha viour.getPublishedResourceDelta(TomcatServerBehaviour.java:8 96)
>
> at
> org.eclipse.jst.server.tomcat.core.internal.PublishOperation 2.publishDir(PublishOperation2.java:110)
>
> at
> org.eclipse.jst.server.tomcat.core.internal.PublishOperation 2.execute(PublishOperation2.java:78)
>
> at
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.pe rformTasks(ServerBehaviourDelegate.java:1136)
>
> at
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.pu blish(ServerBehaviourDelegate.java:853)
>
> at
> org.eclipse.wst.server.core.model.ServerBehaviourDelegate.pu blish(ServerBehaviourDelegate.java:708)
>
> at
> org.eclipse.wst.server.core.internal.Server.publishImpl(Serv er.java:2731)
> at
> org.eclipse.wst.server.core.internal.Server$PublishJob.run(S erver.java:278)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
>
> The session data are:
> eclipse.buildId=unknown
> java.version=1.6.0_18
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
> Framework arguments: -product org.eclipse.epp.package.jee.product
> Command-line arguments: -os linux -ws gtk -arch x86_64 -product
> org.eclipse.epp.package.jee.product
>
>
Re: Could not publish to the server. Eclipse 3.5 SR-2 Build id: 20100218-1602 [message #526773 is a reply to message #526327] Mon, 12 April 2010 21:06 Go to previous message
Yiannis  is currently offline Yiannis Friend
Messages: 2
Registered: April 2010
Junior Member
Hi Larry,

You are right, I have the patch for bug 305306 and I think I picked it manually by installing everything related to WTP and not by checking for updates.

While I am using extensively WTP, I know little about the internals and I couldn't follow the bug discussion. I have temporarily "solved" the problem. It is most likely that you already know what I found out, but I am writing them just in case.

I initially worked around the publishing problem by enabling "Serve modules without publishing" on the server. Then I got a useful error message by double clicking on the deployment descriptor of the web project: It could not find the /WEB-INF/web.xml file to open.

A quick look at the .settings/org.eclipse.wst.common.component revealed that the cause of the problem was a missing line:
        <wb-resource deploy-path="/" source-path="/WebContent"/>

After adding this line and restarting eclipse, everything was working as it should.

Thank you for the reply.

cheers

YIannis
Previous Topic: Eclipse 3.5: Tomcat server was unable to start..
Next Topic:war imported with wrong facet, how are the facets decided ?
Goto Forum:
  


Current Time: Fri Apr 26 19:32:54 GMT 2024

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

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

Back to the top