[jboss-jira] [JBoss JIRA] (WFLY-3262) WebServiceRef injection without explicit wsdl file fails during Servlet initialization
Matus Abaffy (JIRA)
issues at jboss.org
Tue Apr 15 08:56:33 EDT 2014
Matus Abaffy created WFLY-3262:
----------------------------------
Summary: WebServiceRef injection without explicit wsdl file fails during Servlet initialization
Key: WFLY-3262
URL: https://issues.jboss.org/browse/WFLY-3262
Project: WildFly
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Web Services
Affects Versions: 8.1.0.CR1
Reporter: Matus Abaffy
Assignee: Alessio Soldano
Reproducer test available at https://github.com/bafco/wildfly/commits/wsServletInjection
I have the following servlet
{code}
@WebServlet(/*..., */ loadOnStartup = 1)
public class ServletLoadOnStartup extends HttpServlet {
@WebServiceRef(value = EndpointService.class)
private EndpointInterface endpoint1;
//...
{code}
(It is located in the package org.jboss.as.test.integration.ws.serviceref. There you can find more info about the other classes.)
And i get the following exception:
{code}
org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy: ws-servlet-test.war
...
Caused by: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./ws-servlet-test" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./ws-servlet-test: javax.servlet.ServletException: UT010013: Could not instantiate ServletLoadOnStartup
Caused by: javax.servlet.ServletException: UT010013: Could not instantiate ServletLoadOnStartup
Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
Caused by: java.lang.RuntimeException: JBAS011875: Resource lookup for injection failed: env/org.jboss.as.test.integration.ws.serviceref.ServletLoadOnStartup/endpoint1
Caused by: javax.naming.NamingException: JBAS011878: Failed to lookup env/org.jboss.as.test.integration.ws.serviceref.ServletLoadOnStartup/endpoint1 [Root exception is org.jboss.wsf.spi.WSFException: Cannot create service]
Caused by: org.jboss.wsf.spi.WSFException: Cannot create service
Caused by: java.lang.reflect.InvocationTargetException
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://localhost:8080/ws-servlet-test/EndpointService/EJB3Bean?wsdl'.: java.io.FileNotFoundException: http://localhost:8080/ws-servlet-test/EndpointService/EJB3Bean?wsdl
Caused by: java.io.FileNotFoundException: http://localhost:8080/ws-servlet-test/EndpointService/EJB3Bean?wsdl"}}
{code}
If I change loadOnStartup parameter to -1, everything works fine, i.e. servlet gets instantiated and WS is injected correctly. Therefore, I suppose this is a bug.
Another workaround exists - adding wsdl file to the deployment archive and using the 'wsdlLocation' parameter in @WebServiceRef (as can be seen in ServiceRefSevletTestCase).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list