Hey Lucas,

Which version of the App Engine SDK is your java project compiling against? 
It does seem odd that the parameter's annotation should not be recognized.

Cheers,

Nick
Cloud Platform Community Support

On Tuesday, September 20, 2016 at 7:27:37 PM UTC-4, Lucas Layman wrote:
>
> I am using the [Google Plugin for Eclipse][1], and I am writing an App 
> Engine app as a Dynamic Web Module in Eclipse WTP.
>
> I have defined the following Java class to serve as a Cloud Endpoint API:
>
> package mypackage;
>
> import static mypackage.OfyService.ofy;
>
> import java.util.List;
> import java.util.logging.Logger;
>
> import mypackage.models.ProbeEntry;
> import mypackage.models.ProbeSet;
>
> import com.google.api.server.spi.config.Api;
> import com.google.api.server.spi.config.ApiMethod;
> import com.google.api.server.spi.config.ApiNamespace;
> import com.google.api.server.spi.config.Named;
> import com.googlecode.objectify.ObjectifyService;
>
> @Api(name = "analysisEndpoint", 
>         version = "v1", 
>         namespace = @ApiNamespace(
>                                                            ownerDomain = 
> "myorg", 
>                                                             ownerName = 
> "myorg", 
>                                                               packagePath 
> = "analysis")
>               )
> public class AnalysisEndpoint {
>
>        @ApiMethod(name = "getMyProbeEntries", httpMethod = ApiMethod.
> HttpMethod.GET)
>        public ProbeSet getMyProbeEntries(@Named("amount") int amount) {
>                ObjectifyService.begin();
>
>                 List<ProbeEntry> probeList = ofy().load().type(ProbeEntry.
> class).limit(amount).list();
>
>                 return new ProbeSet(probeList);
> }
> }
>
>
> I attempt to deploy to the Google App Engine by right-clicking the project 
> -> Google App Engine WTP -> Deploy Project to Remote Server. I see in my 
> console that the project is compiling and uploading, but eventually errors 
> out with:
>
> 99% Endpoints configuration not updated.  The app returned an error when 
>> the Google Cloud Endpoints server attempted to communicate with it.
>
>
> The error log on the app engine shows the following:
>
>>     18:31:58.119
>> javax.servlet.ServletContext log: unavailable
>>         
>> com.google.api.server.spi.config.validation.MissingParameterNameException: 
>> analysisEndpoint.myorg.analysis.AnalysisEndpoint.getMyProbeEntries 
>> parameter (type int): Missing parameter name. Parameter type (int) is not 
>> an entity type and thus should be annotated with @Named.
>> at     
>>         
>> com.google.api.server.spi.config.validation.ApiConfigValidator.validateApiParameter(ApiConfigValidator.java:214)
>> ...
>
>
> As can be seen in the code, I do have `@Named("amount")` before the 
> offending parameter. What is going wrong here? Side note: If I simply 
> remove the `amount` parameter, the project deploys to App Engine without a 
> problem.
>
> Any help would be greatly appreciated.
>

-- 
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/8d17aede-15e0-4b04-aeed-00cbc5ab28d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to