Misbehaving JVM - HP UX

This is a discussion on Misbehaving JVM - HP UX ; I have a web application running under Tomcat 4.1 on HP-UX B11.11 with Java 1.5. Inexplicably, I get the following error java.lang.NoSuchMethodError: java.lang.String.contains(Ljava/lang/String Z at edu.asu.vpia.benweb.dao.ResolutionImpl.getSortFiel d(ResolutionImpl.java:47) from code that uses the 'String.contains(String)' method that was added with Java 1.5. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Misbehaving JVM

  1. Misbehaving JVM

    I have a web application running under Tomcat 4.1 on HP-UX B11.11 with Java
    1.5.

    Inexplicably, I get the following error
    java.lang.NoSuchMethodError:
    java.lang.String.contains(Ljava/lang/StringZ
    at
    edu.asu.vpia.benweb.dao.ResolutionImpl.getSortFiel d(ResolutionImpl.java:47)

    from code that uses the 'String.contains(String)' method that was added with
    Java 1.5.
    Line 47 is: if( statusDesc.contains("HQ") ) {

    However, the same method works when called from a simple JSP that is
    compiled and executed by Tomcat:
    test.jsp:
    <% out.println( "ABC".contains( "A" ) ); %>

    and from a simple Java program compiled and executed at the command line,
    details of which can be seen here:
    http://wiki.wendysmoak.com/cgi-bin/w...uchMethodError

    The non-working Java code was compiled under Sun's JDK 1.5 on a Windows 2000
    machine and deployed to HP-UX. I've long ago lost faith in the "write once,
    run anywhere" idea, but I've never had anything THIS bad happen!

    Has anyone seen any similar problems? I'm not the HP admin, so be gentle...
    is there a site I can search for known issues?

    Thanks,
    Wendy Smoak



  2. Re: Misbehaving JVM

    as per JDK api this method its avilable in JDK 1.5

    http://java.sun.com/j2se/1.5.0/docs/...ng/String.html

    may be you need to try this different version JDK implementation


+ Reply to Thread