Hey Thomas,

The issue wouldn't be that generation would fail - the idea is that due to 
having recompiled the API against different classes for V2, the old client 
might not be sending requests in the way expected. Could you try to load 
the updated client library into a client machine and see if the same error 
persists with the new version of the library? I'm continuing to work on 
reproducing this issue on my own side.

Cheers,

Nick
Cloud Platform Community Support

On Tuesday, October 4, 2016 at 12:30:47 AM UTC-4, Thomas Wiradikusuma wrote:
>
> Hi Nick,
>
> The web.xml snippet I gave earlier is the one before I take one out:
>
> <param-value>com.bla.ApiV2,com.bla.ApiV2Public</param-value>
>
> Notice class ApiV2 and ApiV2Public.
>
> Also, I'm testing this from API explorer, which I think doesn't require 
> the generation of client libraries. But, for curiosity sake, I did try it (
> https://cloud.google.com/endpoints/docs/frameworks/java/generate-client-libraries-android
> ):
>
> endpoints-framework-tools get-client-lib --war=target/war -bs gradle 
> com.bla.ApiV2
> endpoints-framework-tools get-client-lib --war=target/war -bs gradle 
> com.bla.ApiV2Public
>
> No error in the generation (but doesn't fix my issue).
>
>
> Regards,
> Thomas Wiradikusuma
>
>
> On Tuesday, October 4, 2016 at 3:18:59 AM UTC+8, Nick (Cloud Platform 
> Support) wrote:
>>
>> Hey Thomas,
>>
>> Could you show what the web.xml file looks like before you take one out? 
>> I'm not sure how you've included both of them and it appears you uploaded a 
>> section from web.xml with only one Api class present.
>>
>> Also, just for testing's sake, have you managed to check whether 
>> recompiling the client against the new API version resolves the issue?
>>
>> Cheers,
>>
>> Nick
>> Cloud Platform Community Support
>>
>> On Sunday, October 2, 2016 at 11:24:21 PM UTC-4, Thomas Wiradikusuma 
>> wrote:
>>>
>>> Hi Nick,
>>>
>>> The error happens when receiving requests. I don't think it's necessary 
>>> to update the client, as the update doesn't change the server.
>>>
>>> I'm posting here since I think it's either a bug of, or lack of 
>>> documentation for, the V2 implementation @ApiClass. Let me explain.
>>>
>>> I have 2 classes that share @Api (
>>> https://cloud.google.com/endpoints/docs/frameworks/java/multiclass): 
>>>
>>> @Api(name = "api", version = "v2", namespace = @ApiNamespace(ownerDomain 
>>> = "bla.com", ownerName = "bla.com"))
>>> @ApiClass(authenticators = {AccountManager.class}, scopes = 
>>> {EMAIL_SCOPE}, clientIds = {API_V2_ANDROID_CLIENT_ID, API_V2_WEB_CLIENT_ID, 
>>> API_EXPLORER_CLIENT_ID}, audiences = {API_V2_ANDROID_AUDIENCE})
>>> public class ApiV2 { .. }
>>>
>>> @Api(name = "api", version = "v2", namespace = @ApiNamespace(ownerDomain 
>>> = "bla.com", ownerName = "bla.com"))
>>> public class ApiV2Public { .. }
>>>
>>> This is how they're defined in web.xml:
>>>
>>> <servlet>
>>> <servlet-name>api</servlet-name>
>>> <servlet-class>com.google.api.server.spi.EndpointsServlet</servlet-class>
>>> <init-param>
>>> <param-name>services</param-name>
>>> <param-value>
>>> com.bla.ApiV2,com.bla.ApiV2Public
>>> </param-value>
>>> </init-param>
>>> </servlet>
>>>
>>> If I take out one from web.xml, it works. 
>>>
>>> This used to work in V1. It could be due to this new property "issuers" 
>>> that's poorly documented (compare 
>>> https://cloud.google.com/appengine/docs/java/endpoints/annotations vs 
>>> https://cloud.google.com/endpoints/docs/frameworks/java/annotations, 
>>> Ctrl+F for "issuers").
>>>
>>> Looking forward for a solution!
>>>
>>> Regards,
>>> Thomas Wiradikusuma
>>>
>>>
>>> On Saturday, October 1, 2016 at 4:54:42 AM UTC+8, Nick (Cloud Platform 
>>> Support) wrote:
>>>>
>>>> Hey Thomas,
>>>>
>>>> This is just a guess, but it could be that it's necessary to update the 
>>>> client as well. Does that error occur when you deploy, or when you receive 
>>>> a request? That would be the way to determine if the issue is in the 
>>>> client 
>>>> needing to be updated or another issue (not clarified as yet) in the 
>>>> server 
>>>> code. 
>>>>
>>>> As a quick side-note, this forum is meant for general high level 
>>>> discussion of the platform and services, design patterns, etc. So a thread 
>>>> like this should actually be a Stack Overflow 
>>>> <http://stackoverflow.com> post. Not to worry as we watch that forum 
>>>> as well. You are more likely to find more users who can help, though, with 
>>>> a technical question in that forum.
>>>>
>>>> Cheers,
>>>>
>>>> Nick
>>>> Cloud Platform Community Support
>>>>
>>>> On Tuesday, September 27, 2016 at 9:29:27 PM UTC-4, Thomas Wiradikusuma 
>>>> wrote:
>>>>>
>>>>> Hi guys,
>>>>>
>>>>> I'm a longtime user of Cloud Endpoints (v1), and decided to give v2 a 
>>>>> try. So I followed 
>>>>> https://cloud.google.com/appengine/docs/java/endpoints/migrating and 
>>>>> here's my diff:
>>>>>
>>>>> - compile 'com.google.appengine:appengine-endpoints:1.9.42'
>>>>>
>>>>> + compile 'com.google.endpoints:endpoints-framework:2.0.0-beta.8'
>>>>>
>>>>>
>>>>> - 
>>>>> <servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class>
>>>>>
>>>>> + 
>>>>> <servlet-class>com.google.api.server.spi.EndpointsServlet</servlet-class>
>>>>>
>>>>>
>>>>> - <url-pattern>/_ah/spi/*</url-pattern>
>>>>>
>>>>> + <url-pattern>/_ah/api/*</url-pattern>
>>>>>
>>>>>
>>>>> I did *not* run the "generating client lib" as documented in 
>>>>> https://cloud.google.com/endpoints/docs/frameworks/java/generate-client-libraries-android
>>>>>  as I thought, "from the client perspective it should be the same".
>>>>>
>>>>>
>>>>> I hit this error in the server:
>>>>>
>>>>>
>>>>> SEVERE: javax.servlet.ServletContext log: unavailable
>>>>>
>>>>> com.google.api.server.spi.config.validation.InconsistentApiConfigurationException:
>>>>>  
>>>>> api: API-wide configuration does not match between the classes 
>>>>> com.foobar.ApiV2Public and com.foobar.ApiV2. All API classes with the 
>>>>> same 
>>>>> API name and version must have the exact same API-wide configuration. 
>>>>> Differing property: issuers 
>>>>> (com.google.api.server.spi.config.model.ApiIssuerConfigs@0 vs 
>>>>> com.google.api.server.spi.config.model.ApiIssuerConfigs@d03e1481).
>>>>>
>>>>>         at 
>>>>> com.google.api.server.spi.config.validation.ApiConfigValidator.validate(ApiConfigValidator.java:89)
>>>>>
>>>>>         at 
>>>>> com.google.api.server.spi.SystemService.registerLoadedService(SystemService.java:218)
>>>>>
>>>>>         at 
>>>>> com.google.api.server.spi.SystemService.registerService(SystemService.java:193)
>>>>>
>>>>>
>>>>> How do I fix this?
>>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8de9be45-11f6-457f-9b69-3f06d33f87e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine] E... Thomas Wiradikusuma
    • [google-appengi... 'Nick (Cloud Platform Support)' via Google App Engine
      • [google-app... Thomas Wiradikusuma
        • [google... 'Nick (Cloud Platform Support)' via Google App Engine
          • [go... Thomas Wiradikusuma
            • ... 'Nick (Cloud Platform Support)' via Google App Engine
              • ... 'Nick (Cloud Platform Support)' via Google App Engine
                • ... Thomas Wiradikusuma
                • ... 'Nick (Cloud Platform Support)' via Google App Engine
                • ... Thomas Wiradikusuma
                • ... 'Nick (Cloud Platform Support)' via Google App Engine
                • ... 'Nick (Cloud Platform Support)' via Google App Engine
                • ... Thomas Wiradikusuma
                • ... 'Nick (Cloud Platform Support)' via Google App Engine

Reply via email to