RE: Re[2]: REPOST: Document.importNode not working-works fine in modified JSDK2.1
Just to inform everyone that the problem is fixed. In the end I just pulled every JAR out, and added them in one by one looking at my JSDK2.1 spec until everything worked. Thanks for the help. Cecil Chua -Original Message- From: Chua Eng Huang, Cecil Sent: Tue 7/30/2002 4:46 PM To: Tomcat Users List Cc: Subject: RE: Re[2]: REPOST: Document.importNode not working-works fine in modified JSDK2.1 Dear all, I tried moving the jars as earlier suggested. Here's the contents of the directory. As you can see, Xerces IS in the directory (actually two versions of it). Volume in drive C has no label. Volume Serial Number is 90E8-430D Directory of C:\JAKART~1.1\lib\apps 07/30/2002 04:39p DIR . 07/30/2002 04:39p DIR .. 03/13/2002 11:47p 417,110 ant-1.4.1.jar 12/12/2000 02:36p 443,047 ant.jar 01/28/2002 02:31p 71,695 antlr.jar 01/28/2002 02:31p 130,307 avalon-excalibur-4.0.jar 01/28/2002 02:31p 35,299 avalon-framework-4.0.jar 04/23/2001 02:59p 779,765 castor.jar 01/28/2002 02:31p 694,162 cocoon.jar 01/28/2002 02:31p 54,831 cos.jar 01/28/2002 02:31p 24,026 db.jar 03/13/2002 11:47p 15,991 examples.jar 01/28/2002 02:31p 461,188 exist.jar 01/28/2002 02:31p 28,383 getopt.jar 04/23/2001 02:59p 30,358 infozone-lexus.jar 03/13/2002 11:47p 44,009 infozone-tools.jar 01/28/2002 02:31p 29,871 jakarta-regexp-1.2.jar 04/23/2001 02:59p 29,795 jakarta-regexp.jar 01/28/2002 02:31p 66,521 jasper-runtime.jar 12/12/2000 02:37p 209,875 jasper.jar 04/23/2001 02:59p 246,635 javaclass.jar 01/28/2002 02:31p 6,407 java_readline.jar 12/12/2000 02:36p 5,618 jaxp.jar 01/28/2002 02:31p 193,431 jdbc7.0-1.2.jar 04/23/2001 02:59p 98,496 jndi.jar 01/28/2002 02:31p 25,391 jstyle.jar 04/23/2001 02:59p 8,809 jta-spec1_0_1.jar 04/23/2001 02:59p 45,054 junit.jar 01/28/2002 02:31p 158,892 log4j.jar 01/28/2002 02:31p 70,529 logkit-1.0.jar 01/28/2002 02:31p 34,369 maybeupload_1-0-5pre3.jar 01/28/2002 02:31p 62,403 mysql.jar 04/23/2001 02:59p 12,468 omquery.jar 03/13/2002 11:47p 1,729,689 openorb-1.2.0.jar 03/13/2002 11:47p 283,371 openorb_tools-1.2.0.jar 01/28/2002 02:31p 413,614 optional.jar 12/12/2000 02:36p 136,133 parser.jar 05/06/1999 09:41a 33,271 qtag.jar 03/26/2002 07:43a 94 README 01/28/2002 02:31p 72,154 resolver.jar 12/12/2000 02:36p 40,836 servlet.jar 07/30/2002 04:39p 0 show.txt 01/28/2002 02:31p 105,291 trove.jar 12/12/2000 02:37p 406,998 webserver.jar 03/13/2002 11:47p 720,930 xalan-2.0.1.jar 01/28/2002 02:31p 897,409 xalan-2.2.0-D14.jar 03/13/2002 11:47p 1,808,885 xerces-1.4.3.jar 01/28/2002 02:31p 1,781,968 xerces-1.4.4.jar 04/23/2001 02:59p 795,604 xerces.jar 03/13/2002 11:47p 589,139 xindice.jar 03/13/2002 11:47p 77,890 xml-apis-1.0.jar 01/28/2002 02:31p 92,409 xml-apis.jar 01/28/2002 02:31p 8,969 xmldb-api-2001.jar 03/13/2002 11:47p 9,240 xmldb-sdk.jar 03/13/2002 11:47p 28,473 xmldb-xupdate.jar 03/13/2002 11:47p 8,969 xmldb.jar 01/28/2002 02:31p 59,975 xmlrpc-1.0rc1.jar 04/23/2001 02:59p 370,745 xtdash.jar 56 File(s) 15,006,791 bytes 2 Dir(s) 886,317,056 bytes free There was also a request to see the variable temp2. Enclosed is the full source code for that function. private Document setupXMLSearchEngine(DocumentBuilder builder, String result, DBConnTable d, readcore swarg) throws ParserConfigurationException,SAXException,IOException,ClassNotFoundException,SQLException { Integer I=new Integer(swarg.value(currconfig
RE: Re[2]: REPOST: Document.importNode not working-works fine in modified JSDK2.1
temp=builder.parse(new InputSource(new StringReader(result))); Node temp3=temp.getDocumentElement(); Node temp4=temp2.importNode(temp3,true); //This is line 109 where Tomcat bombs root2.appendChild(temp4); return temp2; } What I'll probably do if nothing else works is just write my own importNode function within the module. Cecil Chua -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED]] Sent: Mon 7/29/2002 3:31 PM To: Tomcat Users List Cc: Subject: Re[2]: REPOST: Document.importNode not working-works fine in modified JSDK2.1 Hello Greg, The advice below to store your application accessible classes in $TOMCAT_HOME/server/lib/ is bad information. That will only be seen by Tomcat itself. If you want both Tomcat and apps to see your library, you need to store that in $TOMCAT_HOME/common/lib or in $TOMCAT_HOME/lib (analogous to $TOMCAT_HOME/shared/lib in Tomcat 4.1.x) for just your apps and not Tomcat to see it. What JDK are you using? XML/DOM libraries did not come with JDK1.3.x, but do come with j2sdk1.4.x. If you are using anything less than JDK1.4.x, you need to make sure to put something like Xerces in a directory accessible to Tomcat's classloaders. With Tomcat-3.3.x, you need to put it in either $TOMCAT_HOME/lib/apps or $TOMCAT_HOME/lib/common. Get out of the habit of putting any XML/DOM libraries in your own app's WEB-INF/lib directory. It is forbidden by the Sun classloading spec to do this (see their spec for details) and Tomcat-4.0.2+ enforces this. Jake Monday, July 29, 2002, 8:26:16 AM, you wrote: GW Document.importNode not working-works fine in modified JSDK2.1Yes indeed, the PROJECT/WEB-INF/lib is where you place app specific JARs. GW But your problem is dealing with XML and JSDK 2.1... the JSDK does not contain the org.w3c package. You probably know this already, but here's the javadoc link for the JSDK 2.2... the 2.1 is GW offline now, since 2.3 is the standard. GW http://java.sun.com/products/servlet/2.2/javadoc/index.html GW The 1.3.x J2EE complete JAR does... but the older versions did not. GW So, the questions therefore, are GW 1. What is your compile-time classpath... Where is the compiler finding org.w3c.dom / org.xml.sax ? GW 2. What is your run-time classpath. GW 3. If # 1 and # 2 are different, do you also have servlet spec differences? ( 2.1 vs. 2.2 or 2.3 ) GW I think the long and short of it will be that you need to add the org.w3c.dom and org.xml.sax packages to the $TOMCAT_HOME/server/lib/ or to your $PROJECT/WEB-INF/lib/ GW [Greg Waehner] -Original Message- GW From: Chua Eng Huang, Cecil [mailto:[EMAIL PROTECTED]] GW Sent: Monday, July 29, 2002 9:02 AM GW To: Tomcat Users List GW Subject: RE: REPOST: Document.importNode not working-works fine in modified JSDK2.1 GW This is probably it. However, I have dumped every jar file into webapps\examples\WEB-INF\lib, GW which according to my understanding of the various docs is where you're supposed to put all your own JAR files. GW Also, what are these special JARs? Tomcat is a J2EE servlet container, but it does not contain all the components of the easy download J2SDK EE. So, look in the JAR files and see if the GW org.w2c.dom package is there... it may not be (I forget). If that's the case, then you are compiling with a classpath that does not match the runtime classpath. This is common with Tomcat, GW unless you want to point your compile classpath to $TOMCAT_HOME/server/lib/ for the JARs. A lot of people use the J2EE.jar for simplicity, but then must remember to compare the run-time packages GW when a problem occurs. GW The code does compile fine (otherwise I wouldn't be getting a crash by Tomcat itself. I'd get it from the compiler). GW Cecil Chua -- Best regards, Jacobmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: REPOST: Document.importNode not working-works fine in modified JSDK2.1
This is probably it. However, I have dumped every jar file into webapps\examples\WEB-INF\lib, which according to my understanding of the various docs is where you're supposed to put all your own JAR files. Also, what are these special JARs? Tomcat is a J2EE servlet container, but it does not contain all the components of the easy download J2SDK EE. So, look in the JAR files and see if the org.w2c.dom package is there... it may not be (I forget). If that's the case, then you are compiling with a classpath that does not match the runtime classpath. This is common with Tomcat, unless you want to point your compile classpath to $TOMCAT_HOME/server/lib/ for the JARs. A lot of people use the J2EE.jar for simplicity, but then must remember to compare the run-time packages when a problem occurs. The code does compile fine (otherwise I wouldn't be getting a crash by Tomcat itself. I'd get it from the compiler). Cecil Chua winmail.dat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Re[2]: REPOST: Document.importNode not working-works fine in modified JSDK2.1
I am using JDK 1.3, but am using a whole bunch of random JAR files from 1.4 . These came bundled with the eXist XML database, and that's what I am using. I will try moving my JAR files tomorrow to see how that goes. -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED]] Sent: Mon 7/29/2002 3:31 PM To: Tomcat Users List Cc: Subject: Re[2]: REPOST: Document.importNode not working-works fine in modified JSDK2.1 Hello Greg, The advice below to store your application accessible classes in $TOMCAT_HOME/server/lib/ is bad information. That will only be seen by Tomcat itself. If you want both Tomcat and apps to see your library, you need to store that in $TOMCAT_HOME/common/lib or in $TOMCAT_HOME/lib (analogous to $TOMCAT_HOME/shared/lib in Tomcat 4.1.x) for just your apps and not Tomcat to see it. What JDK are you using? XML/DOM libraries did not come with JDK1.3.x, but do come with j2sdk1.4.x. If you are using anything less than JDK1.4.x, you need to make sure to put something like Xerces in a directory accessible to Tomcat's classloaders. With Tomcat-3.3.x, you need to put it in either $TOMCAT_HOME/lib/apps or $TOMCAT_HOME/lib/common. Get out of the habit of putting any XML/DOM libraries in your own app's WEB-INF/lib directory. It is forbidden by the Sun classloading spec to do this (see their spec for details) and Tomcat-4.0.2+ enforces this. Jake Monday, July 29, 2002, 8:26:16 AM, you wrote: GW Document.importNode not working-works fine in modified JSDK2.1Yes indeed, the PROJECT/WEB-INF/lib is where you place app specific JARs. GW But your problem is dealing with XML and JSDK 2.1... the JSDK does not contain the org.w3c package. You probably know this already, but here's the javadoc link for the JSDK 2.2... the 2.1 is GW offline now, since 2.3 is the standard. GW http://java.sun.com/products/servlet/2.2/javadoc/index.html GW The 1.3.x J2EE complete JAR does... but the older versions did not. GW So, the questions therefore, are GW 1. What is your compile-time classpath... Where is the compiler finding org.w3c.dom / org.xml.sax ? GW 2. What is your run-time classpath. GW 3. If # 1 and # 2 are different, do you also have servlet spec differences? ( 2.1 vs. 2.2 or 2.3 ) GW I think the long and short of it will be that you need to add the org.w3c.dom and org.xml.sax packages to the $TOMCAT_HOME/server/lib/ or to your $PROJECT/WEB-INF/lib/ GW [Greg Waehner] -Original Message- GW From: Chua Eng Huang, Cecil [mailto:[EMAIL PROTECTED]] GW Sent: Monday, July 29, 2002 9:02 AM GW To: Tomcat Users List GW Subject: RE: REPOST: Document.importNode not working-works fine in modified JSDK2.1 GW This is probably it. However, I have dumped every jar file into webapps\examples\WEB-INF\lib, GW which according to my understanding of the various docs is where you're supposed to put all your own JAR files. GW Also, what are these special JARs? Tomcat is a J2EE servlet container, but it does not contain all the components of the easy download J2SDK EE. So, look in the JAR files and see if the GW org.w2c.dom package is there... it may not be (I forget). If that's the case, then you are compiling with a classpath that does not match the runtime classpath. This is common with Tomcat, GW unless you want to point your compile classpath to $TOMCAT_HOME/server/lib/ for the JARs. A lot of people use the J2EE.jar for simplicity, but then must remember to compare the run-time packages GW when a problem occurs. GW The code does compile fine (otherwise I wouldn't be getting a crash by Tomcat itself. I'd get it from the compiler). GW Cecil Chua -- Best regards, Jacobmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Website does not appear on Macintosh/IE
Nope to both questions. -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Sat 7/27/2002 9:11 AM To: Tomcat Users List Cc: Subject: RE: Website does not appear on Macintosh/IE I'm not sure it is fault HTML. Are you setting the content type? Are you trying to use compression? -Original Message- From: Chua Eng Huang, Cecil [mailto:[EMAIL PROTECTED]] Sent: 26 July, 2002 8:36 PM To: Tomcat Users List Subject: RE: Website does not appear on Macintosh/IE That is the error reported for the Macintosh/IE combination. Does anyone know why? (Even with faulty HTML, I'd think the browser would still get faulty HTML instead of nothing). Cecil Chua winmail.dat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Website does not appear on Macintosh/IE
- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: 27 July, 2002 7:11 AM To: Tomcat Users List Subject: RE: Website does not appear on Macintosh/IE I'm not sure it is fault HTML. Are you setting the content type? Are you trying to use compression? -Original Message- From: Chua Eng Huang, Cecil [mailto:[EMAIL PROTECTED]] Sent: 26 July, 2002 8:36 PM To: Tomcat Users List Subject: RE: Website does not appear on Macintosh/IE That is the error reported for the Macintosh/IE combination. Does anyone know why? (Even with faulty HTML, I'd think the browser would still get faulty HTML instead of nothing). Cecil Chua -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Fri 7/26/2002 9:52 PM To: Tomcat Users List Cc: Subject: RE: Website does not appear on Macintosh/IE You might try looking at it in Mozilla. It looks totally wrong there. When you type in an author first name and lastname, and hit submit you get a TOTALLY blank page. -Original Message- From: Chua Eng Huang, Cecil [mailto:[EMAIL PROTECTED]] Sent: 26 July, 2002 7:30 PM To: Tomcat Users List Subject: RE: Website does not appear on Macintosh/IE Hmm... for some reason I am getting a different set of output. This is what I get: TR TDInput Type=CheckBox Name=FACNO Value=46464/TD TDStraub Jr./TD TDDetmar W./TD TDA HRef=http://readable.eci.gsu.edu:8080/examples/servlet/isbib?Command=DisplayFromMenu=FacResMenuOption=1No=0Last=Straub Jr.First=Detmar W.Change data/A/TD /TR This part of the code is auto-generated. What concerns me is that you are getting eight zeros after the FACNO variable rather than four. Also note that the code is cleaner. I haven't made any changed to the code for at least a week. Cecil Chua -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Fri 7/26/2002 7:49 PM To: Tomcat Users List Cc: Subject: RE: Website does not appear on Macintosh/IE You might try cleaning up the HTML and re-testing it. I ran it through the HTML validator at validator.w3.org and got this: * Line 23, column 64: TDInput Type=CheckBox Name=FACNO Value=/Input/TD ^ Error: end tag for element INPUT which is not open; try removing the end tag or check for improper nesting of elements * Line 24, column 35: ... IRST Value=Detmar W./Input/TD ^ Error: end tag for element INPUT which is not open; try removing the end tag or check for improper nesting of elements * Line 25, column 35: ... AST Value=Straub Jr./Input/TD ^ Error: end tag for element INPUT which is not open; try removing the end tag or check for improper nesting of elements * Line 191, column 31: Option Value=49 Florida AM/Option ^ Error: unknown entity M * Line 2111, column 3: /P ^ Error: end tag for element P which is not open; try removing the end tag or check for improper nesting of elements -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL
RE: Website does not appear on Macintosh/IE
Hmm... for some reason I am getting a different set of output. This is what I get: TR TDInput Type=CheckBox Name=FACNO Value=46464/TD TDStraub Jr./TD TDDetmar W./TD TDA HRef=http://readable.eci.gsu.edu:8080/examples/servlet/isbib?Command=DisplayFromMenu=FacResMenuOption=1No=0Last=Straub Jr.First=Detmar W.Change data/A/TD /TR This part of the code is auto-generated. What concerns me is that you are getting eight zeros after the FACNO variable rather than four. Also note that the code is cleaner. I haven't made any changed to the code for at least a week. Cecil Chua -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Fri 7/26/2002 7:49 PM To: Tomcat Users List Cc: Subject: RE: Website does not appear on Macintosh/IE You might try cleaning up the HTML and re-testing it. I ran it through the HTML validator at validator.w3.org and got this: * Line 23, column 64: TDInput Type=CheckBox Name=FACNO Value=/Input/TD ^ Error: end tag for element INPUT which is not open; try removing the end tag or check for improper nesting of elements * Line 24, column 35: ... IRST Value=Detmar W./Input/TD ^ Error: end tag for element INPUT which is not open; try removing the end tag or check for improper nesting of elements * Line 25, column 35: ... AST Value=Straub Jr./Input/TD ^ Error: end tag for element INPUT which is not open; try removing the end tag or check for improper nesting of elements * Line 191, column 31: Option Value=49 Florida AM/Option ^ Error: unknown entity M * Line 2111, column 3: /P ^ Error: end tag for element P which is not open; try removing the end tag or check for improper nesting of elements -Original Message- From: Chua Eng Huang, Cecil [mailto:[EMAIL PROTECTED]] Sent: 26 July, 2002 10:58 AM To: Tomcat Users List Subject: Website does not appear on Macintosh/IE Hello, I've got a bit of a problem with a website I maintain at http://readable.eci.gsu.edu:8080/examples/servlet/isbib The query options to pull up the bibliographies (accessible for example if you go to by author say First Name Detmar, Last Name Straub, click on the one name that pops up and hit submit) does NOT appear under the combination Macintosh OS/Internet Explorer. It appears under any other combination of OS/browser. I'm stumped. Any ideas? I am using Tomcat 3.3.1 Cecil Chua
RE: Website does not appear on Macintosh/IE
That is the error reported for the Macintosh/IE combination. Does anyone know why? (Even with faulty HTML, I'd think the browser would still get faulty HTML instead of nothing). Cecil Chua -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Fri 7/26/2002 9:52 PM To: Tomcat Users List Cc: Subject: RE: Website does not appear on Macintosh/IE You might try looking at it in Mozilla. It looks totally wrong there. When you type in an author first name and lastname, and hit submit you get a TOTALLY blank page. -Original Message- From: Chua Eng Huang, Cecil [mailto:[EMAIL PROTECTED]] Sent: 26 July, 2002 7:30 PM To: Tomcat Users List Subject: RE: Website does not appear on Macintosh/IE Hmm... for some reason I am getting a different set of output. This is what I get: TR TDInput Type=CheckBox Name=FACNO Value=46464/TD TDStraub Jr./TD TDDetmar W./TD TDA HRef=http://readable.eci.gsu.edu:8080/examples/servlet/isbib?Command=DisplayFromMenu=FacResMenuOption=1No=0Last=Straub Jr.First=Detmar W.Change data/A/TD /TR This part of the code is auto-generated. What concerns me is that you are getting eight zeros after the FACNO variable rather than four. Also note that the code is cleaner. I haven't made any changed to the code for at least a week. Cecil Chua -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Fri 7/26/2002 7:49 PM To: Tomcat Users List Cc: Subject: RE: Website does not appear on Macintosh/IE You might try cleaning up the HTML and re-testing it. I ran it through the HTML validator at validator.w3.org and got this: * Line 23, column 64: TDInput Type=CheckBox Name=FACNO Value=/Input/TD ^ Error: end tag for element INPUT which is not open; try removing the end tag or check for improper nesting of elements * Line 24, column 35: ... IRST Value=Detmar W./Input/TD ^ Error: end tag for element INPUT which is not open; try removing the end tag or check for improper nesting of elements * Line 25, column 35: ... AST Value=Straub Jr./Input/TD ^ Error: end tag for element INPUT which is not open; try removing the end tag or check for improper nesting of elements * Line 191, column 31: Option Value=49 Florida AM/Option ^ Error: unknown entity M * Line 2111, column 3: /P ^ Error: end tag for element P which is not open; try removing the end tag or check for improper nesting of elements
Document.importNode not working-works fine in modified JSDK2.1
Hi, APOLOGIES Apologies if this appears in MIME (I hope not), I am using the web version of MS Outlook, have no access to the full client, and thus have no control over the options. SUMMARY I've got a bit of a problem with Jakarta Tomcat 3.2.1/3.3.1 I am running a small XML application that takes the getDocumentElement() of a document class and appends it onto another class. To do this, I use the importNode() function. When I test it on my home server, which is a modified version of the JSDK2.1 server (modified in the sense that I have randomly added .jar files as needed), the application works. When I test it on Tomcat 3.2.1/3.3.1, it doesn't. DETAIL The code in question is as follows: Document temp=null; if (result==null) temp=builder.parse(new InputSource(new StringReader(resultNo records/result))); else temp=builder.parse(new InputSource(new StringReader(result))); Node temp3=temp.getDocumentElement(); Node temp4=temp2.importNode(temp3,true); root2.appendChild(temp4); return temp2; The code is sloppy, because I've been trying to debug it, so I tried various permutations of the same code. This was the last state of the code. The code bombs on Node temp4=temp2.importNode(temp3,true); it reports the error message: java.lang.NoSuchMethodError at sf_maincontrol.setupXMLSearchEngine(sf_maincontrol.java:109) at sf_maincontrol.run(sf_maincontrol.java:57) at sf.searchme(sf.java:68) at sf.doPost(sf.java:16) ... This is odd, because as can be seen on the earlier lines, it is running various other methods of the document class just fine. Originally, I thought it was because I was using an old version of Tomcat (3.2.1), so I switched to Tomcat 4.0. Tomcat 4.0 was so completely different (and I couldn't get it to install), so I switched to 3.3.1, which worked. All of my own special jars are in the web-inf/lib directory, etc. etc. I just can't understand why it isn't running importNode, but is running all the other methods of the Document class. Thank you Cecil Chua