Shaun
Shaun

Reputation: 1601

java.lang.IllegalArgumentException: Multiple values for same key 'request'

Anyone know what this error means? It's coming from the Google Cloud Endpoints processor and the error message gives no detail as to where it's occurring. Here is the full stack trace I see in the error log:

com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmGenerationException: java.lang.IllegalArgumentException: Multiple values for same key 'request'

UPDATE:

Through trial and error I found the offending method signature:

@ApiMethod(name = "createMasterDefaultCampaignsAndScriptsAndSchedules", path = "createMasterDefaultCampaignsAndScriptsAndSchedules", httpMethod = HttpMethod.GET)
public ArrayList<Campaign> createMasterDefaultCampaignsAndScriptsAndSchedules(Calendar pCalendar, Company pCompany) {

What's wrong with this?

Upvotes: 3

Views: 2552

Answers (2)

Timeless
Timeless

Reputation: 7537

This doesn't make sense, I have an api method:

@ApiMethod(name = "saveProgress", httpMethod = HttpMethod.POST)
public void saveProgress(Progress progress, Token token){
}

They force me to combine this two unrelated object,progress and token into one single class, which make it looks very unreadable.

Upvotes: 0

azyoot
azyoot

Reputation: 1172

Only one entity type parameter is allowed with endpoints. You must enclose all parameters in a single class.

Upvotes: 2

Related Questions