如何解决此服务器异常

时间:2017-11-10 14:07:52

标签: web-services bouncycastle spring-ws spring-scheduled dynamic-reports

我使用春季时间表在晚上做一些完整的治疗,它应该调用soap webServices,而不是别的。

该程序适用于我的local server,但不适用于PROD

调度程序:

@Configuration
@EnableScheduling
public class ActivationScheduler {

    private static final Logger LOGGER = LoggerFactory.getLogger(ActivationScheduler.class);

    @Autowired
    private ActivationService activationService;

    /**
     * un cron qui se lance automatiquement tous les soirs à  04h:00
     */
    @Scheduled(cron = "0 20 11 * * *")
    public void execute() {
        try {
            activationService.relanceAll();

        } catch (Exception e) {
            LOGGER.error(Constants.EXCEPTION_LABEL, e);
        }
    }
}

例外:

2017-11-10 11:20:00 ERROR TaskUtils$LoggingErrorHandler:95 - Unexpected error occurred in scheduled task.
java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/JCEBlockCipher$AEADGenericBlockCipher
    at org.bouncycastle.jce.provider.JCEBlockCipher.engineSetMode(Unknown Source)
    at javax.crypto.Cipher$Transform.setModePadding(Cipher.java:374)
    at javax.crypto.Cipher.getInstance(Cipher.java:533)
    at sun.security.ssl.JsseJce.getCipher(JsseJce.java:229)
    at sun.security.ssl.CipherBox.<init>(CipherBox.java:179)
    at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:263)
    at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:505)
    at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:572)
    at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:527)
    at sun.security.ssl.CipherSuite.isAvailable(CipherSuite.java:194)
    at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:346)
    at sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:304)
    at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:626)
    at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:537)
    at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:72)
    at sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:405)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:162)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
    at org.springframework.ws.transport.http.HttpUrlConnection.getRequestOutputStream(HttpUrlConnection.java:89)
    at org.springframework.ws.transport.AbstractSenderConnection$RequestTransportOutputStream.createOutputStream(AbstractSenderConnection.java:87)
    at org.springframework.ws.transport.TransportOutputStream.getOutputStream(TransportOutputStream.java:41)
    at org.springframework.ws.transport.TransportOutputStream.write(TransportOutputStream.java:64)
    at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.writeTo(MessageImpl.java:1314)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.writeTo(SaajSoapMessage.java:275)
    at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:46)
    at org.springframework.ws.client.core.WebServiceTemplate.sendRequest(WebServiceTemplate.java:658)
    at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:606)
    at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:555)
    at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:390)
    at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:383)
    at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:373)

我用Google搜索了异常,所以我发现了一些人在谈论bouncycastle,我添加了最后一个版本,但它确实解决了我的问题而且我有同样的例外。

我在项目中也使用了dynamicreports 5.0.0,我排除了bouncycastle(bcprov-jdk14,bcmail-jdk14,bctsp-jdk14)

最后一个可能有用的信息,被调用的ws具有SSL安全性。

谢谢,

0 个答案:

没有答案