Topic
2 replies Latest Post - ‏2011-12-08T22:17:46Z by Vincent978
Vincent978
Vincent978
5 Posts
ACCEPTED ANSWER

Pinned topic Deployment Failed for POJO web service

‏2011-12-08T15:55:09Z |
Have been using WASCE V2.1.1.5 with CXF as a webservice client fine for some time successfully.
When I try to create a POJO web service, if fails on deployment of the EAR file:

2011-12-08 10:35:34,007 ERROR DeploymentPortlet Deployment Failed
POJO web service: MyService not configured by any web service builder
org.apache.geronimo.common.DeploymentException: POJO web service: MyService not configured by any web service builder
at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:453)
at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:645)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
at java.lang.Thread.run(Thread.java:736)

Have added this to web.xml:

<servlet>
<servlet-name>TestService</servlet-name>
<servlet-class>com.test.TestService</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>TestService</servlet-name>
<url-pattern>/TestService</url-pattern>
</servlet-mapping>
POJO:

@WebService(serviceName = "TestService", portName = "TestServicePort", ...)
public class EventProcessingService {...
What else am I possibly missing ?
Updated on 2011-12-08T22:17:46Z at 2011-12-08T22:17:46Z by Vincent978
  • Vincent978
    Vincent978
    5 Posts
    ACCEPTED ANSWER

    Re: Deployment Failed for POJO web service

    ‏2011-12-08T20:50:09Z  in response to Vincent978
    Decided to created a new project from scratch using Eclipse
    File -> New Dynamic Project
    New -> WebServices -> Web Service (choosing CXF)
    This time the deployment succeeds but it fails to start.
    Can anyone explain what init method it is trying to invoke that is causing the Access denied ?

    2011-12-08 15:35:30,623 ERROR ContextLoader Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventprocessingporttype': Invocation of init method failed; nested exception is java.security.AccessControlException: Access denied (javax.xml.ws.WebServicePermission publishEndpoint)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(AccessController.java:224)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4131)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4620)
    at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:63)
    at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:398)
    at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
    at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:251)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
    at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:367)
    at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:512)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:998)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:272)
    ...
    • Vincent978
      Vincent978
      5 Posts
      ACCEPTED ANSWER

      Re: Deployment Failed for POJO web service

      ‏2011-12-08T22:17:46Z  in response to Vincent978
      Root cause: java.security.AccessControlException: access denied (javax.xml.ws.WebServicePermission publishEndpoint)

      Found the solution documented here:
      https://cwiki.apache.org/GMOxDOC22/web-services-issues.html#WebServicesissues-AccessControlExceptionwhendeployingWebServicesusingCXF