well if you want to have the webservices deployer ran after the web
deployer then you must declare that dependency, today you just have
@Override
public MetaData getMetaData() {
return new MetaData(false, null, new Class[]
{Application.class});
}
you should have
@Override
public MetaData getMetaData() {
return new MetaData(false, null, new Class[]
{WebBundleDescriptor.class});
}
(application dependency comes for free at that point...)
This would not work if you deploy an ejb module however so you may
have to separate the WebServicesDeployer in 2 classes, one for Web,
one for EJB. Some subclassing with a common superclass should help here.
jerome
On Apr 29, 2009, at 3:35 PM, Bhakti Mehta wrote:
> Hi,
> I see this error if ApplicationLifeCycle calls
> WebservicesDeployer's loadMetaData before WebDeployers loadMetaData
> in that case WebBundleDescriptor's getContextRoot (line 227) returns
> ""
> This causes an error in our address computation where the webservice
> is deployed
>
> This is sometimes harder to reproduce. But I have found this works
> most of the times
> deploy WS3.war it may show (I use autodeploy) in server log
> Webservice Endpoint deployed
> Hello listening at address at http://localhost:8080/WS3/
> HelloService at first attempt
>
> Now undeploy WS3.war (asadmin undeploy WS3)
>
> Now redeploy (again autodeploy)
> Set breakpoint at WebBundleDescriptor.getContextRoot line 227 the
> contextRoot is ""
>
> Also then you will see if the WebServiceDeployer came before
> WebDeployer the server log
> shows
> Webservice Endpoint deployed
> Hello listening at address at http://localhost:8080//HelloService
> (notice no WS3?)
>
> Attaching the stacktrace if needed. Please let me know if you need
> more information.
> Regards,
> Bhakti
>
> <WS3.war><Picture
> 1
> .png
> >---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net