Hi, I've just started using the adwords api, so I'm probably doing something wrong but can't spot it.. Using the latest (1.12.0) release of the api gives me a ClassNotFound exception for the org.w3c.dom.ElementTraversal class when I use the maven dependencies. If I use the previous release (1.11.0) then all is fine and also using the jar files directly works fine. I can see there are a few changes in the jar lists between these 2 methods, which I suspect is causing it. Any ideas?
The full stack trace is given below
Thanks
John
run:
Exception in thread "main" com.google.api.ads.common.lib.exception.ServiceException: Unexpected Exception.
at com.google.api.ads.common.lib.soap.axis.AxisHandler.createSoapClient(AxisHandler.java:155)
at com.google.api.ads.common.lib.soap.axis.AxisHandler.createSoapClient(AxisHandler.java:1)
at com.google.api.ads.common.lib.factory.helper.BaseAdsServiceClientFactoryHelper.createSoapClient(BaseAdsServiceClientFactoryHelper.java:106)
at com.google.api.ads.common.lib.factory.helper.BaseAdsServiceClientFactoryHelper.createAdsServiceClient(BaseAdsServiceClientFactoryHelper.java:71)
at com.google.api.ads.common.lib.factory.AdsServiceClientFactory.getServiceClient(AdsServiceClientFactory.java:73)
at com.google.api.ads.common.lib.factory.BaseAdsServiceClientFactory.getServiceClientAsInterface(BaseAdsServiceClientFactory.java:79)
at com.google.api.ads.common.lib.factory.BaseServices.get(BaseServices.java:60)
at adwords.axis.v201209.basicoperations.GetCampaigns.runExample(adwords.axis.v201209.basicoperations.GetCampaigns:63)
at adwords.axis.v201209.basicoperations.GetCampaigns.main(adwords.axis.v201209.basicoperations.GetCampaigns:56)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.google.api.ads.common.lib.soap.axis.AxisHandler.createSoapClient(AxisHandler.java:140)
... 8 more
Caused by: java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:388)
at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)
at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)
at org.apache.axis.client.AxisClient.<init>(AxisClient.java:52)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at com.google.api.ads.adwords.axis.v201209.cm.CampaignServiceLocator.<init>(CampaignServiceLocator.java:12)
... 13 more
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 43 more
Java Result: 1
BUILD SUCCESSFUL (total time: 22 seconds)