I am using JBossAS 5.0.0.GA with JBossWS 3.0.4 and I am trying to publish an 
endpoint using

  |     Endpoint publish(String address, Object implementor)
  | 

I supply the call with an instance of my endpoint class which is annotated with 
the appropriate WebService, SOAPBinding, WebMethod, etc annotations.

During deployment of the endpoint I get a Class Cast Exception as follows

  | 11:40:51,731 ERROR [AbstractKernelController] Error installing to 
PostClassLoader: name=/xtsservicetests1 state=ClassLoader mode=Manual 
requiredState=PostClassLoader
  | org.jboss.deployers.spi.DeploymentException: Error during deploy: 
/xtsservicetests1
  |     at 
org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
  |     at 
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
  |     at 
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
  |     at 
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
  |     at 
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
  |     at 
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  |     at 
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
  |     at 
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  |     at 
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
  |     at 
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  |     at 
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
  |     at 
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
  |     at 
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
  |     at 
org.jboss.deployers.plugins.main.MainDeployerImpl.deploy(MainDeployerImpl.java:418)
  |     at 
org.jboss.wsf.container.jboss50.transport.EndpointAPIHttpTransportManager.deploy(EndpointAPIHttpTransportManager.java:169)
  |     at 
org.jboss.wsf.container.jboss50.transport.EndpointAPIHttpTransportManager.createListener(EndpointAPIHttpTransportManager.java:85)
  |     at 
org.jboss.wsf.framework.deployment.HttpTransportDeploymentAspect.create(HttpTransportDeploymentAspect.java:76)
  |     at 
org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.create(DeploymentAspectManagerImpl.java:121)
  |     at 
org.jboss.wsf.container.jboss50.BareWSFRuntime.create(BareWSFRuntime.java:61)
  |     at 
org.jboss.wsf.container.jboss50.transport.WSFRuntimeDelegateHttpServer.publish(WSFRuntimeDelegateHttpServer.java:96)
  |     at 
org.jboss.ws.core.jaxws.spi.EndpointImpl.publish(EndpointImpl.java:172)
  |     at 
org.jboss.ws.core.jaxws.spi.EndpointImpl.publish(EndpointImpl.java:129)
  |     at 
org.jboss.ws.core.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:83)
  |     at javax.xml.ws.Endpoint.publish(Endpoint.java:184)
  |     at 
org.jboss.jbossts.xts.servicetests.service.XTSServiceTestServiceManager.publish(XTSServiceTestServiceManager.java:19)
  |     at 
org.jboss.jbossts.xts.servicetests.test.XTSPublishAndInvokeTest.run(XTSPublishAndInvokeTest.java:20)
  |     at 
org.jboss.jbossts.xts.servicetests.bean.XTSServiceTestRunnerBean$1.run(XTSServiceTestRunnerBean.java:74)
  | Caused by: java.lang.ClassCastException: 
org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit
  |     at 
org.jboss.deployment.security.AbstractSecurityDeployer.deploy(AbstractSecurityDeployer.java:148)
  |     at 
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
  |     ... 25 more
  | 

The problem is that AbstractSecurityDeployer.deploy is invoked with an 
AbstractDeploymentUnit as argument. However, at line 148 it tries to cast its 
argument to a VFSDeploymentUnit.

Any ideas why this is happening?

Has anyone successfully managed to use Endpoint.publish previously? If so what 
did you do to avoid running up against this exception?




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200960#4200960

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200960
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to