Archive

Archive for the ‘JAX-WS’ Category

The Endpoint Interface does not have WebService Annotation

January 7, 2011 Leave a comment

Following error appears when webservices-api.jar is missing on the classpath of the Servlet container (In my case Tomcat 5). Tomcat 5 expects this in either common/lib or common/endorsed

SEVERE: WSSERVLET11: failed to parse runtime descriptor: The Endpoint Interface: com.sun.portal.wsrp.common.stubs.WSRPV1RegistrationPortType does not have WebService Annotation
com.sun.xml.ws.model.RuntimeModelerException: The Endpoint Interface: com.sun.portal.wsrp.common.stubs.WSRPV1RegistrationPortType does not have WebService Annotation
	at com.sun.xml.ws.model.RuntimeModeler.getPortTypeName(RuntimeModeler.java:1316)
	at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:160)
	at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
	at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
	at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
	at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jan 4, 2011 11:21:02 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: The Endpoint Interface: com.sun.portal.wsrp.common.stubs.WSRPV1RegistrationPortType does not have WebService Annotation
	at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:118)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: com.sun.xml.ws.model.RuntimeModelerException: The Endpoint Interface: com.sun.portal.wsrp.common.stubs.WSRPV1RegistrationPortType does not have WebService Annotation
	at com.sun.xml.ws.model.RuntimeModeler.getPortTypeName(RuntimeModeler.java:1316)
	at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:160)
	at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
	at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
	at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
	at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108)
	... 24 more
Jan 4, 2011 11:21:02 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jan 4, 2011 11:21:02 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/producer] startup failed due to previous errors

wldeploy: versioning of WebServices is not supported

November 18, 2010 1 comment

Following error is thrown when running wldeploy with redeploy flag.


<Nov 18, 2010 9:46:13 AM EST> <Error> <HTTP> <BEA-101355> <[weblogic.webservice.server.servlet.WebServiceServlet@2fe9b2e] Version b1 is specified for WebServices CampaignWS,PropertySetWS, but versioning of WebServices is not supported.> 
<Nov 18, 2010 9:46:13 AM EST> <Error> <HTTP> <BEA-101216> <Servlet: "WebServiceServlet" failed to preload on startup in Web application: "MyProducerEARToolSupport".
javax.servlet.ServletException: [HTTP:101355][weblogic.webservice.server.servlet.WebServiceServlet@2fe9b2e] Version b1 is specified for WebServices CampaignWS,PropertySetWS, but versioning of WebServices is not supported.
        at weblogic.webservice.server.servlet.WebServiceServlet.checkAppVersion(WebServiceServlet.java:173)
        at weblogic.webservice.server.servlet.WebServiceServlet.initLocal(WebServiceServlet.java:113)
        at weblogic.webservice.server.servlet.WebServiceServlet.init(WebServiceServlet.java:97)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        Truncated. see log file for complete stacktrace
> 
<Nov 18, 2010 9:46:13 AM EST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'MyProducer [Version=b1]'.
weblogic.application.ModuleException: [HTTP:101216]Servlet: "WebServiceServlet" failed to preload on startup in Web application: "MyProducerEARToolSupport".
javax.servlet.ServletException: [HTTP:101355][weblogic.webservice.server.servlet.WebServiceServlet@2fe9b2e] Version b1 is specified for WebServices CampaignWS,PropertySetWS, but versioning of WebServices is not supported.
        at weblogic.webservice.server.servlet.WebServiceServlet.checkAppVersion(WebServiceServlet.java:173)
        at weblogic.webservice.server.servlet.WebServiceServlet.initLocal(WebServiceServlet.java:113)
        at weblogic.webservice.server.servlet.WebServiceServlet.init(WebServiceServlet.java:97)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
        at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
        at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
        at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
        at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1915)
        at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1889)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1807)
        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
        at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:54)
        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
        at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
        at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
        at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
        at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
        at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
        at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
        at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
        at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
        at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
        at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1399)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        Truncated. see log file for complete stacktrace

Caused By: javax.servlet.ServletException: [HTTP:101355][weblogic.webservice.server.servlet.WebServiceServlet@2fe9b2e] Version b1 is specified for WebServices CampaignWS,PropertySetWS, but versioning of WebServices is not supported.
        at weblogic.webservice.server.servlet.WebServiceServlet.checkAppVersion(WebServiceServlet.java:173)
        at weblogic.webservice.server.servlet.WebServiceServlet.initLocal(WebServiceServlet.java:113)
        at weblogic.webservice.server.servlet.WebServiceServlet.init(WebServiceServlet.java:97)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        Truncated. see log file for complete stacktrace
> 

As suggested in [1], the solution is to comment out following section in weblogic-application.xml

weblogic-application.xml

<wls:library-ref>
<wls:library-name>wlp-tools-support-app-lib</wls:library-name>
<wls:specification-version>10.3.2</wls:specification-version>
<wls:implementation-version>10.3.2</wls:implementation-version>
</wls:library-ref>

References
[1]. http://kr.forums.oracle.com/forums/thread.jspa?threadID=804617

SSL handshake failure in Weblogic Server

November 15, 2010 Leave a comment

Following error appears on the Weblogic console when consuming a remote resource (for eg. https Webservice) which is SSL enabled. To get rid of the problem, the server certificate needs to be imported by following below instructions


<Nov 15, 2010 3:19:12 PM EST> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias demoidentity from the jks keystore file /home/vbandaru/bea/10.3.2/user_projects/domains/WSRPProducer_domain/DemoIdentity.jks.>
<Nov 15, 2010 3:19:13 PM EST> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /home/vbandaru/bea/10.3.2/user_projects/domains/WSRPProducer_domain/DemoTrust.jks.>
<Nov 15, 2010 3:20:29 PM EST> <Warning> <Security> <BEA-090477> <Certificate chain received from <hostname> – <ip> was not trusted causing SSL handshake failure.>
<Nov 15, 2010 3:20:29 PM EST> <Warning> <Security> <BEA-090477> <Certificate chain received from <hostname> – <ip> was not trusted causing SSL handshake failure.>
<Nov 15, 2010 3:20:30 PM EST> <Warning> <Security> <BEA-090477> <Certificate chain received from <hostname> – <ip> was not trusted causing SSL handshake failure.>
 

To consume https (secure) webservice, you need to import the Server certificate into Client keystore (either default .keystore or /jre/lib/security/cacerts) . In WebLogic Server/Portal scenario only cacerts works [ Confirm me if I am wrong 🙂 ]

Access the https URL from web browser and EXPORT the certificate to a location with .cer extension or any other extension. Following links would help in exporting the certificate

After this, you should be having a .der or (any extension) file with you. Use the import command below to import the certificate into weblogic keystore.Restart the server to check, if the error is resolved

Import into the keystore
keytool -import -keystore /home/user/jrockit/jre/lib/security/cacerts -alias myCertAlias -file /absolute/path/to/cert/myCert.cer
To delete Certificate
keytool -delete -keystore /home/user/jrockit/jre/lib/security/cacerts  -alias myCertAlias
To list certificate
keytool -list -keystore /home/user/jrockit/jre/lib/security/cacerts

Note: -keystore is to add it to the custom keystore, not the default one. Omitting this option will add the the cert to the default keystore at User home directory.

How to Import SSL Certificates

September 1, 2010 Leave a comment

To consume https (secure) webservice, you need to import the Server certificate into Client keystore (either default .keystore or /jre/lib/security/cacerts) . In WebLogic Server/Portal scenario only cacerts works.

Access the https URL from browser and EXPORT the certificate to a location with .cer extension or any other extension. Following links would help in exporting the certificate

Import into the keystore
keytool -import -keystore /home/user/jrockit/jre/lib/security/cacerts -alias myCertAlias -file myCert.cer
To delete Certificate
keytool -delete -keystore /home/user/jrockit/jre/lib/security/cacerts  -alias myCertAlias
To list certificate
keytool -list -keystore /home/user/jrockit/jre/lib/security/cacerts

Note: -keystore is to add it to the custom keystore, not the default one. Omitting this option will add the the cert to the default keystore at User home directory.