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

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

wujimin commented on a change in pull request #925: [SCB-74] POJO static method 
is export as an operation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/925#discussion_r220764883
 
 

 ##########
 File path: 
integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/ConsumerMain.java
 ##########
 @@ -116,6 +117,7 @@ private static void testStandalone() throws Throwable {
     ITJUnitUtils.runWithHighwayAndRest(TestChangeTransport.class);
     ITJUnitUtils.runWithHighwayAndRest(TestDataTypePrimitive.class);
     ITJUnitUtils.runWithHighwayAndRest(TestAnnotatedAttribute.class);
+    ITJUnitUtils.runWithHighwayAndRest(TestIgnoreStaticMethod.class);
 
 Review comment:
   too complex, just check meta content is enough, eg: 
org.apache.servicecomb.it.testcase.TestApiParam

----------------------------------------------------------------
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:
us...@infra.apache.org


> 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