Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

java error accessing IIS website on same server where Tomcat lives

Posted on 2007-03-29
3
Medium Priority
?
288 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 1000 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

604 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