• hrift does not support polymorphic data types


    hrift does not support polymorphic data types

    Exception in thread "main" com.facebook.swift.codec.metadata.MetadataErrorException: Error: Metadata extraction encountered 1 errors and 0 warnings
    	at com.facebook.swift.codec.metadata.MetadataErrors.throwIfHasErrors(MetadataErrors.java:73)
    	at com.facebook.swift.codec.metadata.ThriftStructMetadataBuilder.build(ThriftStructMetadataBuilder.java:99)
    	at com.facebook.swift.codec.metadata.ThriftCatalog.extractThriftStructMetadata(ThriftCatalog.java:502)
    	at com.facebook.swift.codec.metadata.ThriftCatalog.getThriftStructMetadata(ThriftCatalog.java:367)
    	at com.facebook.swift.codec.metadata.ThriftCatalog.getThriftType(ThriftCatalog.java:259)
    	at com.facebook.swift.service.metadata.ThriftMethodMetadata.<init>(ThriftMethodMetadata.java:124)
    	at com.facebook.swift.service.metadata.ThriftServiceMetadata.<init>(ThriftServiceMetadata.java:73)
    	at com.facebook.swift.service.ThriftServiceProcessor.<init>(ThriftServiceProcessor.java:79)
    	at com.facebook.swift.service.ThriftServiceProcessor.<init>(ThriftServiceProcessor.java:68)
    	at com.stono.thrift.annotation.server.ServerMain.main(ServerMain.java:15)
    	Suppressed: com.facebook.swift.codec.metadata.MetadataErrorException: Error: ThriftStruct class 'com.stono.thrift.annotation.server.User' is not final (thrift does not support polymorphic data types)
    		at com.facebook.swift.codec.metadata.MetadataErrors.addError(MetadataErrors.java:95)
    		at com.facebook.swift.codec.metadata.AbstractThriftMetadataBuilder.verifyClass(AbstractThriftMetadataBuilder.java:181)
    		at com.facebook.swift.codec.metadata.ThriftStructMetadataBuilder.<init>(ThriftStructMetadataBuilder.java:45)
    		at com.facebook.swift.codec.metadata.ThriftCatalog.extractThriftStructMetadata(ThriftCatalog.java:501)
    		... 7 more

    如果出现这样的错误,是没有在类上面添加final修饰;

  • 相关阅读:
    NSURL 的简单实用
    动画demo
    UIScrollView的简单页面
    关于UITableview(更新)
    添加手势
    多线程
    IOS 瀑布流
    高低字节序转换(htonl、ntohl、htons、ntohs函数)
    Xcode个版本
    网址
  • 原文地址:https://www.cnblogs.com/stono/p/8278339.html
Copyright © 2020-2023  润新知