- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试使用 eclipse IDE 使用 azure 服务总线客户端的示例执行示例异步 mq 调用。但是我收到以下错误。
Exception in thread "main" java.lang.SecurityException: class "com.azure.messaging.servicebus.ServiceBusClientBuilder"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:898)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668)
at java.lang.ClassLoader.defineClass(ClassLoader.java:761)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.azure.messaging.servicebus.SendMessageAsyncSample.run(SendMessageAsyncSample.java:51)
at com.azure.messaging.servicebus.SendMessageAsyncSample.main(SendMessageAsyncSample.java:27)
这是我从 Microsoft 网站上获取的 java 类。 https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/servicebus/azure-messaging-servicebus/src/samples/java/com/azure/messaging/servicebus/SendMessageAsyncSample.java
package com.azure.messaging.servicebus;
import com.azure.core.util.BinaryData;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.IntStream;
/**
* Sample demonstrates how to send a {@link ServiceBusMessage} to an Azure Service Bus
queue.
*/
public class SendMessageAsyncSample {
static String connectionString = "test";
static String queueName = "uat.recq";
/**
* Main method to invoke this demo on how to send a {@link ServiceBusMessageBatch} to an Azure Service Bus.
*
* @param args Unused arguments to the program.
* @throws InterruptedException If the program is unable to sleep while waiting for the operations to complete.
*/
public static void main(String[] args) throws InterruptedException {
SendMessageAsyncSample sample = new SendMessageAsyncSample();
sample.run();
}
public void run() throws InterruptedException {
AtomicBoolean sampleSuccessful = new AtomicBoolean(false);
CountDownLatch countdownLatch = new CountDownLatch(1);
// The connection string value can be obtained by:
// 1. Going to your Service Bus namespace in Azure Portal.
// 2. Go to "Shared access policies"
// 3. Copy the connection string for the "RootManageSharedAccessKey" policy.
// The 'connectionString' format is shown below.
// 1. "Endpoint={fully-qualified-namespace};SharedAccessKeyName={policy-name};SharedAccessKey={key}"
// 2. "<<fully-qualified-namespace>>" will look similar to "{your-namespace}.servicebus.windows.net"
// 3. "queueName" will be the name of the Service Bus queue instance you created
// inside the Service Bus namespace.
// Instantiate a client that will be used to call the service.
ServiceBusSenderClient sender = new ServiceBusClientBuilder()
.connectionString(connectionString)
.sender()
.queueName(queueName)
.buildClient();
// Create a message to send.
final ServiceBusMessageBatch messageBatch = sender.createMessageBatch();
IntStream.range(0, 10)
.mapToObj(index -> new ServiceBusMessage(BinaryData.fromString("Hello world! " + index)))
.forEach(message -> messageBatch.tryAddMessage(message));
// Send that message. It completes successfully when the event has been delivered to the Service queue or topic.
// It completes with an error if an exception occurred while sending the message.
sender.sendMessages(messageBatch);
// Close the sender.
sender.close();
}
}
这是我的 pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>Azure</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-servicebus</artifactId>
<version>7.13.4</version>
</dependency>
</dependencies>
</project>
我尝试删除 MANIFEST.MF 文件中的所有名称和签名
Name: com/azure/messaging/servicebus/implementation/Messages.java
SHA-256-Digest: r2j4hEvfoypLiEsKreoUQD94jZyJaz0yByg1u1w7CTo=
但是我在运行该类时遇到以下错误。
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest
for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:330)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:263)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:318)
at java.util.jar.JarVerifier.update(JarVerifier.java:230)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
at java.util.jar.JarFile.getInputStream(JarFile.java:450)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:977)
at sun.misc.Resource.cachedInputStream(Resource.java:77)
at sun.misc.Resource.getByteBuffer(Resource.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:454)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.azure.messaging.servicebus.SendMessageAsyncSample.run(SendMessageAsyncSample.java:48)
at com.azure.messaging.servicebus.SendMessageAsyncSample.main(SendMessageAsyncSample.java:27)
我尝试运行 mvn dependency:tree 但没有明显的冲突。
[WARNING] Parameter 'localRepository' is deprecated core expression; Avoid use of
ArtifactRepository type. If you need access to local repository, switch to '
${repositorySystemSession}' expression and get LRM from it instead.
[INFO] com.example:Azure:jar:1.0.0
[INFO] \- com.azure:azure-messaging-servicebus:jar:7.13.4:compile
[INFO] +- com.azure:azure-core:jar:1.38.0:compile
[INFO] | +- com.azure:azure-json:jar:1.0.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.13.5:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.13.5:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.13.5:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.13.5:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO] | \- io.projectreactor:reactor-core:jar:3.4.27:compile
[INFO] | \- org.reactivestreams:reactive-streams:jar:1.0.4:compile
[INFO] +- com.azure:azure-core-amqp:jar:2.8.4:compile
[INFO] | +- com.microsoft.azure:qpid-proton-j-extensions:jar:1.2.4:compile
[INFO] | \- org.apache.qpid:proton-j:jar:0.33.8:compile
[INFO] +- com.azure:azure-core-http-netty:jar:1.13.2:compile
[INFO] | +- io.netty:netty-handler:jar:4.1.89.Final:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.89.Final:compile
[INFO] | | +- io.netty:netty-resolver:jar:4.1.89.Final:compile
[INFO] | | \- io.netty:netty-transport:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-handler-proxy:jar:4.1.89.Final:compile
[INFO] | | \- io.netty:netty-codec-socks:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-buffer:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-codec:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-codec-http:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-codec-http2:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-transport-native-unix-common:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.89.Final:compile
[INFO] | | \- io.netty:netty-transport-classes-epoll:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-transport-native-kqueue:jar:osx-x86_64:4.1.89.Final:compile
[INFO] | | \- io.netty:netty-transport-classes-kqueue:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-tcnative-boringssl-static:jar:2.0.56.Final:compile
[INFO] | | +- io.netty:netty-tcnative-classes:jar:2.0.56.Final:compile
[INFO] | | +- io.netty:netty-tcnative-boringssl-static:jar:linux-x86_64:2.0.56.Final:compile
[INFO] | | +- io.netty:netty-tcnative-boringssl-static:jar:linux-aarch_64:2.0.56.Final:compile
[INFO] | | +- io.netty:netty-tcnative-boringssl-static:jar:osx-x86_64:2.0.56.Final:compile
[INFO] | | +- io.netty:netty-tcnative-boringssl-static:jar:osx-aarch_64:2.0.56.Final:compile
[INFO] | | \- io.netty:netty-tcnative-boringssl-static:jar:windows-x86_64:2.0.56.Final:compile
[INFO] | \- io.projectreactor.netty:reactor-netty-http:jar:1.0.28:compile
[INFO] | +- io.netty:netty-resolver-dns:jar:4.1.89.Final:compile
[INFO] | | \- io.netty:netty-codec-dns:jar:4.1.89.Final:compile
[INFO] | +- io.netty:netty-resolver-dns-native-macos:jar:osx-x86_64:4.1.89.Final:compile
[INFO] | | \- io.netty:netty-resolver-dns-classes-macos:jar:4.1.89.Final:compile
[INFO] | \- io.projectreactor.netty:reactor-netty-core:jar:1.0.28:compile
[INFO] \- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.13.5:compile
[INFO] +- org.codehaus.woodstox:stax2-api:jar:4.2.1:compile
[INFO] \- com.fasterxml.woodstox:woodstox-core:jar:6.4.0:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
以下是我在 JRE 库和 Maven 依赖项中的 jar 文件
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\access-bridge-64.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\charsets.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\cldrdata.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\dnsns.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\jaccess.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\jce.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\jfr.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\jfxrt.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\jsse.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\localedata.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\nashorn.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\resources.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\rt.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunec.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunjce_provider.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunmscapi.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunpkcs11.jar
C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\zipfs.jar
C:\Users\test.co\.m2\repository\com\azure\azure-core\1.38.0\azure-core-1.38.0.jar
C:\Users\test.co\.m2\repository\com\azure\azure-core-amqp\2.8.4\azure-core-amqp-2.8.4.jar
C:\Users\test.co\.m2\repository\com\azure\azure-core-http-netty\1.13.2\azure-core-http-netty-1.13.2.jar
C:\Users\test.co\.m2\repository\com\azure\azure-json\1.0.0\azure-json-1.0.0.jar
C:\Users\test.co\.m2\repository\com\azure\azure-messaging-servicebus\7.13.4\azure-messaging-servicebus-7.13.4.jar
C:\Users\test.co\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.13.5\jackson-annotations-2.13.5.jar
C:\Users\test.co\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.13.5\jackson-core-2.13.5.jar
C:\Users\test.co\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.13.5\jackson-databind-2.13.5.jar
C:\Users\test.co\.m2\repository\com\fasterxml\jackson\dataformat\jackson-dataformat-xml\2.13.5\jackson-dataformat-xml-2.13.5.jar
C:\Users\test.co\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.5\jackson-datatype-jsr310-2.13.5.jar
C:\Users\test.co\.m2\repository\io\netty\netty-buffer\4.1.89.Final\netty-buffer-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-codec\4.1.89.Final\netty-codec-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-codec-dns\4.1.89.Final\netty-codec-dns-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-codec-http2\4.1.89.Final\netty-codec-http2-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-codec-http\4.1.89.Final\netty-codec-http-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-codec-socks\4.1.89.Final\netty-codec-socks-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-common\4.1.89.Final\netty-common-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-handler\4.1.89.Final\netty-handler-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-handler-proxy\4.1.89.Final\netty-handler-proxy-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-resolver\4.1.89.Final\netty-resolver-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-resolver-dns\4.1.89.Final\netty-resolver-dns-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-resolver-dns-classes-macos\4.1.89.Final\netty-resolver-dns-classes-macos-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-resolver-dns-native-macos\4.1.89.Final\netty-resolver-dns-native-macos-4.1.89.Final-osx-x86_64.jar
C:\Users\test.co\.m2\repository\io\netty\netty-tcnative-boringssl-static\2.0.56.Final\netty-tcnative-boringssl-static-2.0.56.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-tcnative-boringssl-static\2.0.56.Final\netty-tcnative-boringssl-static-2.0.56.Final-linux-aarch_64.jar
C:\Users\test.co\.m2\repository\io\netty\netty-tcnative-boringssl-static\2.0.56.Final\netty-tcnative-boringssl-static-2.0.56.Final-linux-x86_64.jar
C:\Users\test.co\.m2\repository\io\netty\netty-tcnative-boringssl-static\2.0.56.Final\netty-tcnative-boringssl-static-2.0.56.Final-osx-aarch_64.jar
C:\Users\test.co\.m2\repository\io\netty\netty-tcnative-boringssl-static\2.0.56.Final\netty-tcnative-boringssl-static-2.0.56.Final-osx-x86_64.jar
C:\Users\test.co\.m2\repository\io\netty\netty-tcnative-boringssl-static\2.0.56.Final\netty-tcnative-boringssl-static-2.0.56.Final-windows-x86_64.jar
C:\Users\test.co\.m2\repository\io\netty\netty-tcnative-classes\2.0.56.Final\netty-tcnative-classes-2.0.56.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-transport\4.1.89.Final\netty-transport-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-transport-classes-epoll\4.1.89.Final\netty-transport-classes-epoll-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-transport-classes-kqueue\4.1.89.Final\netty-transport-classes-kqueue-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\io\netty\netty-transport-native-epoll\4.1.89.Final\netty-transport-native-epoll-4.1.89.Final-linux-x86_64.jar
C:\Users\test.co\.m2\repository\io\netty\netty-transport-native-kqueue\4.1.89.Final\netty-transport-native-kqueue-4.1.89.Final-osx-x86_64.jar
C:\Users\test.co\.m2\repository\io\netty\netty-transport-native-unix-common\4.1.89.Final\netty-transport-native-unix-common-4.1.89.Final.jar
C:\Users\test.co\.m2\repository\org\apache\qpid\proton-j\0.33.8\proton-j-0.33.8.jar
C:\Users\test.co\.m2\repository\com\microsoft\azure\qpid-proton-j-extensions\1.2.4\qpid-proton-j-extensions-1.2.4.jar
C:\Users\test.co\.m2\repository\org\reactivestreams\reactive-streams\1.0.4\reactive-streams-1.0.4.jar
C:\Users\test.co\.m2\repository\io\projectreactor\reactor-core\3.4.27\reactor-core-3.4.27.jar
C:\Users\test.co\.m2\repository\io\projectreactor\netty\reactor-netty-core\1.0.28\reactor-netty-core-1.0.28.jar
C:\Users\test.co\.m2\repository\io\projectreactor\netty\reactor-netty-http\1.0.28\reactor-netty-http-1.0.28.jar
C:\Users\test.co\.m2\repository\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar
C:\Users\test.co\.m2\repository\org\codehaus\woodstox\stax2-api\4.2.1\stax2-api-4.2.1.jar
C:\Users\test.co\.m2\repository\com\fasterxml\woodstox\woodstox-core\6.4.0\woodstox-core-6.4.0.jar
当我尝试从 IBM MQ 切换到 Azure 服务总线客户端时,如何绕过此问题。
最佳答案
我认为签名冲突是由于示例使用命名空间名称“com.azure.messaging.servicebus”造成的,该名称与 Azure Service Bus Sdk 命名空间相同。您可以尝试更改示例(例如“com.example”)吗?
关于java - com.azure.messaging.servicebus.ServiceBusClientBuilder 安全异常 : signer information does not match,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76232850/
我们在 Java 应用程序中更新了安全证书,突然我们开始收到下面提到的异常: java.lang.SecurityException: class "org.hibernate.cfg.Configu
我有一个在浏览器中运行并从 Javascript 调用的小程序。有 2 个类:PortalLauncher 和 ParamSplitter,它们位于默认包中。 Javascript 调用 Portal
我在 eclipse 中使用 OSGi 项目运行 JUnit 测试,我遇到了这个异常: java.lang.SecurityException: class "org.eclipse.core.run
我正在开发一个给 PDF 加水印的小工具,它适用于某些 PDF,但对某些其他 PDF 会崩溃。 我正在使用 iText 库和 bouncycaSTLe(依赖项) pom.xml:
我花了 2 天时间试图解决这个问题,但找不到解决办法或至少找不到解决方案: Exception in thread "main" java.lang.SecurityException: class
如果黑客可以调用或调用某些程序功能,我如何在 Solana Anchor 中进行测试? 是通过更改 signers 数组中的第一个元素来实现的: await program.rpc.initializ
iPhone 连接到运行最新 iTunes 版本的 Mac,我 100% 确定她的 UDID 在配置文件中。她的iPhone没有越狱,我们甚至恢复了出厂设置。 我在这一台 iPhone 上安装我们的开
我使用 ant 为 web-start 部署签署我的 jars。Ant.signjar 在 web-start 签名时非常慢。如何加快签名过程? 最佳答案 我找到了一种可能的解决方案。 在构建脚本的早
我已经为 JAVA 创建了部署规则集。该文件是使用证书自签名的。为了使用此规则集,您需要将证书导入 JAVA > Security > Certificates > Signer CA。 如果我手动执
场景:我在 Windows Server 2012r2 上使用 PowerShell 生成根证书,并希望使用它在动态生成(和销毁)的开发/测试环境中签署新创建的中间证书和 Web 证书。这些脚本是远程
遇到一个让我抓狂的问题。在 AEM (6.0 SP3) 中实现 Amakai Edgegrid 身份验证,它会阻止我的主要服务包启动,因为它不是 OSGi 包。 与 this issue 中指出的问题
我在 Nginx 上设置 OCSP 装订并收到错误 OCSP_basic_verify() failed (SSL: error:27069076:OCSP routines:OCSP_basic_v
我正在使用 Laravel (ocotber CMS) 开发我的项目并使用 Spatie URL Signer包来保护我的文件与有限的生命链接。我将文件上传到被 .htaccess 文件列入黑名单的
今天我发现自己无法在我的计算机上恢复 NuGet 包。这样做会产生类似以下的错误: Myproject.csproj : error NU3034: Package 'SomePackage 1.2.
我需要使用 SignServer 代表客户端创建数字签名。我对两个问题有点困惑。 是否每个客户都需要唯一的证书,还是可以为所有客户使用一个证书? 我可以使用 SignServer 创建数字签名证书吗,
当我尝试使用 PKCS11 签名时抛出此异常。我尝试更改字母的大小写,认为这可能是问题所在,但事实并非如此。 最佳答案 此问题的真正原因与我的情况下的异常消息并不对应,然后我意识到这只是 PKCS11
我正在使用node-mysql2 库与 AWS.RDS.signer 结合使用. 我有以下函数,它创建一个连接池以重用连接: const createPool = () => new Promise(
我正在使用 Liberty 16.0.0.4,我想从 Facebook 帐户图像中获取图像,所以我运行了下一个命令以将 Facebook 证书添加到 Liberty 服务器 keytool -imp
我正在尝试实例化一个 X509Certificate 对象,但我一直遇到相同的 CryptographicException,并显示错误消息: "Cannot find the original si
我正在尝试使用 Lambda 生成并返回签名的 cookie,以便我的 iOS 应用程序可以使用该 cookie 通过 CloudFront 访问受限文件。 我认为这应该可以使用 Signer 类:h
我是一名优秀的程序员,十分优秀!