Hi Ray, I tried your suggestion, and now it works on both the devserver and on appspot.
Thanks a lot. Best, Anders 2014/1/16 Ray Tsang (AdWords API Team) <[email protected]> > Anders, > > Could I trouble you to place the ads.properties in WEB-INF/ instead? > e.g., src/main/webapp/WEB-INF/ads.properties. > > When using the API, instead of .fromFile()... try > .fromFile("WEB-INF/ads.properties")... > > Thanks! > > -- > Ray Tsang (AdWords API Advisor) > > > On Tuesday, January 14, 2014 3:40:02 AM UTC-5, Anders H wrote: >> >> Hi Ray, >> >> I am using Eclipse for development and have placed the ads.properties >> file in "src/main/resources", which is in the Java Build Path. I use Maven >> for compilation from the cmd prompt and the applicatioin is packed as a >> .war file. >> >> To start the development server I use "mvn appengine:devserver" from the >> cmd prompt (Windows 7). >> >> I have also tried to place the ads.properties file in my home directory, >> but with the same result. >> >> Best, >> Anders >> >> >> 2014/1/13 Ray Tsang (AdWords API Team) <[email protected]> >> >>> Anders, >>> >>> Could I trouble you to confirm how you have packaged the ads.properties >>> file for deployment? (e.g., is it in the .war file, and under certain >>> directly?) >>> Secondly, what is the commandline that you are using to start the >>> development server? >>> >>> Thanks, >>> >>> -- >>> Ray Tsang (AdWords API Advisor) >>> >>> >>> On Wednesday, January 8, 2014 12:06:27 PM UTC-5, Anders H wrote: >>>> >>>> Hi, >>>> >>>> I have an application running on App Engine that works as expected on >>>> appspot, but when running on the devserver the credentials are not fetched >>>> from the ads.properties file. >>>> >>>> Is this a known problem with AdWords on App Engine? >>>> >>>> This is the info I get on the devserver: >>>> >>>> [INFO] Client ID must be set as api.adwords.clientId in ads.properties. >>>> [INFO] If you do not have a client ID or secret, please create one in >>>> the API console: https://code.google.com/apis/cons >>>> ole#access caused by: [clientId] >>>> [INFO] at com.google.api.ads.common.lib.auth.OfflineCredentials$ForApi >>>> Builder.validate(OfflineCredentials.java:337) >>>> [INFO] at com.google.api.ads.common.lib.auth.OfflineCredentials$ForApi >>>> Builder.build(OfflineCredentials.java:383) >>>> [INFO] at jaxwsdemo.GetAccountHierarchy.main(GetAccountHierarchy.java: >>>> 58) >>>> [INFO] at adwapi.RunExample.doGet(RunExample.java:37) >>>> [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) >>>> [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >>>> [INFO] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder >>>> .java:511) >>>> [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >>>> r(ServletHandler.java:1166) >>>> [INFO] at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter >>>> (DevSocketFilter.java:74) >>>> [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >>>> r(ServletHandler.java:1157) >>>> [INFO] at com.google.appengine.tools.development.ResponseRewriterFilte >>>> r.doFilter(ResponseRewriterFilter.java:123) >>>> [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >>>> r(ServletHandler.java:1157) >>>> [INFO] at com.google.appengine.tools.development.HeaderVerificationFil >>>> ter.doFilter(HeaderVerificationFilter.java:34) >>>> [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >>>> r(ServletHandler.java:1157) >>>> [INFO] at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFil >>>> ter(ServeBlobFilter.java:63) >>>> [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >>>> r(ServletHandler.java:1157) >>>> [INFO] at com.google.apphosting.utils.servlet.TransactionCleanupFilter >>>> .doFilter(TransactionCleanupFilter.java:43) >>>> [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >>>> r(ServletHandler.java:1157) >>>> [INFO] at com.google.appengine.tools.development.StaticFileFilter.doFi >>>> lter(StaticFileFilter.java:125) >>>> [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >>>> r(ServletHandler.java:1157) >>>> [INFO] at com.google.appengine.tools.development.DevAppServerModulesFi >>>> lter.doDirectRequest(DevAppServerModulesFilter.ja >>>> va:368) >>>> [INFO] at com.google.appengine.tools.development.DevAppServerModulesFi >>>> lter.doDirectModuleRequest(DevAppServerModulesFil >>>> ter.java:351) >>>> [INFO] at com.google.appengine.tools.development.DevAppServerModulesFi >>>> lter.doFilter(DevAppServerModulesFilter.java:116) >>>> >>>> [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >>>> r(ServletHandler.java:1157) >>>> [INFO] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl >>>> er.java:388) >>>> [INFO] at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHa >>>> ndler.java:216) >>>> [INFO] at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl >>>> er.java:182) >>>> [INFO] at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl >>>> er.java:765) >>>> [INFO] at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext. >>>> java:418) >>>> [INFO] at com.google.appengine.tools.development.DevAppEngineWebAppCon >>>> text.handle(DevAppEngineWebAppContext.java:97) >>>> [INFO] at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp >>>> er.java:152) >>>> [INFO] at com.google.appengine.tools.development.JettyContainerService >>>> $ApiProxyHandler.handle(JettyContainerService.jav >>>> a:485) >>>> [INFO] at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp >>>> er.java:152) >>>> [INFO] at org.mortbay.jetty.Server.handle(Server.java:326) >>>> [INFO] at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnectio >>>> n.java:542) >>>> [INFO] at org.mortbay.jetty.HttpConnection$RequestHandler.headerComple >>>> te(HttpConnection.java:923) >>>> [INFO] at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) >>>> [INFO] at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: >>>> 212) >>>> [INFO] at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: >>>> 404) >>>> [INFO] at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn >>>> dPoint.java:409) >>>> [INFO] at org.mortbay.thread.QueuedThreadPool$PoolThread.run( >>>> QueuedThreadPool.java:582) >>>> >>>> Best, >>>> Anders >>>> >>> -- >>> -- >>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ >>> Also find us on our blog and discussion group: >>> http://googleadsdeveloper.blogspot.com >>> http://groups.google.com/group/adwords-api >>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ >>> >>> You received this message because you are subscribed to the Google >>> Groups "AdWords API Forum" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/adwords-api?hl=en >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "AdWords API Forum" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/ >>> topic/adwords-api/PAg4NiPw7Rw/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- > -- > =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ > Also find us on our blog and discussion group: > http://googleadsdeveloper.blogspot.com > http://groups.google.com/group/adwords-api > =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ > > You received this message because you are subscribed to the Google > Groups "AdWords API Forum" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/adwords-api?hl=en > --- > You received this message because you are subscribed to a topic in the > Google Groups "AdWords API Forum" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/adwords-api/PAg4NiPw7Rw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
