首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OCR Google在Azure上不起作用

OCR Google在Azure上不起作用
EN

Stack Overflow用户
提问于 2019-11-22 20:49:44
回答 1查看 126关注 0票数 0

我有一个用java编写的应用程序,它是我在eclipse上用Windows1064位开发的。这个应用程序使用google ocr,在本地运行良好。两台机器都是64位的。但是,当我在调用OCR方法时将应用程序上传到您的webapp中的azure时,发生了以下错误:(让我们看看是否有人可以帮助我)

代码语言:javascript
复制
INFO: netty-tcnative unavailable (this may be normal)
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_windows_x86_32, netty_tcnative_x86_32, netty_tcnative]
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:104)
    at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:568)
at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:133)
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:244)
    at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:171)
    at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:120)
    at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:406)
    at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:507)
    at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:276)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:193)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:185)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:155)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.google.cloud.vision.v1.stub.GrpcImageAnnotatorStub.create(GrpcImageAnnotatorStub.java:117)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings.createStub(ImageAnnotatorStubSettings.java:152)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.google.cloud.vision.v1.ImageAnnotatorClient.<init>(ImageAnnotatorClient.java:136)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.google.cloud.vision.v1.ImageAnnotatorClient.create(ImageAnnotatorClient.java:117)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.google.cloud.vision.v1.ImageAnnotatorClient.create(ImageAnnotatorClient.java:108)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.itenders.OCR.GoogleOCR.detectDocumentText(GoogleOCR.java:150)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.itenders.OCR.GoogleOCR.doOCR(GoogleOCR.java:93)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.itenderspro.crawling.CrawlerContratacionEstado.download(CrawlerContratacionEstado.java:1241)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.itenderspro.crawling.CrawlerContratacionEstado.descargaDocumentos(CrawlerContratacionEstado.java:963)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.itenderspro.crawling.CrawlerContratacionEstado.access$5(CrawlerContratacionEstado.java:954)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at com.itenderspro.crawling.CrawlerContratacionEstado$3.run(CrawlerContratacionEstado.java:650)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at java.lang.Thread.run(Thread.java:748)
[11/22/2019 03:33:23 > ef16f2: ERR ]    Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: io_grpc_netty_shaded_netty_tcnative_windows_x86_32
[11/22/2019 03:33:23 > ef16f2: ERR ]        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:224)
[11/22/2019 03:33:23 > ef16f2: ERR ]        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96)
[11/22/2019 03:33:23 > ef16f2: ERR ]        ... 23 more
[11/22/2019 03:33:23 > ef16f2: ERR ]    Caused by: java.io.FileNotFoundException: META-INF/native/io_grpc_netty_shaded_netty_tcnative_windows_x86_32.dll
[11/22/2019 03:33:23 > ef16f2: ERR ]        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:173)
[11/22/2019 03:33:23 > ef16f2: ERR ]        ... 24 more
[11/22/2019 03:33:23 > ef16f2: ERR ]        Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_windows_x86_32 in java.library.path
[11/22/2019 03:33:23 > ef16f2: ERR ]            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at java.lang.Runtime.loadLibrary0(Runtime.java:870)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at java.lang.System.loadLibrary(System.java:1122)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
[11/22/2019 03:33:23 > ef16f2: ERR ]            ... 24 more
[11/22/2019 03:33:23 > ef16f2: ERR ]            Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_windows_x86_32 in java.library.path
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.Runtime.loadLibrary0(Runtime.java:870)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.System.loadLibrary(System.java:1122)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.reflect.Method.invoke(Method.java:498)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.security.AccessController.doPrivileged(Native Method)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
[11/22/2019 03:33:23 > ef16f2: ERR ]                ... 25 more
[11/22/2019 03:33:23 > ef16f2: ERR ]    Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: io_grpc_netty_shaded_netty_tcnative_x86_32
[11/22/2019 03:33:23 > ef16f2: ERR ]        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:224)
[11/22/2019 03:33:23 > ef16f2: ERR ]        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96)
[11/22/2019 03:33:23 > ef16f2: ERR ]        ... 23 more
[11/22/2019 03:33:23 > ef16f2: ERR ]    Caused by: java.io.FileNotFoundException: META-INF/native/io_grpc_netty_shaded_netty_tcnative_x86_32.dll
[11/22/2019 03:33:23 > ef16f2: ERR ]        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:173)
[11/22/2019 03:33:23 > ef16f2: ERR ]        ... 24 more
[11/22/2019 03:33:23 > ef16f2: ERR ]        Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_x86_32 in java.library.path
[11/22/2019 03:33:23 > ef16f2: ERR ]            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at java.lang.Runtime.loadLibrary0(Runtime.java:870)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at java.lang.System.loadLibrary(System.java:1122)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
[11/22/2019 03:33:23 > ef16f2: ERR ]            ... 24 more
[11/22/2019 03:33:23 > ef16f2: ERR ]            Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_x86_32 in java.library.path
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.Runtime.loadLibrary0(Runtime.java:870)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.System.loadLibrary(System.java:1122)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.reflect.Method.invoke(Method.java:498)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.security.AccessController.doPrivileged(Native Method)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
[11/22/2019 03:33:23 > ef16f2: ERR ]                ... 25 more
[11/22/2019 03:33:23 > ef16f2: ERR ]    Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: io_grpc_netty_shaded_netty_tcnative
[11/22/2019 03:33:23 > ef16f2: ERR ]        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:224)
[11/22/2019 03:33:23 > ef16f2: ERR ]        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96)
[11/22/2019 03:33:23 > ef16f2: ERR ]        ... 23 more
[11/22/2019 03:33:23 > ef16f2: ERR ]    Caused by: java.io.FileNotFoundException: META-INF/native/io_grpc_netty_shaded_netty_tcnative.dll
[11/22/2019 03:33:23 > ef16f2: ERR ]        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:173)
[11/22/2019 03:33:23 > ef16f2: ERR ]        ... 24 more
[11/22/2019 03:33:23 > ef16f2: ERR ]        Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative in java.library.path
[11/22/2019 03:33:23 > ef16f2: ERR ]            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at java.lang.Runtime.loadLibrary0(Runtime.java:870)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at java.lang.System.loadLibrary(System.java:1122)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349)
[11/22/2019 03:33:23 > ef16f2: ERR ]            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
[11/22/2019 03:33:23 > ef16f2: ERR ]            ... 24 more
[11/22/2019 03:33:23 > ef16f2: ERR ]            Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative in java.library.path
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.Runtime.loadLibrary0(Runtime.java:870)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.System.loadLibrary(System.java:1122)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.lang.reflect.Method.invoke(Method.java:498)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at java.security.AccessController.doPrivileged(Native Method)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
[11/22/2019 03:33:23 > ef16f2: ERR ]                at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
[11/22/2019 03:33:23 > ef16f2: ERR ]                ... 25 more
[11/22/2019 03:33:23 > ef16f2: ERR ] 
[11/22/2019 03:33:23 > ef16f2: ERR ] Nov 22, 2019 3:33:23 AM io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts defaultSslProvider
[11/22/2019 03:33:23 > ef16f2: ERR ] INFO: Conscrypt not found (this may be normal)
[11/22/2019 03:33:23 > ef16f2: ERR ] Nov 22, 2019 3:33:23 AM io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts defaultSslProvider
[11/22/2019 03:33:23 > ef16f2: ERR ] INFO: Jetty ALPN unavailable (this may be normal)
[11/22/2019 03:33:23 > ef16f2: ERR ] java.lang.ClassNotFoundException: org/eclipse/jetty/alpn/ALPN
[11/22/2019 03:33:23 > ef16f2: ERR ]    at java.lang.Class.forName0(Native Method)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at java.lang.Class.forName(Class.java:348)
[11/22/2019 03:33:23 > ef16f2: ERR ]    at io.grpc.netty.shaded.io.grpc.netty.JettyTlsUtil.isJettyAlpnConfigured(JettyTlsUtil.java:64)
EN

回答 1

Stack Overflow用户

发布于 2019-12-04 18:02:25

这是一个神奇的指令:

Security.insertProviderAt(Conscrypt.newProvider(),0);

在调用读取方法之前,请明显地在main中的任意位置插入。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58994646

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档