Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Consuming Web Service Error

Avatar

Level 3

Hi,

i'm working on the consuming web service example

http://helpx.adobe.com/adobe-cq/using/creating-cq-bundles-consume-web.html

below is the exception which is thrown also done configuration in sling.properties as suggested in  the article.Thanks in advance!

                         
Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl
 at org.apache.sling.commons.classloader.impl.ClassLoaderFacade.loadClass(ClassLoaderFacade.java:127)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at javax.xml.ws.spi.FactoryFinder.safeLoadClass(Unknown Source)
 ... 209 more
 
1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi Smacdonald2008/Sham,

Now i'm able to get the output after doing lot of changes in cq but i'm not sure which change worked exactly(PFA image) :) !!

Thanks a lot,

View solution in original post

9 Replies

Avatar

Level 10
Here is another workaround done by a community member: I did check it and it seems it works on CQ 5.4. Unfortunately from administration point of view we are quite reluctant to modify sling.properties file so i employed an alternative solution - a bundle fragment that exports all com.sun packages from system bundle.       

Avatar

Level 10
        This means CQ is not picking up the configuration. Can u please list the modifications that you performed.

Avatar

Level 3

PFA sling.properties(converted to txt unable to attach properties file).

From the last bolded text i understood that com.sun jar needs to be converted to bundle.If yes may i know the fully packaged jar file name

smacdonald2008 wrote...

Here is another workaround done by a community member: I did check it and it seems it works on CQ 5.4. Unfortunately from administration point of view we are quite reluctant to modify sling.properties file so i employed an alternative solution - a bundle fragment that exports all com.sun packages from system bundle.

 

Avatar

Level 10

To figure out what JAR files you need to add to CQ as an OSGi bundle fragment - see this StackOverFlow thread: http://stackoverflow.com/questions/5790896/what-is-the-difference-between-the-com-sun-xml-ws-package...

I personally configure the sling properties file. I just did it again with AEM 5.6. Here is what i did.

1 - Open the sling properties file located at: crx-quickstart\conf.

2- Add the following boded line to this file (only 1 line):

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.bootdelegation.com.sun=com.sun.*
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; version\=1.0, org.osgi.framework.launch; version\=1.0, org.osgi.framework.startlevel; version\=1.0, org.osgi.framework.wiring; version\=1.0, org.osgi.service.packageadmin; version\=1.2, org.osgi.service.startlevel; version\=1.1, org.osgi.service.url; version\=1.0
felix.service.urlhandlers=true

3 - Restart CQ Server. 

4 - Now the code in the web services article can talk to the WSDL via the OSGi bundle that contains the Java proxy files. Here is the result -- you can see that values are returned and displayed in the CQ page:

[img]CC1.png[/img]

Avatar

Level 3

Still the same issue followed with the above steps :(

Avatar

Correct answer by
Level 3

Hi Smacdonald2008/Sham,

Now i'm able to get the output after doing lot of changes in cq but i'm not sure which change worked exactly(PFA image) :) !!

Thanks a lot,

Avatar

Level 10

Can you do a search in your CQ install dir and make sure that there is only 1 sling properties file. For some reason -- CQ is not picking up your sling prop file. 

Avatar

Level 10

Can you try making your changes in [CQ5_DIR]/sling.properties instead at conf folder

Avatar

Level 10

that is great -- you configured your sling properties file so that CQ picked up the change. Nice job!