Re: Tomcat + HP-UX = NoSuchMethodError java.lang.String.contains(Ljava/lang/String;)
From: QM [EMAIL PROTECTED] On Thu, Jun 02, 2005 at 05:37:23PM -0700, Wendy Smoak wrote: : Any idea why String.contains(String) wouldn't work within Tomcat 4.1 on : HP-UX and Java 1.5? Doesn't Tomcat 4.1 even support JDK 1.5? Tomcat 4.1 works fine under JDK 1.5 on Windows 2000... I see that Tomcat 5.5 requires Java 1.5 by default, but that's the only restriction I've seen. Are you using 1.5 to build, run, or both? Both... but Sun's version on Windows to build, and HP's on HP-UX to run. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat + HP-UX = NoSuchMethodError java.lang.String.contains(Ljava/lang/String;)
Any idea why String.contains(String) wouldn't work within Tomcat 4.1 on HP-UX and Java 1.5? I'm getting the following error in the localhost log: java.lang.NoSuchMethodError: java.lang.String.contains(Ljava/lang/String;)Z at edu.asu.vpia.benweb.dao.ResolutionImpl.getSortField(ResolutionImpl.java:47) The line in question says: if( statusDesc.contains(HQ) ) { Immediately suspecting that HP's JVM was being flaky [again], I tried using that method in a simple test program at the command line, which worked. (Details here: http://wiki.wendysmoak.com/cgi-bin/wiki.pl?TomcatNoSuchMethodError ) Then I thought maybe I was somehow accidentally using Java 1.4, which did not contain that method, but everything I can find says I *am* using Java 1.5: When I use the manager app, the bottom of the page says (reformatted for plain text): Server Information Tomcat Version Apache Tomcat/4.1 JVM Version 1.5.0-_24_nov_2004_16_29 JVM Vendor Hewlett-Packard Company OS NameHP-UX OS Version B.11.11 OS Architecture PA_RISC2.0 I put a scriptlet in a JSP to print out all the system properties, and it lists things like: java.vm.version = 1.5.0 FCS (JS B64) jinteg:11.24.04-15:51 PA2.0 (aCC_AP) java.runtime.version = 1.5.0-_24_nov_2004_16_29 java.library.path = /opt/java1.5/jre/lib/PA_RISC2.0:/opt/java1.5/jre/lib/PA_RISC2.0/server:/opt/ java1.5/jre/../lib/PA_RISC2.0:/usr/lib What else can I check? I'd really like to use the new methods in Java 1.5, but I keep having to remove them from my code so it will work once I deploy to the HP-UX production server. (The development box is Win2000/Tomcat 4.1/Sun Java 1.5, and everything works fine there.) Thanks, Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat + HP-UX = NoSuchMethodError java.lang.String.contains(Ljava/lang/String;)
From: Wendy Smoak [EMAIL PROTECTED] Any idea why String.contains(String) wouldn't work within Tomcat 4.1 on HP-UX and Java 1.5? Now I'm *completely* mystified... test.jsp: % out.println( ABC.contains( A ) ); % works fine (prints 'true' on the page). Has anyone EVER seen behavior like this? The same method works in a JSP but does not work in .class files included in the .war? I'm leaning towards 'obscure classloader issue in the HP-UX JVM' but I don't really feel qualified to make that statement. Can you help me prove it or suggest an alternative? -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat + HP-UX = NoSuchMethodError java.lang.String.contains(Ljava/lang/String;)
On Thu, Jun 02, 2005 at 05:37:23PM -0700, Wendy Smoak wrote: : Any idea why String.contains(String) wouldn't work within Tomcat 4.1 on : HP-UX and Java 1.5? Doesn't Tomcat 4.1 even support JDK 1.5? Are you using 1.5 to build, run, or both? -QM -- software -- http://www.brandxdev.net/ tech news -- http://www.RoarNetworX.com/ code scan -- http://www.JxRef.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]