[ 
https://issues.apache.org/jira/browse/SCB-74?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16628362#comment-16628362
 ] 

ASF GitHub Bot commented on SCB-74:
-----------------------------------

heyile opened a new pull request #925: [SCB-74] POJO static method is export as 
an operation
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/925
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
    - [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line 
and body.
    - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
    - [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> POJO static method is export as an operation
> --------------------------------------------
>
>                 Key: SCB-74
>                 URL: https://issues.apache.org/jira/browse/SCB-74
>             Project: Apache ServiceComb
>          Issue Type: Bug
>          Components: Java-Chassis
>            Reporter: Bo Li
>            Priority: Major
>              Labels: newbie
>
> When using @rpcschema to expose a singleton POJO as schema interface, then 
> call the public method of the class which the method belong to, exception 
> occurs as follow:
> {code}
> Exception in thread "main" java.lang.NullPointerException
> at 
> io.servicecomb.swagger.generator.core.utils.ClassUtils.getOrCreateClass(ClassUtils.java:135)
> at 
> io.servicecomb.swagger.converter.model.ModelImplConverter.doConvert(ModelImplConverter.java:55)
> at 
> io.servicecomb.swagger.converter.AbstractConverter.convert(AbstractConverter.java:42)
> at 
> io.servicecomb.swagger.converter.ConverterMgr.findJavaType(ConverterMgr.java:188)
> at 
> io.servicecomb.swagger.converter.ConverterMgr.findByRef(ConverterMgr.java:196)
> at 
> io.servicecomb.swagger.converter.property.RefPropertyConverter.doConvert(RefPropertyConverter.java:30)
> at 
> io.servicecomb.swagger.converter.AbstractConverter.convert(AbstractConverter.java:42)
> at 
> io.servicecomb.swagger.converter.ConverterMgr.findJavaType(ConverterMgr.java:188)
> at 
> io.servicecomb.swagger.generator.core.utils.ClassUtils.createInterface(ClassUtils.java:252)
> at 
> io.servicecomb.swagger.generator.core.utils.ClassUtils.getOrCreateInterface(ClassUtils.java:237)
> at io.servicecomb.core.definition.SchemaMeta.(SchemaMeta.java:65)
> at 
> io.servicecomb.core.definition.loader.SchemaLoader.registerSchema(SchemaLoader.java:92)
> at 
> io.servicecomb.core.definition.schema.ConsumerSchemaFactory.createSchema(ConsumerSchemaFactory.java:132)
> at 
> io.servicecomb.core.definition.schema.ConsumerSchemaFactory.createSchema(ConsumerSchemaFactory.java:33)
> at 
> io.servicecomb.core.definition.schema.AbstractSchemaFactory.getOrCreateSchema(AbstractSchemaFactory.java:59)
> at 
> io.servicecomb.core.definition.schema.ConsumerSchemaFactory.getOrCreateConsumerSchema(ConsumerSchemaFactory.java:122)
> at 
> io.servicecomb.core.definition.schema.ConsumerSchemaFactory.getOrCreateMicroserviceMeta(ConsumerSchemaFactory.java:78)
> at 
> io.servicecomb.core.provider.consumer.ReferenceConfig.(ReferenceConfig.java:35)
> at 
> io.servicecomb.core.provider.consumer.ConsumerProviderManager.getReferenceConfig(ConsumerProviderManager.java:82)
> at 
> io.servicecomb.core.provider.consumer.ReferenceConfigUtils.getForInvoke(ReferenceConfigUtils.java:42)
> at io.servicecomb.provider.pojo.Invoker.prepare(Invoker.java:59)
> at io.servicecomb.provider.pojo.Invoker.invoke(Invoker.java:81)
> at com.sun.proxy.$Proxy17.selectByPrimaryKey(Unknown Source)
> at com.ceewa.cloud.consumer.DubboxConsumer.testMycat(DubboxConsumer.java:49)
> at com.ceewa.cloud.consumer.DubboxConsumer.main(DubboxConsumer.java:38)
> {code}
> Problem is fixed after adding {code}@apioperation(value = "getInstance is not 
> an endpoint", hidden = true){code} tag for method getInstance, is there any 
> good suggestions for that question?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to