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 Name HP-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]