Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
public class Person { private String name; public String getName() { return name; } public Person setName(String name) { this.name = name; return this; } } //provider @RequestMapping(value = "/test", method = RequestMethod.GET) public void queryEvents(Person person) { System.out.println(person); }
error:
Caused by: java.lang.IllegalStateException: Failed to create lambda from public org.apache.servicecomb.demo.springmvc.server.Person org.apache.servicecomb.demo.springmvc.server.Person.setRkdName(java.lang.String) at org.apache.servicecomb.foundation.common.utils.LambdaMetafactoryUtils.createLambda(LambdaMetafactoryUtils.java:139) at org.apache.servicecomb.swagger.invocation.arguments.producer.ProducerArgumentsMapperCreator.processBeanParameter(ProducerArgumentsMapperCreator.java:117) at org.apache.servicecomb.swagger.invocation.arguments.AbstractArgumentsMapperCreator.doCreateArgumentsMapper(AbstractArgumentsMapperCreator.java:179) at org.apache.servicecomb.swagger.invocation.arguments.producer.ProducerArgumentsMapperCreator.createArgumentsMapper(ProducerArgumentsMapperCreator.java:60) at org.apache.servicecomb.swagger.engine.SwaggerEnvironment.createProducer(SwaggerEnvironment.java:142) at org.apache.servicecomb.core.provider.producer.ProducerProviderManager.registerSchema(ProducerProviderManager.java:93) at org.apache.servicecomb.core.provider.producer.ProducerProviderManager.regsiterProducerMetas(ProducerProviderManager.java:82) at org.apache.servicecomb.core.provider.producer.ProducerProviderManager.init(ProducerProviderManager.java:68) at org.apache.servicecomb.core.SCBEngine.doRun(SCBEngine.java:342) at org.apache.servicecomb.core.SCBEngine.run(SCBEngine.java:297) ... 13 more Caused by: java.lang.invoke.LambdaConversionException: Type mismatch for lambda expected return: class org.apache.servicecomb.demo.springmvc.server.Person is not convertible to void at java.lang.invoke.AbstractValidatingLambdaMetafactory.validateMetafactoryArgs(AbstractValidatingLambdaMetafactory.java:286) at java.lang.invoke.LambdaMetafactory.metafactory(LambdaMetafactory.java:303) at org.apache.servicecomb.foundation.common.utils.LambdaMetafactoryUtils.createLambda(LambdaMetafactoryUtils.java:129) ... 22 more
Attachments
Issue Links
- links to