• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Having HTTP 405 issues with RPC call

 
Arian Karbasi
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to the forums, so first I'd like to say hi to everyone!

Now, on with my problem. I'm using a Hessian service to call a resource sitting on another tomcat server somewhere. My webapp (which is also running in tomcat) is trying to call a service from another tomcat server. I have made the servlet on the other server and I know for a fact this works since other people have been able to make remote calls to the tomcat server. I make the proxy fine and it finds the server but the second I make a function call I get this:

HTTP Status 500 - java.lang.reflect.UndeclaredThrowableException org.apache.solr.common.SolrException: java.lang.reflect.UndeclaredThrowableException at org.apache.solr.handler.component.ext.Component.prepare(Component.java:69) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:210) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1290) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:353) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:248) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.reflect.UndeclaredThrowableException at $Proxy0.modelNeighborhood(Unknown Source) at org.apache.solr.handler.component.ext.TaggedNetconComponent.prepare(Component.java:65) ... 17 more Caused by: java.lang.Exception: Unable to invoke method on proxy object at URL http://myServer.com:8080/servlet at com.tagged.hessian.client.proxy.UrlProxy.invoke(UrlProxy.java:71) at com.tagged.hessian.client.proxy.NameMangler.invoke(NameMangler.java:77) at com.tagged.hessian.client.proxy.AbstractProxy.invoke(AbstractProxy.java:27) ... 19 more Caused by: java.io.IOException: Server returned HTTP response code: 405 for URL: http://myServer.com:8080/servlet/ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313) at com.tagged.hessian.client.proxy.urlconnection.HttpURLHandler.getInputStream(HttpURLHandler.java:56) at com.tagged.hessian.client.proxy.urlconnection.HttpURLHandler.invoke(HttpURLHandler.java:51) at com.tagged.hessian.client.proxy.UrlProxy.invoke(UrlProxy.java:65) ... 21 more

So the server isn't accepting the method it looks like. I've banged my head so much over this and I have no idea whats wrong but I think it might just be my tomcat config. Anyone have any ideas at all? Help is much appreciated!
 
Arian Karbasi
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I did a tcpdump on the server and it looks like its getting a POST request from my local which is correct (as Hessian accepts only POST) but then a few packets later I see a GET from my local calling out to the servlet...I've been banging my head over this...no idea why I'm making a GET as well as a POST.
 
Arian Karbasi
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for triple post but I did a tcpdump on my vm and it looks the server is sending an http 302 moved temporarily after the first POST, and then of course it throws the 405 when the GET happens...any ideas what moved temporarily means?
 
Arian Karbasi
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Last post I promise, so I fixed the issue. It was basically the fact that I was calling out my service as follows: http://myServer.com:8080/servlet when it should have been like this: http://myServer.com:8080/servlet/

One slash was the cause of all of these problems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic