Expand my Community achievements bar.

SOLVED

CQ5 Webservices not working - A WebService annotation is not present on class

Avatar

Level 4

Hello,
I'm trying to port my simple webservice consuming app to CQ5 but I'm still getting this error

com.sun.xml.internal.ws.model.RuntimeModelerException: A WebService annotation is not present on class: info.server.app.catalogservices.services.csscatalogservicesinterface_1.PortType

from this call

variable = service.getPort(PortType.class);

When I open the PortType class everything looks fine

/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.9-b130926.1035 * Generated source version: 2.2 * */ @WebService(name = "portType", targetNamespace = "http://my.server.info/CatalogServices/Services/CSSCatalogServicesInterface-1.0") @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) @XmlSeeAlso({...many other classes...}) public interface PortType { // the interface itself }

I'm begginer with webservices and I appreciate any help.

EDIT I'm using version 5.6.0.20130125

1 Accepted Solution

Avatar

Correct answer by
Level 10

Jakolcz wrote...

Sham HC wrote...

Jakolcz wrote...

I've already tried that but still the same problem.

 

Did you followed http://helpx.adobe.com/experience-manager/using/creating-cq-bundles-consume-web.html

 

 

Basically I did.

I've just found that I have two 'sling.properties' files there. The first one is in 'crx-quickstart' and second one is in 'crx-quickstart/conf'. I've tried to rename both to 'sling.properties.bck' and CQ recreated the one in 'crx-quickstart' automatically so I guess it uses this one, am I right? This is what my sling.properties file looks like

 

Also if I try to intall and run the servlet that uses webservices without restarting the server I get this error

  1. javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found

BTW - I tried to run in on different server with CQ 6.0.0.20140509 and everything works fine... Java versions on both servers are same
 

 
  1. $ java -version
  2. java version "1.7.0_65"
  3. OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
  4. OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

 

 

  • The usage of sling.properties depends how you start the instance weather with double click and startup script.
  •  OpenJDK is not supported could you please try with oracle hotspot jdk?

View solution in original post

5 Replies

Avatar

Level 4
        I've already tried that but still the same problem.

Avatar

Level 10

In the sling.properties add [1]

[1]  sling.bootdelegation.com.sun=com.sun.* 

Avatar

Level 10

Jakolcz wrote...

I've already tried that but still the same problem.

 

Did you followed http://helpx.adobe.com/experience-manager/using/creating-cq-bundles-consume-web.html

Avatar

Level 4

Sham HC wrote...

Jakolcz wrote...

I've already tried that but still the same problem.

 

Did you followed http://helpx.adobe.com/experience-manager/using/creating-cq-bundles-consume-web.html

 

 

Basically I did.

I've just found that I have two 'sling.properties' files there. The first one is in 'crx-quickstart' and second one is in 'crx-quickstart/conf'. I've tried to rename both to 'sling.properties.bck' and CQ recreated the one in 'crx-quickstart' automatically so I guess it uses this one, am I right? This is what my sling.properties file looks like

#Overlay properties for configuration #Fri Jul 25 07:38:43 CEST 2014 sling.framework.install.incremental=true obr.repository.url=http\://sling.apache.org/obr/repository.xml sling.bootdelegation.weblogic=weblogic.xml.* org.osgi.framework.system.packages=${osgi-core-packages}, ${osgi-compendium-services}, org.apache.sling.launchpad.api;version\=1.1.0, ${jre-${java.specification.version}} ${org.apache.sling.launcher.system.packages} org.apache.sling.commons.log.file.number=5 org.osgi.framework.startlevel.beginning=30 org.osgi.framework.bundle.parent=framework org.apache.sling.commons.log.file.size='.'yyyy-MM-dd gosh.home=${sling.home} ds.factory.enabled=true repository.home=${sling.home}/repository sling.bootdelegation.sun.reflect=sun.reflect ds.loglevel=warn org.apache.sling.commons.log.julenabled=true org.osgi.framework.system.capabilities=${eecap-${java.specification.version}} osgi-compendium-services=org.osgi.util.tracker;version\="1.5" org.osgi.framework.storage=${sling.launchpad}/felix org.apache.sling.commons.log.file=${sling.home}/logs/error.log sling.bootdelegation.jboss.__redirected=__redirected sling.bootdelegation.com.sun=com.sun.* sling.bootdelegation.jboss=__redirected granite.product.version=0.0.0.0_0_0_5_6_ org.osgi.framework.bootdelegation=com.yourkit.*, ${org.apache.sling.launcher.bootdelegation} sling.fileinstall.dir=${sling.home}/install org.apache.felix.http.shared_servlet_context_attributes=true felix.startlevel.bundle=20 sling.framework.install.startlevel=1 jre-1.7=javax.accessibility;uses\:\="javax.swing.text";version\="0.0.0.1_007_JavaSE", javax.activity;version\="0.0.0.1_007_JavaSE", javax.annotation.processing;uses\:\="javax.tools,javax.lang.model,javax.lang.model.element,javax.lang.mo$ sling.installer.dir=${sling.launchpad}/installer org.apache.sling.commons.log.level=INFO ee-1.7=JavaSE-1.7,JavaSE-1.6,J2SE-1.5,J2SE-1.4,J2SE-1.3, J2SE-1.2,JRE-1.1,JRE-1.0,OSGi/Minimum-1.2,OSGi/Minimum-1.1, OSGi/Minimum-1.0 sling.ignoreSystemProperties=true granite.product=Adobe Experience Manager gosh.args=--noshutdown --nointeractive org.osgi.framework.executionenvironment=${ee-${java.specification.version}} eecap-1.7=osgi.ee; osgi.ee\="OSGi/Minimum"; version\:List<Version>\="1.0,1.1,1.2", osgi.ee; osgi.ee\="JavaSE"; version\:List<Version>\="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7" sling.run.mode.install.options=author,publish|crx2,crx3|crx3mongo,crx3h2|samplecontent,nosamplecontent felix.cm.dir=${sling.launchpad}/config sling.context.default=default sling.bootdelegation.ibm=com.ibm.xml.* sling.fileinstall.writeback=false osgi-core-packages=org.osgi.framework; version\=1.6, org.osgi.framework.hooks.bundle; version\=1.0, org.osgi.framework.hooks.resolver; version\=1.0, org.osgi.framework.hooks.service; version\=1.1, org.osgi.framework.hooks.weaving; versi$ felix.service.urlhandlers=true

Also if I try to intall and run the servlet that uses webservices without restarting the server I get this error

javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found

BTW - I tried to run in on different server with CQ 6.0.0.20140509 and everything works fine... Java versions on both servers are same
 

$ java -version java version "1.7.0_65" OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17) OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Avatar

Correct answer by
Level 10

Jakolcz wrote...

Sham HC wrote...

Jakolcz wrote...

I've already tried that but still the same problem.

 

Did you followed http://helpx.adobe.com/experience-manager/using/creating-cq-bundles-consume-web.html

 

 

Basically I did.

I've just found that I have two 'sling.properties' files there. The first one is in 'crx-quickstart' and second one is in 'crx-quickstart/conf'. I've tried to rename both to 'sling.properties.bck' and CQ recreated the one in 'crx-quickstart' automatically so I guess it uses this one, am I right? This is what my sling.properties file looks like

 

Also if I try to intall and run the servlet that uses webservices without restarting the server I get this error

  1. javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found

BTW - I tried to run in on different server with CQ 6.0.0.20140509 and everything works fine... Java versions on both servers are same
 

 
  1. $ java -version
  2. java version "1.7.0_65"
  3. OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
  4. OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

 

 

  • The usage of sling.properties depends how you start the instance weather with double click and startup script.
  •  OpenJDK is not supported could you please try with oracle hotspot jdk?