Announcement Announcement Module
Collapse
No announcement yet.
Spring RestTemplate error : .... I/O error: handshake alert: unrecognizaed_name Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring RestTemplate error : .... I/O error: handshake alert: unrecognizaed_name

    I am using Spring's RestTemplate for make web service calls in my app. It worked until I duplicated the code to a new server/project with a seemingly identical environment (jboss EAP6.1 with its own configurations) and definitely identical app code and configuration files (applicationContext.xml, web.xml etc). While the app is still working on the old server, it produced the following error when a ResTemplate.getForObject() is called on the new one:
    Code:
    org.springframework.web.client.ResourceAccessException: I/O error: handshake alert:  unrecognized_name; nested exception is javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
    	org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:453)
    	org.springframework.web.client.RestTemplate.execute(RestTemplate.java:409)
    	org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:206)
    	org.SandRiver.WebGateway.WebGatewayImpl.login(WebGatewayImpl.java:383)
    	org.SandRiver.Controllers.mvcController.login(mvcController.java:75)
    	org.SandRiver.Controllers.mvcController.homeLogin(mvcController.java:68)
    	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	java.lang.reflect.Method.invoke(Unknown Source)
    	org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
    	org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
    	org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
    	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
    	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
    	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
    	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    A few notes:
    1. The web service can be either through https or http. The trouble mentioned above is when https is called. http is fine.
    2. I googled for a solution. Some people suggested that the problem was caused by Java7, so I made sure JavaSE1.6 is used, the error persists.

    Since the same code works in one environment while fails in another, I suspect this is due to environment (configuration), but I have had no clue where to check. I am seeking advices/suggestions/tricks which lead to a resolution.

    Thanks in advance

    John Z
    Last edited by [email protected]; Jun 9th, 2013, 08:26 AM.

  • #2
    This topic isn't related to the SOAP. Please, ask it on Web forum

    Comment

    Working...
    X