java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z

Splash Forums PrettyFaces Users java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z

This topic contains 2 replies, has 3 voices, and was last updated by  Lincoln Baxter III 7 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17749

    smitha.h.rao
    Participant

    I am trying to upgrade my application to JSF 2.

    Also I have prettyfaces jars for jsf2 : ocpsoft-pretty-faces-2.0.4.jar.

    I am using jre 1.6

    But still I get following exception when trying to access page with following rule:

    Rule:

    <url-mapping id=”testDetails”>

    <pattern> /test/#{testDetailsAction.strTestId}/#{testDetailsAction.strTestUrl}</pattern>

    <query-param name=”commentsPage”>#{testDetailsAction.strCommentsPage}</query-param>

    <query-param name=”action”>#{testDetailsAction.action}</query-param>

    <view-id> /WEB-INF/jsp/candidate/testDetails.faces</view-id>

    <action>#{testDetailsAction.getTestDetails}</action>

    </url-mapping>

    Caused by: java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z

    at com.ocpsoft.pretty.config.mapping.QueryParameter.hasValidators(QueryParameter.java:46)

    at com.ocpsoft.pretty.faces.beans.ParameterValidator.validateQueryParams(ParameterValidator.java:126)

    at com.ocpsoft.pretty.faces.beans.ParameterValidator.validateParameters(ParameterValidator.java:60)

    at com.ocpsoft.pretty.PrettyContext.validateParameters(PrettyContext.java:125)

    at com.ocpsoft.pretty.faces.event.PrettyPhaseListener.afterPhase(PrettyPhaseListener.java:80)

    at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:189)

    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:107)

    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)

    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)

    Please help me how to get rid of this exception?

    Thanks

    Smitha

    #19983

    Are absolutely sure that your application runs with a Java 6 JRE? The isEmpty() method was added in Java 6. So this error looks like you are using an older JRE. Take a look here:

    http://java.sun.com/javase/6/docs/api/java/lang/String.html#isEmpty%28%29

    #19984

    Yeah, this sounds like an issue where the runtime environment is not 1.6 compatible.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Comments are closed.