Ajouter un certificat dans glassfish

Fermé
freddo - 26 févr. 2015 à 12:20
 freddo - 26 févr. 2015 à 14:54
Bonjour a tous,

Actuellement je travaille sur un projet en java (de type java application) qui fait une requête https vers le serveur d'un tiers et pour ce fait j'ai du installé le certificat de ce tiers sur mon serveur dans la JVM pour que la requête puisse être executer et cela fonctionne parfaitement.
Le problème se pose quand il faut créer une application (de type java web) qui est déployé dans Glassfish. A ce moment la requête https vers le serveur du tiers n'est pas exécuté et j'ai une erreur de type

org.apache.axis2.AxisFault: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: unknown_ca
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:78)
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at _0.zm_v1.mtn.mobilemoney.b2b.UMMServiceServiceStub.requestPayment(UMMServiceServiceStub.java:188)
at play.RequestPayment.sendRequestPayment(RequestPayment.java:325)
at play.RequestPayment.requestP(RequestPayment.java:402)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.el.ELUtil.invokeMethod(ELUtil.java:332)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:537)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
at com.sun.el.parser.AstValue.invoke(AstValue.java:283)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:147)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:813)
at javax.faces.component.UICommand.broadcast(UICommand.java:300)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)


Pourtant j'ai eu a ajouter le certificat du tiers dans le cacerts.jks de Glassfish

Quelqu'un pourrait-il avoir une solution a mon problème?

Merci d'avance
A voir également:

1 réponse

KX Messages postés 16733 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 31 janvier 2024 3 015
26 févr. 2015 à 13:03
Bonjour,

"ajouter le certificat du tiers dans le cacerts.jks de Glassfish"
N'est-ce pas au niveau de la JRE qu'il faudrait changer le certificat plutôt ?

C:\...\jre\bin> keytool -list -keystore ..\lib\security\cacerts
Tapez le mot de passe du Keystore : changeit
0
cela a deja été fait! et en mode java application ca fonctionne correctement, mais quand je passe en web application et que je lance mon application a partir de glassfish ca ne fonctionne plus...
0