OCR Google不适用于Azure

问题描述 投票:0回答:1

我有一个用Java开发的应用程序,该应用程序是在Windows 10 64位上的Eclipse上开发的。此应用程序使用google ocr,并且在本地运行良好。两台机器均为64位。但是,当我在调用OCR方法时将应用程序上载到Webapp中的azure时,会发生以下错误:(让我们看看是否有人可以帮助我)

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)
azure ocr vision
1个回答
0
投票

这是神奇的说明:

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

显然在调用阅读方法之前,先在您主体的任何位置插入。

© www.soinside.com 2019 - 2024. All rights reserved.