Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 38193 invoked from network); 3 Aug 2008 17:28:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2008 17:28:50 -0000 Received: (qmail 52741 invoked by uid 500); 3 Aug 2008 17:28:36 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 52707 invoked by uid 500); 3 Aug 2008 17:28:36 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 52696 invoked by uid 99); 3 Aug 2008 17:28:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 10:28:36 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of glynthomas@comcast.net designates 76.96.30.64 as permitted sender) Received: from [76.96.30.64] (HELO QMTA07.emeryville.ca.mail.comcast.net) (76.96.30.64) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 17:27:39 +0000 Received: from OMTA04.emeryville.ca.mail.comcast.net ([76.96.30.35]) by QMTA07.emeryville.ca.mail.comcast.net with comcast id xqq91Z0070lTkoCA7tTzyb; Sun, 03 Aug 2008 17:27:59 +0000 Received: from GlynPC ([69.248.128.124]) by OMTA04.emeryville.ca.mail.comcast.net with comcast id xtTx1Z0062hAViV8QtTy1y; Sun, 03 Aug 2008 17:27:59 +0000 X-Authority-Analysis: v=1.0 c=1 a=ucg8tjQDUfsA:10 a=cjjx2WMSMecA:10 a=xwO4jCr_BWGoiNzdoVAA:9 a=RPSaMN3peaqF2dMenLkA:7 a=ibYM1qGvhkOWFMYio-xbzWEtLTAA:4 a=MSl-tDqOz04A:10 a=si9q_4b84H0A:10 a=iSkjo3vVhZYA:10 From: "Glyn Thomas" To: "'Tomcat Users List'" References: <000f01c8f4fc$3e378120$baa68360$@net> <497fac690808030831g721c7928mf382dd9da13ca723@mail.gmail.com> In-Reply-To: <497fac690808030831g721c7928mf382dd9da13ca723@mail.gmail.com> Subject: RE: Problem with Displaying Result of a MySQL Join in Tomcat Date: Sun, 3 Aug 2008 13:21:17 -0400 Message-ID: <003501c8f58d$57e3cd40$07ab67c0$@net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acj1fhBoL4J5lg0VS8C72TrwjiJp9QADibqA Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org Len, Thanks for your comments and interest. I hadn't thought to check the Tomcat log because the majority of the = query appeared to execute, but there is an error being put into the log, = see below. Note, this is with a slight variation on the query that I = added in my earlier post, but has the same symptoms. Aug 3, 2008 1:10:57 PM org.apache.catalina.core.StandardWrapperValve = invoke SEVERE: Servlet.service() for servlet jsp threw exception java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at = com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:1= 13) at = com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecess= ary(ReadAheadInputStream.java:160) at = com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:1= 88) at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2428) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2882) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2871) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3414) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542) at = com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1= 734) at = com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885= ) at = org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(Dele= gatingPreparedStatement.java:93) at = org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(Query= TagSupport.java:215) at org.apache.jsp.index_jsp._jspService(index_jsp.java:371) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at = org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav= a:331) at = org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at = org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat= ionFilterChain.java:269) at = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte= rChain.java:188) at = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve= .java:213) at = org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve= .java:174) at = org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:= 127) at = org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:= 117) at = org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j= ava:108) at = org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:17= 4) at = org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874= ) at = org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proce= ssConnection(Http11BaseProtocol.java:665) at = org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.= java:528) at = org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowe= rWorkerThread.java:81) at = org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.= java:689) at java.lang.Thread.run(Unknown Source) I ran the query in MySQL Command Line Client on both XP and Vista and = they return identical results. Thanks Glyn -----Original Message----- From: Len Popp [mailto:len.popp@gmail.com]=20 Sent: Sunday, August 03, 2008 11:31 AM To: Tomcat Users List Subject: Re: Problem with Displaying Result of a MySQL Join in Tomcat There might be a simpler solution than migrating to a completely different OS. :-) What exactly do you mean by "don't get retrieved"? Does it throw an exception? Is there an error message in Tomcat's log? When you execute the query in MySQL, do you get exactly the same results as on the old system? In particular, are the column names what you expect? --=20 Len On Sat, Aug 2, 2008 at 20:02, Glyn Thomas = wrote: > I am in the process of converting a Tomcat front end for a MySQL = database > from > > Windows XP to Windows Vista. > > > > The XP version used MySQL Version 5.0.22, Tomcat 5.5.20, JRE 1.5.0 = release > > 12 with Tomcat JDK 4 Compatibility Pack, and J/Connector 5.0.6. > > > > The Vista version is using MySQL Version 5.0.51a, Tomcat 5.5.26, JRE > > 1.6.0_05, and J/Connector 5.1.6. > > > > I am unable to display any parts of a result set that are retrieved = from > > JOINed tables in the Vista version - this works fine in the XP = version. I > > already tried converting the queries to use JOIN syntax instead of = WHERE > > syntax, without improvement. > > > > For example, this query works correctly in the MySQL command line: > > > > SELECT > > = i.ImageID,i.DateDay,i.DateMonth,i.DateYear,i.Location1,i.Location2,i.Scan= ned > > YN,i.MediaID,c.Description as 'Country', s.SubjectID, s.SubjectTypeID, > > i.CountryID,i.PhotographerID, i.VolumeNumber FROM image_tbl i JOIN > > lu_country_tbl c ON (i.countryid=3Dc.countryid) JOIN = xrf_image_subject_tbl si > > ON (si.Imageid=3Di.imageid) JOIN subject_tbl s ON = (si.Subjectid=3Ds.subjectid) > > WHERE (i.imageid=3D1234); > > > > In JSP, I retrieve the results of this query into an rsImages = variable, and > > then iterate through the rows using: > > > > > > > > Rows that retrieve directly from the image_tbl work correctly e.g. > > ${row.ImageID} will display the image ID. > > > > However, elements from the joined tables, such as ${row.Country} and > > ${row.SubjectID} don't get retrieved. > > > > Any ideas? > > > > Thanks, > > Glyn Thomas > > > > > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org