glassfish
  1. glassfish
  2. GLASSFISH-11027

CVS to Promoted mismatch on scrumtoys (was: [REGRESSION] Compile failure on JSF/Scrumtoys Sample)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: V3
    • Fix Version/s: V3
    • Component/s: sample_apps
    • Labels:
      None
    • Environment:

      Operating System: Mac OS X
      Platform: Macintosh

    • Issuezilla Id:
      11,027

      Description

      B72 - Start Glassfish server. Execute the following steps
      $ cd <GF_Install>/samples/javaee6/web/jsf/scrumtoys
      $ ant compile

      The system reports a BUILD FAILURE and the following errors

      [echo] Compiling scrumtoys
      [javac] Compiling 22 source files to
      <GF_Install>/glassfishv3/glassfish/samples/javaee6/web/jsf/scrumtoys/build/classes
      [javac]
      <GF_Install>/glassfishv3/glassfish/samples/javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java:45:
      cannot find symbol
      [javac] symbol : class ConstraintPayload
      [javac] location: package javax.validation
      [javac] import javax.validation.ConstraintPayload;
      [javac] ^
      [javac]
      <GF_Install>/glassfishv3/glassfish/samples/javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java:57:
      cannot find symbol
      [javac] symbol : class ConstraintPayload
      [javac] location: @interface
      jsf2.demo.scrum.model.entities.SprintNameUniquenessConstraint
      [javac] Class<? extends ConstraintPayload>[] payload() default {};
      [javac] ^
      [javac]
      <GF_Install>/glassfishv3/glassfish/samples/javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraintValidator.java:57:
      cannot find symbol
      [javac] symbol : class ErrorBuilder
      [javac] location: interface javax.validation.ConstraintValidatorContext
      [javac] ConstraintValidatorContext.ErrorBuilder builder =
      [javac] ^
      [javac]
      <GF_Install>/glassfishv3/glassfish/samples/javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraintValidator.java:58:
      cannot find symbol
      [javac] symbol : method buildErrorWithMessageTemplate(java.lang.String)
      [javac] location: interface javax.validation.ConstraintValidatorContext
      [javac] ctx.buildErrorWithMessageTemplate(message);
      [javac] ^
      [javac]
      <GF_Install>/glassfishv3/glassfish/samples/javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraintValidator.java:60:
      cannot find symbol
      [javac] symbol : method disableDefaultError()
      [javac] location: interface javax.validation.ConstraintValidatorContext
      [javac] ctx.disableDefaultError();
      [javac] ^
      [javac] Note: Some input files use unchecked or unsafe operations.
      [javac] Note: Recompile with -Xlint:unchecked for details.
      [javac] 5 errors

      BUILD FAILED
      <GF_Install>/glassfishv3/glassfish/samples/bp-project/command-line-ant-tasks.xml:81:
      Compile failed; see the compiler error output for details.

        Activity

        Hide
        msreddy added a comment -

        assigning to Jim

        Show
        msreddy added a comment - assigning to Jim
        Hide
        Ed Burns added a comment -

        I am trying out b72 now. Snjezana just shared the zip with me.

        Ed

        Show
        Ed Burns added a comment - I am trying out b72 now. Snjezana just shared the zip with me. Ed
        Hide
        Ed Burns added a comment -

        I left the reporter a voicemail.

        I am very convinced that this is not a regression.

        Rather, the problem is that the version of scrumtoys in b72 is not the most
        current one in CVS. The most current one in CVS shows the following checksum:

        sum ./src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java

        I would wager the one you get when you install b72 has a different checksum.
        More importantly, it probably references the class
        javax.validation.ConstraintPayload which was replaced with
        javax.validation.Payload in the version of the JSR-303 RI shipped with b72, and
        used in the latest CVS HEAD in glassfish-samples.

        Re-assigning to Sreeni for further evaluation.

        Show
        Ed Burns added a comment - I left the reporter a voicemail. I am very convinced that this is not a regression. Rather, the problem is that the version of scrumtoys in b72 is not the most current one in CVS. The most current one in CVS shows the following checksum: sum ./src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java I would wager the one you get when you install b72 has a different checksum. More importantly, it probably references the class javax.validation.ConstraintPayload which was replaced with javax.validation.Payload in the version of the JSR-303 RI shipped with b72, and used in the latest CVS HEAD in glassfish-samples. Re-assigning to Sreeni for further evaluation.
        Hide
        Ed Burns added a comment -

        Indeed, when downloading
        <http://javaweb.sfbay/java/re/glassfish/v3/promoted/fcs/b72/archive/bundles/java_ee_sdk-6-web-b28-unix.sh>
        I see the sum is

        sum
        javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java
        27973 3

        and a diff of the file in the sdk and the file in the CVS HEAD shows this:

        diff -u
        javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java
        ~/Projects/J2EE/net-workareas/glassfish-samples/ws/javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java


        javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java
        2009-11-11 09:30:20.000000000 -0800
        +++
        /home/edburns/Projects/J2EE/net-workareas/glassfish-samples/ws/javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java
        2009-11-11 15:42:09.003380000 -0800
        @@ -1,7 +1,7 @@
        /*

        • DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
          *
        • * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
          + * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
          *
        • The contents of this file are subject to the terms of either the GNU
        • General Public License Version 2 only ("GPL") or the Common Development
          @@ -42,7 +42,7 @@
          import java.lang.annotation.RetentionPolicy;
          import java.lang.annotation.Target;
          import javax.validation.Constraint;
          -import javax.validation.ConstraintPayload;
          +import javax.validation.Payload;

        @Documented
        @Constraint(validatedBy = SprintNameUniquenessConstraintValidator.class)
        @@ -50,11 +50,11 @@
        @Retention(RetentionPolicy.RUNTIME)
        public @interface SprintNameUniquenessConstraint {

        • String message() default " {sprint.form.label.name.unique}";
          + String message() default "{sprint.form.label.name.unique}

          ";

        • Class<?>[] groups() default {};
          + Class<?>[] groups() default {};
        • Class<? extends ConstraintPayload>[] payload() default {};
          + Class<? extends Payload>[] payload() default {};

        }

        Show
        Ed Burns added a comment - Indeed, when downloading < http://javaweb.sfbay/java/re/glassfish/v3/promoted/fcs/b72/archive/bundles/java_ee_sdk-6-web-b28-unix.sh > I see the sum is sum javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java 27973 3 and a diff of the file in the sdk and the file in the CVS HEAD shows this: diff -u javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java ~/Projects/J2EE/net-workareas/glassfish-samples/ws/javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java — javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java 2009-11-11 09:30:20.000000000 -0800 +++ /home/edburns/Projects/J2EE/net-workareas/glassfish-samples/ws/javaee6/web/jsf/scrumtoys/src/java/jsf2/demo/scrum/model/entities/SprintNameUniquenessConstraint.java 2009-11-11 15:42:09.003380000 -0800 @@ -1,7 +1,7 @@ /* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved. * The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -42,7 +42,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; -import javax.validation.ConstraintPayload; +import javax.validation.Payload; @Documented @Constraint(validatedBy = SprintNameUniquenessConstraintValidator.class) @@ -50,11 +50,11 @@ @Retention(RetentionPolicy.RUNTIME) public @interface SprintNameUniquenessConstraint { String message() default " {sprint.form.label.name.unique}"; + String message() default "{sprint.form.label.name.unique} "; Class<?>[] groups() default {}; + Class<?>[] groups() default {}; Class<? extends ConstraintPayload>[] payload() default {}; + Class<? extends Payload>[] payload() default {}; }
        Hide
        ne110415 added a comment -

        Ed, you can check my comments in 11023.

        This issue is most likely due to the same issue.

        Parts of GF are referring to older jsr 303 api versions. (I think from 4.0.1 to
        4.0.0 you see this change in classname...I am not very sure about the version
        numbers though. But after we reverted BV we took a step back and this
        discrepancy has crept in because BV changed the filename from
        ConstraintPayload.java to Payload.java

        Show
        ne110415 added a comment - Ed, you can check my comments in 11023. This issue is most likely due to the same issue. Parts of GF are referring to older jsr 303 api versions. (I think from 4.0.1 to 4.0.0 you see this change in classname...I am not very sure about the version numbers though. But after we reverted BV we took a step back and this discrepancy has crept in because BV changed the filename from ConstraintPayload.java to Payload.java
        Hide
        sherryshen added a comment -

        cc

        Show
        sherryshen added a comment - cc
        Hide
        msreddy added a comment -

        Based on Ed, the fix is already in the source, now this integration with
        glassfish should resolve the issue.

        cvs commit -m "integration of samples version 0.9-b15 into glassfish"
        cvs commit: Examining .
        cvs commit: Examining packager
        cvs commit: Examining packager/javaee-samples-build
        cvs commit: Examining packager/javaee-samples-classic
        cvs commit: Examining packager/javaee-samples-full
        cvs commit: Examining packager/javaee-samples-web
        Checking in packager/javaee-samples-build/pom.xml;
        /m/jws/glassfish/packager/javaee-samples-build/pom.xml,v <-- pom.xml
        new revision: 1.15; previous revision: 1.14
        done
        Checking in packager/javaee-samples-full/pom.xml;
        /m/jws/glassfish/packager/javaee-samples-full/pom.xml,v <-- pom.xml
        new revision: 1.14; previous revision: 1.13
        done
        Checking in packager/javaee-samples-web/pom.xml;
        /m/jws/glassfish/packager/javaee-samples-web/pom.xml,v <-- pom.xml
        new revision: 1.15; previous revision: 1.14
        done

        Show
        msreddy added a comment - Based on Ed, the fix is already in the source, now this integration with glassfish should resolve the issue. cvs commit -m "integration of samples version 0.9-b15 into glassfish" cvs commit: Examining . cvs commit: Examining packager cvs commit: Examining packager/javaee-samples-build cvs commit: Examining packager/javaee-samples-classic cvs commit: Examining packager/javaee-samples-full cvs commit: Examining packager/javaee-samples-web Checking in packager/javaee-samples-build/pom.xml; /m/jws/glassfish/packager/javaee-samples-build/pom.xml,v <-- pom.xml new revision: 1.15; previous revision: 1.14 done Checking in packager/javaee-samples-full/pom.xml; /m/jws/glassfish/packager/javaee-samples-full/pom.xml,v <-- pom.xml new revision: 1.14; previous revision: 1.13 done Checking in packager/javaee-samples-web/pom.xml; /m/jws/glassfish/packager/javaee-samples-web/pom.xml,v <-- pom.xml new revision: 1.15; previous revision: 1.14 done
        Hide
        Alex Pineda added a comment -

        Verified fix works in build 73.

        Show
        Alex Pineda added a comment - Verified fix works in build 73.

          People

          • Assignee:
            msreddy
            Reporter:
            Alex Pineda
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: