This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 307152 - Web Service deployment fails without web.xml
Summary: Web Service deployment fails without web.xml
Status: CLOSED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.ws (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.2 M7   Edit
Assignee: Keith Chong CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-25 22:00 EDT by Eric Peters CLA
Modified: 2010-06-17 15:43 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Peters CLA 2010-03-25 22:00:01 EDT
I've failed the 03/25 smoketest on this defect.

Creating Bottom up web service, I get error :
IWAB0489E Error when deploying Web service to Axis runtime
  axis-admin failed with  {http://xml.apache.org/axis/}HTTP (404)/Test/services/AdminService

Nothing in .log.

Debugging reveals:
Mar 25, 2010 9:37:46 PM org.apache.axis.utils.bytecode.ParamNameExtractor getParameterNamesFromDebugInfo
INFO: AXIS error:java.io.IOException: Unable to load bytecode for class "p.Echo"
axis-admin failed with  {http://xml.apache.org/axis/}HTTP (404)/test/services/AdminService
	at org.apache.axis.tools.ant.axis.AdminClientTask.logOrThrow(AdminClientTask.java:379)
	at org.apache.axis.tools.ant.axis.AdminClientTask.executeInCurrentVM(AdminClientTask.java:365)
	at org.apache.axis.tools.ant.axis.AdminClientTask.execute(AdminClientTask.java:316)
	at org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand.executeAntTask(AxisDeployCommand.java:128)
	at org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand.execute(AxisDeployCommand.java:89)
...
...

The exception above is coming from org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand, which extends org.apache.axis.tools.ant.axis.AdminClientTask. The deploy command tries several (20) times to execute a command to the admin server but never succeeds always getting an exception org.apache.tools.ant.BuildException.

Tried on another machine and install with Stephen Hung and same problem.

Let me know if you want to turn on any tracing or need more info.

Console log:

Mar 25, 2010 9:26:14 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Test' did not find a matching property.
Mar 25, 2010 9:26:14 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\ProgramFiles\IBM\SDP80\jdk\jre\bin;.;C:\Program Files\Java\jre6\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace Facility\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Lenovo;C:\Program Files\Rational\common;C:\Program Files\ObjREXX;C:\Program Files\ObjREXX\OODIALOG;C:\Program Files\Lenovo\Client Security Solution;C:\Program Files\Intel\WiFi\bin\;D:\Program Files\IBM\CMVCDC50
Mar 25, 2010 9:26:14 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 25, 2010 9:26:14 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 701 ms
Mar 25, 2010 9:26:14 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 25, 2010 9:26:14 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
Mar 25, 2010 9:26:14 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 25, 2010 9:26:14 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 25, 2010 9:26:14 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15  config=null
Mar 25, 2010 9:26:14 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 686 ms
Comment 1 Shane Clarke CLA 2010-03-26 06:56:23 EDT
I think this is related to the deployment descriptor generation now being turned off by default for 2.5 web projects. With the generate deployment descriptor option checked you should be able to deploy.
Comment 2 Eric Peters CLA 2010-03-26 07:45:00 EDT
This problem is indeed related to DD not getting generated now by default for web 2.5 projects. Shane, can you give more details on the change to not generate DD anymore so we can react to this change?
Comment 3 Shane Clarke CLA 2010-03-26 08:39:46 EDT
(In reply to comment #2)
> This problem is indeed related to DD not getting generated now by default for
> web 2.5 projects. Shane, can you give more details on the change to not
> generate DD anymore so we can react to this change?

Bug #306416 outlines the change to the default.
Comment 4 Carl Anderson CLA 2010-03-26 09:30:02 EDT
IJ2EEFacetInstallDataModelProperties.GENERATE_DD should be set to true at web project creation for you to force the creation of the deployment descriptor.

However, I am really curious - what action/operation are you running that requires a web.xml?  An empty Web 2.5 project does not require a web.xml, but there are certainly many scenarios that do require one- we should ensure that these scenarios create a web.xml and the proper entries in web.xml.  (After all, if a Web project is imported, there is no guarantee that a web.xml exists.)
Comment 5 Eric Peters CLA 2010-03-26 09:54:54 EDT
(In reply to comment #4)
> IJ2EEFacetInstallDataModelProperties.GENERATE_DD should be set to true at web
> project creation for you to force the creation of the deployment descriptor.
> 
> However, I am really curious - what action/operation are you running that
> requires a web.xml?  An empty Web 2.5 project does not require a web.xml, but
> there are certainly many scenarios that do require one- we should ensure that
> these scenarios create a web.xml and the proper entries in web.xml.  (After
> all, if a Web project is imported, there is no guarantee that a web.xml
> exists.)

Thanks Carl. The action that seems to require it is starting/deploying an axis1 web service to Tomcat (starting/deploying the client is fine without web.xml). As you suggest we'll have to make a determination of where web services tools actually require a web.xml and generate one for the user, and e.g. our deploy commands give a better error to the user when it doesn't exist.
Comment 6 Keith Chong CLA 2010-04-20 14:13:04 EDT
This affects top-down axis web services also.
Comment 7 Keith Chong CLA 2010-04-20 14:17:15 EDT
We need to add the web.xml because we add the axis servlet information to it.

Looks like the fix is not in AxisDeployCommand.  It should be in BUCodeGenOperation where the servlet information is added.

A similar change should be added to TDCodeGenOperation
Comment 8 Keith Chong CLA 2010-04-20 20:00:38 EDT
Fix released for 3.2 M7.
Comment 9 Eric Peters CLA 2010-06-17 15:43:37 EDT
verified in R-3.2.0-20100615235519