Solved

java error accessing IIS website on same server where Tomcat lives

Posted on 2007-03-29
3
280 Views
Last Modified: 2012-06-22
Tools: Tomcat with IIS
Problem: files within the Tomcat directory structure (xml or jsp) that call out to a url that is served from IIS on the same server where Tomcat is installed....are causing errors.
1. Tomcat is called to serve an xml file with the following doctype dec:
<!DOCTYPE narratives PUBLIC "-//mnhs/stories//DTD narratives//EN" "http://stories.mnhs.org/xxx/narrative.dtd ">
error in stdout.log: Error in SimpleTransform20: java.io.IOException: Server returned HTTP response code: 400 for URL: http://stories.mnhs.org/xxx/narrative.dtd
current workaround employed:
<!DOCTYPE narratives PUBLIC "-//mnhs/stories//DTD narratives//EN" "d:\xxxx\stories\xxx\narrative.dtd">

2. When i call Search.jsp, which issues a cgi search with:
<c:import url="http://stories.mnhs.org/cgi-search/mgg/search.cgi?zoom_query=${requestScope.zoom_query}&zoom_cat=${requestScope.zoom_cat}&zoom_per_page=200&zoom_and=${requestScope.zoom_and}&zoom_sort=0"/>

I get the following error in the Local_Host.log file:
2007-03-29 11:52:15 ApplicationDispatcher[/stories] Servlet.service() for servlet jsp threw exception
java.io.IOException: Server returned HTTP response code: 400 for URL: http://stories.mnhs.org/cgi-search/mgg/search.cgi?zoom_query=war&zoom_cat=-1&zoom_per_page=200&zoom_and=0&zoom_sort=0
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireReader(ImportSupport.java:348)
      at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:259)
      at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:179)
      at org.apache.jsp.mgg.search.search_jsp._jspx_meth_c_import_0(search_jsp.java:1994)
      at org.apache.jsp.mgg.search.search_jsp._jspx_meth_logic_equal_3(search_jsp.java:1966)
      at org.apache.jsp.mgg.search.search_jsp._jspService(search_jsp.java:497)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
      at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
      at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
      at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
      at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
      at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Unknown Source)

2007-03-29 11:52:15 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.io.IOException: Server returned HTTP response code: 400 for URL: http://stories.mnhs.org/cgi-search/mgg/search.cgi?zoom_query=war&zoom_cat=-1&zoom_per_page=200&zoom_and=0&zoom_sort=0
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireReader(ImportSupport.java:348)
      at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:259)
      at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:179)
      at org.apache.jsp.mgg.search.search_jsp._jspx_meth_c_import_0(search_jsp.java:1994)
      at org.apache.jsp.mgg.search.search_jsp._jspx_meth_logic_equal_3(search_jsp.java:1966)
      at org.apache.jsp.mgg.search.search_jsp._jspService(search_jsp.java:497)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
      at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
      at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
      at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
      at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
      at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Unknown Source)

Interesting Note:
When i paste the URL that is generated in the first line or two of the error above, the raw cgi search results come in, but the extra files (includes) that are called in by the search.jsp page that make up the site...don't.  so i'm just looking at a raw listing of the search results.

So it seems like Tomcat cannont access IIS resources on the very server that it lives on.  This app was built for our company, and i don't really know much about java.

And i'm not even sure if this is enough info to get any good feedback.
Thanks!
0
Comment
Question by:MHSIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
ADSLMark earned 250 total points
ID: 18820039
Hmm, ok, i am just guessing here.. these problems are hard if you have never encountered them before.. so I guess this has todo with the HTTP 400 error code with bad requests, you probably figured that out yourself and I think there are some problems with how you build up requests.
Maybe this post on the google forum helps you:

http://answers.google.com/answers/threadview?id=368359

Anyway, i have never encountered the problem, so it's just a guess, hope it helps.
Mark
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
tomcat administrtor 12 68
hibernate jars 4 61
spring jars download 1 53
Better way to make a string with template variables in java 3 34
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question