I'm trying to use Apache Chemistry OpenCMIS (v0.10.0) to create a server according to the tutorial at : http://chemistry.apache.org/java/how-to/how-to-create-server.html
I'm using JBoss AS 7.1.1.1.Final but when I deploy it creates most services correct until this error occurs.
Caused by: org.apache.cxf.jaxws.JaxWsConfigurationException: The @javax.jws.WebMethod(exclude=true) cannot be used on a service endpoint interface. Method: createType
I'm using the WAR dependency from Apache, but I located the source code that causes it
public interface RepositoryServicePort10 extends RepositoryServicePort {
@WebMethod(action = "createType", exclude = true)
public void createType(String repositoryId, Holder<CmisTypeDefinitionType> type, CmisExtensionType extension)
throws CmisException;
What should I do to resolve this problem?
Is it something I can configure CXF to ignore?
Or do I need to download the code, remove the "exclude = true" part and recompile? Will the server function as normal without it?
Thankful for any suggestions.
Regards, Ivar
More from the console
09:26:46,280 INFO [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-16) WSDL published to: file:/C:/apps/jboss-as-7.1.1.Final/standalone/data/wsdl/chemistry-opencmis-server-bindings-war-0.10.0.war/VersioningServiceService.wsdl
09:26:46,329 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-16) Creating Service {http://webservices.impl.server.opencmis.chemistry.apache.org/}RepositoryService10Service from class org.apache.chemistry.opencmis.server.impl.webservices.RepositoryServicePort10
09:26:46,336 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-16) MSC00001: Failed to start service jboss.deployment.unit."chemistry-opencmis-server-bindings-war-0.10.0.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."chemistry-opencmis-server-bindings-war-0.10.0.war".INSTALL: Failed to process phase INSTALL of deployment "chemistry-opencmis-server-bindings-war-0.10.0.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.jaxws.JaxWsConfigurationException: The @javax.jws.WebMethod(exclude=true) cannot be used on a service endpoint interface. Method: createType
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:88)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:117)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:113)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: org.apache.cxf.jaxws.JaxWsConfigurationException: The @javax.jws.WebMethod(exclude=true) cannot be used on a service endpoint interface. Method: createType
at org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isOperation(JaxWsServiceConfiguration.java:192)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.isValidMethod(ReflectionServiceFactoryBean.java:1859)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:908)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:435)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:685)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:507)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:203)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
... 13 more
09:26:46,395 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "chemistry-opencmis-server-bindings-war-0.10.0.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"chemistry-opencmis-server-bindings-war-0.10.0.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"chemistry-opencmis-server-bindings-war-0.10.0.war\".INSTALL: Failed to process phase INSTALL of deployment \"chemistry-opencmis-server-bindings-war-0.10.0.war\""}} 09:26:46,634 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment chemistry-opencmis-server-bindings-war-0.10.0.war in 239ms 09:26:46,638 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report JBAS014777: Services which failed to start: service jboss.deployment.unit."chemistry-opencmis-server-bindings-war-0.10.0.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."chemistry-opencmis-server-bindings-war-0.10.0.war".INSTALL: Failed to process phase INSTALL of deployment "chemistry-opencmis-server-bindings-war-0.10.0.war"
09:26:46,645 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"chemistry-opencmis-server-bindings-war-0.10.0.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"chemistry-opencmis-server-bindings-war-0.10.0.war\".INSTALL: Failed to process phase INSTALL of deployment \"chemistry-opencmis-server-bindings-war-0.10.0.war\""}}}}
I just tried the solution / and verified it / if anybody interested.
Download the sources / create a tree project with Maven on your IDE
/chemistry-opencmis-0.11.0 /chemistry-opencmis-server-bindings /chemistry-opencmis-server-inmemory
-> update compiler version from 1.5 to 1.7 on parent pom.
Update 2 followings files from -bindings:
ObjectServicePort10.java
RepositoryServicePort10.java
-> just kick out attributes (.. , exclude = true) attributes from @webmethod
And this would deploy as a charm on JBoss 7.1
Enjoy !