1

We are trying to use OpenScript to generate load test for OATS. The script will call org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter for authentication. We are getting following error in the script:

10:22:56,860 ERROR [1] Error in section Unspecified at line unknown. 
       ScriptException occured. 
       An unexpected exception occurred in the script. 
       Script section: Unspecified.

java.lang.NoSuchFieldError: id_ecPublicKey
    at org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter.<clinit>(Unknown Source)
    at com.oracle.bmc.http.signing.internal.PEMFileRSAPrivateKeySupplier.<init>(PEMFileRSAPrivateKeySupplier.java:46)
    at com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory.createKeySupplier(DefaultRequestSignerFactory.java:108)
    at com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory.createRequestSigner(DefaultRequestSignerFactory.java:51)
    at com.oracle.bmc.objectstorage.ObjectStorageClient.<init>(ObjectStorageClient.java:98)
    at com.oracle.bmc.objectstorage.ObjectStorageClient.<init>(ObjectStorageClient.java:73)
    at com.oracle.bmc.objectstorage.ObjectStorageClient.<init>(ObjectStorageClient.java:59)
    at com.oracle.bmc.objectstorage.ObjectStorageClient.<init>(ObjectStorageClient.java:48)
    at script.run(script.java:38)
    at oracle.oats.scripting.modules.basic.api.IteratingVUser.run(IteratingVUser.java:353)
    at oracle.oats.scripting.modules.basic.api.internal.IteratingAgent.run(IteratingAgent.java:801)
    at java.lang.Thread.run(Thread.java:745)

Has anyone seen same kind of issue before?

This error only happens when the project is created as script. If we created the project as generic Java project it works fine. Our guess is when using script there are some lib mismatch which caused it to use id_ecPublicKey.

Thanks.

4

1 回答 1

0

我也有这个错误。它来自一个 jar 文件冲突。

当我排除一些与“org.bouncycastle”相关的依赖项时,比如下面的 Maven 代码,错误就会消失。

    <dependency>
        <groupId>com.googlecode.rapid-framework</groupId>
        <artifactId>rapid-core</artifactId>
        <version>4.0.5</version>
        <exclusions>
            <exclusion>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcpkix-jdk15on</artifactId>
        <version>1.52</version>
    </dependency>
    <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>1.52</version>
    </dependency>
    <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.10</version>
    </dependency>
于 2017-08-18T03:47:59.720 回答