[jira] Commented: (GERONIMO-2921) Tomcat does not register web service url mappings when web.xml is not present
[ https://issues.apache.org/jira/browse/GERONIMO-2921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477299 ] Jeff Genender commented on GERONIMO-2921: - Can you provide a simple test case for this? Tomcat does not register web service url mappings when web.xml is not present - Key: GERONIMO-2921 URL: https://issues.apache.org/jira/browse/GERONIMO-2921 Project: Geronimo Issue Type: Bug Security Level: public(Regular issues) Components: Tomcat Reporter: Jarek Gawor Here's some background info. The web.xml file is now optional for JAX-WS POJO web services. In such cases, there are certain rules on how the web.xml should get updated. That is, appropriate servlet and servlet-mapping elements should be inserted into the web.xml. When I update the in-memory representation of the web.xml with the appropriate entires, everything works just fine on Jetty. However, with Tomcat, it seems like the url-mappings for the web services do not get registered. Everything else is fine, e.g. the web services gbeans get initialized, etc. and I can access a JSP deployed in the same war as the web services. After a bit of debugging I see that GeronimoStandardContext.addChild() is not called if the web.xml file is not present even though the in-memory representation of the DD is updated correctly. So somehow I think the in-memory representation of the DD is not being passed around correctly. Here's a stack trace when web.xml file is present and when addChild() is called: System Thread [RMI TCP Connection(9)-192.168.1.102] (Suspended (breakpoint at line 217 in GeronimoStandardContext)) GeronimoStandardContext.addChild(Container) line: 217 GeneratedMethodAccessor201.invoke(Object, Object[]) line: not available DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 585 IntrospectionUtils.callMethod1(Object, String, Object, String, ClassLoader) line: 899 SetNextRule.end() line: 193 SetNextRule(Rule).end(String, String) line: 229 Digester.endElement(String, String, String) line: 1058 SAXParserImpl$JAXPSAXParser(AbstractSAXParser).endElement(QName, Augmentations) line: not available XMLDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanEndElement() line: not available [local variables unavailable] XMLDocumentScannerImpl$ContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean) line: not available XMLDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available SAXParserImpl$JAXPSAXParser(XMLParser).parse(XMLInputSource) line: not available SAXParserImpl$JAXPSAXParser(AbstractSAXParser).parse(InputSource) line: not available SAXParserImpl$JAXPSAXParser.parse(InputSource) line: not available Digester.parse(InputSource) line: 1562 ContextConfig.applicationWebConfig() line: 369 ContextConfig.start() line: 1060 ContextConfig.lifecycleEvent(LifecycleEvent) line: 261 LifecycleSupport.fireLifecycleEvent(String, Object) line: 120 GeronimoStandardContext(StandardContext).start() line: 4238 GeronimoStandardContext.access$201(GeronimoStandardContext) line: 66 GeronimoStandardContext$SystemMethodValve.invoke(Request, Response) line: 334 GeronimoBeforeAfterValve.invoke(Request, Response) line: 47 GeronimoStandardContext.start() line: 189 StandardHost(ContainerBase).addChildInternal(Container) line: 760 StandardHost(ContainerBase).addChild(Container) line: 740 StandardHost.addChild(Container) line: 525 TomcatContainer.addContext(TomcatContext) line: 331 TomcatContainer$$FastClassByCGLIB$$9370b073.invoke(int, Object, Object[]) line: not available FastMethod.invoke(Object, Object[]) line: 53 FastMethodInvoker.invoke(Object, Object[]) line: 38 GBeanOperation.invoke(Object, Object[]) line: 127 GBeanInstance.invoke(int, Object[]) line: 820 RawInvoker.invoke(int, Object[]) line: 57 RawOperationInvoker.invoke(AbstractName, Object[]) line: 35 ProxyMethodInterceptor.intercept(Object, Method, Object[], MethodProxy) line: 96 TomcatContainer$$EnhancerByCGLIB$$d873f7e2.addContext(TomcatContext) line: not
[jira] Commented: (GERONIMO-2921) Tomcat does not register web service url mappings when web.xml is not present
[ https://issues.apache.org/jira/browse/GERONIMO-2921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477327 ] Jarek Gawor commented on GERONIMO-2921: --- First, https://issues.apache.org/jira/browse/GERONIMO-2922 needs to be applied. Second, deploy the attached .war file. If things are deployed and connected successfully the following urls should work fine: http://localhost:8080/jaxws-war-2.0-SNAPSHOT/SOAPService?wsdl http://localhost:8080/jaxws-war-2.0-SNAPSHOT/HelloServiceService?wsdl http://localhost:8080/jaxws-war-2.0-SNAPSHOT/EchoServiceService?wsdl Tomcat does not register web service url mappings when web.xml is not present - Key: GERONIMO-2921 URL: https://issues.apache.org/jira/browse/GERONIMO-2921 Project: Geronimo Issue Type: Bug Security Level: public(Regular issues) Components: Tomcat Reporter: Jarek Gawor Attachments: jaxws-war-2.0-SNAPSHOT.war Here's some background info. The web.xml file is now optional for JAX-WS POJO web services. In such cases, there are certain rules on how the web.xml should get updated. That is, appropriate servlet and servlet-mapping elements should be inserted into the web.xml. When I update the in-memory representation of the web.xml with the appropriate entires, everything works just fine on Jetty. However, with Tomcat, it seems like the url-mappings for the web services do not get registered. Everything else is fine, e.g. the web services gbeans get initialized, etc. and I can access a JSP deployed in the same war as the web services. After a bit of debugging I see that GeronimoStandardContext.addChild() is not called if the web.xml file is not present even though the in-memory representation of the DD is updated correctly. So somehow I think the in-memory representation of the DD is not being passed around correctly. Here's a stack trace when web.xml file is present and when addChild() is called: System Thread [RMI TCP Connection(9)-192.168.1.102] (Suspended (breakpoint at line 217 in GeronimoStandardContext)) GeronimoStandardContext.addChild(Container) line: 217 GeneratedMethodAccessor201.invoke(Object, Object[]) line: not available DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 585 IntrospectionUtils.callMethod1(Object, String, Object, String, ClassLoader) line: 899 SetNextRule.end() line: 193 SetNextRule(Rule).end(String, String) line: 229 Digester.endElement(String, String, String) line: 1058 SAXParserImpl$JAXPSAXParser(AbstractSAXParser).endElement(QName, Augmentations) line: not available XMLDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanEndElement() line: not available [local variables unavailable] XMLDocumentScannerImpl$ContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean) line: not available XMLDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available SAXParserImpl$JAXPSAXParser(XMLParser).parse(XMLInputSource) line: not available SAXParserImpl$JAXPSAXParser(AbstractSAXParser).parse(InputSource) line: not available SAXParserImpl$JAXPSAXParser.parse(InputSource) line: not available Digester.parse(InputSource) line: 1562 ContextConfig.applicationWebConfig() line: 369 ContextConfig.start() line: 1060 ContextConfig.lifecycleEvent(LifecycleEvent) line: 261 LifecycleSupport.fireLifecycleEvent(String, Object) line: 120 GeronimoStandardContext(StandardContext).start() line: 4238 GeronimoStandardContext.access$201(GeronimoStandardContext) line: 66 GeronimoStandardContext$SystemMethodValve.invoke(Request, Response) line: 334 GeronimoBeforeAfterValve.invoke(Request, Response) line: 47 GeronimoStandardContext.start() line: 189 StandardHost(ContainerBase).addChildInternal(Container) line: 760 StandardHost(ContainerBase).addChild(Container) line: 740 StandardHost.addChild(Container) line: 525 TomcatContainer.addContext(TomcatContext) line: 331 TomcatContainer$$FastClassByCGLIB$$9370b073.invoke(int, Object, Object[]) line: not available FastMethod.invoke(Object, Object[]) line: 53 FastMethodInvoker.invoke(Object, Object[]) line: 38