Web Service deployment into Glassfish error

Rahul Khimasia

I am trying to deploy a simple; one java class hello world; web service into the Glassfish 4 Java EE server.

package sample;

import javax.jws.WebService;

@WebService
public class HelloWorld {
    public String hello(String param){
    return param + ", World";
    }
}

But I get the following error. How do I fix it.

2015-10-15T10:18:19.397-0400|Severe: Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationPortTypeRPCPortImpl] have the same url pattern: [/RegistrationService_V10]

Here is the full exception stack trace I get.

2015-10-15T10:18:19.397-0400|Severe: Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationPortTypeRPCPortImpl] have the same url pattern: [/RegistrationService_V10]
2015-10-15T10:18:19.397-0400|Severe: Exception while deploying the app [WebServiceEx2MetroServer]
2015-10-15T10:18:19.397-0400|Severe: Exception during lifecycle processing
java.lang.IllegalStateException: Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationPortTypeRPCPortImpl] have the same url pattern: [/RegistrationService_V10]. Related annotation information: annotation [@javax.jws.WebService(name=, wsdlLocation=/wsdls/wsc10/wscoor.wsdl, portName=RegistrationPortTypeRPCPort, endpointInterface=com.sun.xml.ws.tx.coord.v10.types.RegistrationPortTypeRPC, serviceName=RegistrationService_V10, targetNamespace=http://schemas.xmlsoap.org/ws/2004/10/wscoor)] on annotated element [class com.sun.xml.ws.tx.coord.v10.endpoint.RegistrationPortTypeRPCPortImpl] of type [TYPE]
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:518)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
    at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
    at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:745)
Caused by: Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationPortTypeRPCPortImpl] have the same url pattern: [/RegistrationService_V10]. Related annotation information: annotation [@javax.jws.WebService(name=, wsdlLocation=/wsdls/wsc10/wscoor.wsdl, portName=RegistrationPortTypeRPCPort, endpointInterface=com.sun.xml.ws.tx.coord.v10.types.RegistrationPortTypeRPC, serviceName=RegistrationService_V10, targetNamespace=http://schemas.xmlsoap.org/ws/2004/10/wscoor)] on annotated element [class com.sun.xml.ws.tx.coord.v10.endpoint.RegistrationPortTypeRPCPortImpl] of type [TYPE]
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:375)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:289)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:195)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462)
    ... 53 more
Caused by: java.lang.IllegalArgumentException: Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationPortTypeRPCPortImpl] have the same url pattern: [/RegistrationService_V10]
    at org.glassfish.web.deployment.descriptor.WebBundleDescriptorImpl.addWebComponentDescriptor(WebBundleDescriptorImpl.java:362)
    at org.glassfish.webservices.connector.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHandler.java:461)
    at com.sun.enterprise.deployment.annotation.factory.SJSASFactory$LazyAnnotationHandler.processAnnotation(SJSASFactory.java:148)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:344)
    ... 59 more

2015-10-15T10:18:19.491-0400|Severe: Exception while deploying the app [WebServiceEx2MetroServer] : Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationPortTypeRPCPortImpl] have the same url pattern: [/RegistrationService_V10]. Related annotation information: annotation [@javax.jws.WebService(name=, wsdlLocation=/wsdls/wsc10/wscoor.wsdl, portName=RegistrationPortTypeRPCPort, endpointInterface=com.sun.xml.ws.tx.coord.v10.types.RegistrationPortTypeRPC, serviceName=RegistrationService_V10, targetNamespace=http://schemas.xmlsoap.org/ws/2004/10/wscoor)] on annotated element [class com.sun.xml.ws.tx.coord.v10.endpoint.RegistrationPortTypeRPCPortImpl] of type [TYPE]
Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationPortTypeRPCPortImpl] have the same url pattern: [/RegistrationService_V10]. Related annotation information: annotation [@javax.jws.WebService(name=, wsdlLocation=/wsdls/wsc10/wscoor.wsdl, portName=RegistrationPortTypeRPCPort, endpointInterface=com.sun.xml.ws.tx.coord.v10.types.RegistrationPortTypeRPC, serviceName=RegistrationService_V10, targetNamespace=http://schemas.xmlsoap.org/ws/2004/10/wscoor)] on annotated element [class com.sun.xml.ws.tx.coord.v10.endpoint.RegistrationPortTypeRPCPortImpl] of type [TYPE]
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:375)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:289)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:195)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
    at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
    at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Servlet [RegistrationRequesterPortTypePortImpl] and Servlet [RegistrationPortTypeRPCPortImpl] have the same url pattern: [/RegistrationService_V10]
    at org.glassfish.web.deployment.descriptor.WebBundleDescriptorImpl.addWebComponentDescriptor(WebBundleDescriptorImpl.java:362)
    at org.glassfish.webservices.connector.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHandler.java:461)
    at com.sun.enterprise.deployment.annotation.factory.SJSASFactory$LazyAnnotationHandler.processAnnotation(SJSASFactory.java:148)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:344)
    ... 59 more
Rahul Khimasia

I figured out my problem. I realized that I had included Glassfish's run time libraries in my Maven configuration as provided libraries to assist with compiling the project. But somehow those Glassfish libraries were unexpectedly also getting deployed in my app's WEB-INF/lib. Once I took care of my Maven configuration to not include them into the deployment these errors went away.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Create Glassfish windows service error

From Dev

How can i resolve the "HTTP Status 500 - Internal Server Error" in my web service app on glassfish?

From Dev

autodeploy web service java with glassfish server 4.1.1?

From Dev

Creating and Running RESTful Web Service on GlassFish

From Dev

Deployment-Error: Java-Webproject from netbeans to glassfish 4.0

From Dev

Deployment of web service work on local machine but on another machine throws runtime error

From Dev

Glassfish error while deploying ear web application

From Dev

Error when deploying web app on Glassfish

From Dev

Error with git configuration for web deployment

From Dev

Rest Web Service deployment descriptor query java

From Dev

Web Reference Service Error

From Dev

Restful Web Service Error

From Dev

Web Reference Service Error

From Dev

Web deployment error - Logfile provider may not support this deployment

From Dev

JAR libraries in WEB-INF/lib not added to classpath during Glassfish deployment

From Dev

glassfish-web.xml deployment descriptor file is not using GUI tabs in netbeans

From Dev

Service Fabric Deployment Error: ServiceManifest.xml is missing for service

From Java

What is going wrong with web deployment from Visual Studio and App service?

From Dev

IntelliJ Jersey Web Service Deployment (Some tips and Template Project)

From Dev

IntelliJ Jersey Web Service Deployment (Some tips and Template Project)

From Dev

which files need wcf web service deployment on iis

From Dev

Fail to start web service after tomcat 8 deployment

From Dev

VSTS build .NET ASP to Web Service using Continuous Deployment

From Dev

Can not run GlassFish as a service

From Dev

Web Service Endpoint identity error

From Dev

Android Web Service Connection ERROR

From Dev

Web Service Endpoint identity error

From Dev

JAX-RS web service is working on GlassFish Server 4.0 but not working on Tomcat

From Dev

Glassfish 4.1 can't run RestFul service when using ear/ejb/web module

Related Related

  1. 1

    Create Glassfish windows service error

  2. 2

    How can i resolve the "HTTP Status 500 - Internal Server Error" in my web service app on glassfish?

  3. 3

    autodeploy web service java with glassfish server 4.1.1?

  4. 4

    Creating and Running RESTful Web Service on GlassFish

  5. 5

    Deployment-Error: Java-Webproject from netbeans to glassfish 4.0

  6. 6

    Deployment of web service work on local machine but on another machine throws runtime error

  7. 7

    Glassfish error while deploying ear web application

  8. 8

    Error when deploying web app on Glassfish

  9. 9

    Error with git configuration for web deployment

  10. 10

    Rest Web Service deployment descriptor query java

  11. 11

    Web Reference Service Error

  12. 12

    Restful Web Service Error

  13. 13

    Web Reference Service Error

  14. 14

    Web deployment error - Logfile provider may not support this deployment

  15. 15

    JAR libraries in WEB-INF/lib not added to classpath during Glassfish deployment

  16. 16

    glassfish-web.xml deployment descriptor file is not using GUI tabs in netbeans

  17. 17

    Service Fabric Deployment Error: ServiceManifest.xml is missing for service

  18. 18

    What is going wrong with web deployment from Visual Studio and App service?

  19. 19

    IntelliJ Jersey Web Service Deployment (Some tips and Template Project)

  20. 20

    IntelliJ Jersey Web Service Deployment (Some tips and Template Project)

  21. 21

    which files need wcf web service deployment on iis

  22. 22

    Fail to start web service after tomcat 8 deployment

  23. 23

    VSTS build .NET ASP to Web Service using Continuous Deployment

  24. 24

    Can not run GlassFish as a service

  25. 25

    Web Service Endpoint identity error

  26. 26

    Android Web Service Connection ERROR

  27. 27

    Web Service Endpoint identity error

  28. 28

    JAX-RS web service is working on GlassFish Server 4.0 but not working on Tomcat

  29. 29

    Glassfish 4.1 can't run RestFul service when using ear/ejb/web module

HotTag

Archive