Announcement Announcement Module
Collapse
No announcement yet.
Petclinic Build Error (Plus Suggested Fix) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Petclinic Build Error (Plus Suggested Fix)

    Hi,

    I get latest code from CVS today. When I try run "build" target in samples\petclinic\build.xml, I get errors:
    Code:
    C:\stefano_cvshome\spring-richclient\samples\petclinic>ant build
    Buildfile: build.xml
    
    build:
        [javac] Compiling 13 source files to C:\stefano_cvshome\spring-richclient\samples\petclinic\classes
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\OwnerManagerView.java:53: package org.springframework.richclient.preference does not exist
        [javac] import org.springframework.richclient.preference.PreferenceStore;
        [javac]                                                  ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\preference\AppearancePreferencePage.java:51: package org.springframework.richclient.preference does not exist
        [javac] import org.springframework.richclient.preference.FormBackedPreferencePage;
        [javac]                                                  ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\preference\AppearancePreferencePage.java:59: cannot resolve symbol
        [javac] symbol  : class FormBackedPreferencePage
        [javac] location: class org.springframework.richclient.samples.petclinic.ui.preference.AppearancePreferencePage
        [javac] public class AppearancePreferencePage extends FormBackedPreferencePage {
        [javac]                                               ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\preference\PetClinicAppearance.java:35: package org.springframework.richclient.preference does not exist
        [javac] import org.springframework.richclient.preference.PreferenceStore;
        [javac]                                                  ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\preference\PetClinicAppearance.java:53: cannot resolve symbol
        [javac] symbol  : class PreferenceStore
        [javac] location: class org.springframework.richclient.samples.petclinic.ui.preference.PetClinicAppearance
        [javac]     public void load(PreferenceStore preferenceStore) {
        [javac]                      ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\OwnerManagerView.java:278: cannot resolve symbol
        [javac] symbol  : class PreferenceStore
        [javac] location: class org.springframework.richclient.samples.petclinic.ui.OwnerManagerView.PropertiesCommandExecutor
        [javac]             PreferenceStore ps = (PreferenceStore)getApplicationContext().getBean("preferenceStore");
        [javac]             ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\OwnerManagerView.java:278: cannot resolve symbol
        [javac] symbol  : class PreferenceStore
        [javac] location: class org.springframework.richclient.samples.petclinic.ui.OwnerManagerView.PropertiesCommandExecutor
        [javac]             PreferenceStore ps = (PreferenceStore)getApplicationContext().getBean("preferenceStore");
        [javac]                                   ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\preference\AppearancePreferencePage.java:79: cannot resolve symbol
        [javac] symbol  : method getPreferenceStore ()
        [javac] location: class org.springframework.richclient.samples.petclinic.ui.preference.AppearancePreferencePage
        [javac]         appearance.load(getPreferenceStore());
        [javac]                         ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\preference\AppearancePreferencePage.java:99: cannot resolve symbol
        [javac] symbol  : method getForm ()
        [javac] location: class org.springframework.richclient.samples.petclinic.ui.preference.AppearancePreferencePage
        [javac]         getForm().getValueModel("dialogPageType").setValue(CompositeDialogPageType.TREE);
        [javac]         ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\preference\AppearancePreferencePage.java:111: cannot resolve symbol
        [javac] symbol  : method getForm ()
        [javac] location: class org.springframework.richclient.samples.petclinic.ui.preference.AppearancePreferencePage
        [javac]         getForm().commit();
        [javac]         ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\preference\AppearancePreferencePage.java:117: cannot resolve symbol
        [javac] symbol  : method getPreferenceStore ()
        [javac] location: class org.springframework.richclient.samples.petclinic.ui.preference.AppearancePreferencePage
        [javac]         getPreferenceStore().setValue(PetClinicAppearance.DIALOG_PAGE_TYPE, appearance.getDialogPageType());
        [javac]         ^
        [javac] C:\stefano_cvshome\spring-richclient\samples\petclinic\src\org\springframework\richclient\samples\
    petclinic\ui\preference\AppearancePreferencePage.java:119: cannot resolve symbol
        [javac] symbol  : variable super
        [javac] location: class org.springframework.richclient.samples.petclinic.ui.preference.AppearancePreferencePage
        [javac]         return super.onFinish();
        [javac]                ^
        [javac] 12 errors
    
    BUILD FAILED
    file:C:/stefano_cvshome/spring-richclient/samples/petclinic/build.xml:46: Compile failed; see the compiler err
    or output for details.
    I figure out qa-portalpath missing this:
    Code:
    <include name="spring-richclient-sandbox.jar"/>
    So I fix that. Error go away but I get new error:
    Code:
    C&#58;\stefano_cvshome\spring-richclient\samples\petclinic>ant build
    Buildfile&#58; build.xml
    
    build&#58;
        &#91;javac&#93; Compiling 13 source files to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\classes
        &#91;mkdir&#93; Created dir&#58; C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist
        &#91;mkdir&#93; Created dir&#58; C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
    
    BUILD FAILED
    file&#58;C&#58;/stefano_cvshome/spring-richclient/samples/petclinic/build.xml&#58;57&#58; Warning&#58; Could not find file C&#58;\stefano_cvshome\spring-richclient\dist\spring-rcp-sandbox.jar to copy.
    Aha! Then I figure out this:
    Code:
    <copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;dist.lib.dir&#125;/spring-rcp-sandbox.jar"/>
    Should be this instead:
    Code:
    <copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;dist.lib.dir&#125;/spring-richclient-sandbox.jar"/>
    So I fix. Error go away, now get new one:
    Code:
    C&#58;\stefano_cvshome\spring-richclient\samples\petclinic>ant build
    Buildfile&#58; build.xml
    
    build&#58;
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
         &#91;copy&#93; Copying 1 file to C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\dist\lib
    
    BUILD FAILED
    file&#58;C&#58;/stefano_cvshome/spring-richclient/samples/petclinic/build.xml&#58;67&#58; Warning&#58; Could not find file C&#58;\stefano_cvshome\spring-richclient\lib\javahelp\jh.jar to copy.
    Anyway, I fix that one, then get more error, then fix that one, too. To make long story shorter, here is patch to fix all error today:
    Code:
    cvs -q diff -u build.xml &#40;in directory C&#58;\stefano_cvshome\spring-richclient\samples\petclinic\&#41;
    Index&#58; build.xml
    ===================================================================
    RCS file&#58; /cvsroot/spring-rich-c/spring-richclient/samples/petclinic/build.xml,v
    retrieving revision 1.5
    diff -u -r1.5 build.xml
    --- build.xml	30 Sep 2004 13&#58;51&#58;39 -0000	1.5
    +++ build.xml	12 Nov 2004 21&#58;41&#58;34 -0000
    @@ -11,6 +11,7 @@
     	<path id="qa-portalpath">
     		<fileset dir="$&#123;dist.lib.dir&#125;">
     			<include name="spring-richclient.jar"/>
    +			<include name="spring-richclient-sandbox.jar"/>
     		</fileset>
     		<fileset dir="$&#123;lib.dir&#125;">
     			<include name="**/**.jar"/>
    @@ -53,7 +54,7 @@
     		<copy todir="$&#123;dist.dir&#125;" file="$&#123;bin.dir&#125;/petclinic-standalone.bat"/>
     		<copy todir="$&#123;dist.dir&#125;" file="$&#123;bin.dir&#125;/petclinic-clientserver.bat"/>
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;dist.lib.dir&#125;/spring-richclient.jar"/>
    -		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;dist.lib.dir&#125;/spring-rcp-sandbox.jar"/>
    +		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;dist.lib.dir&#125;/spring-richclient-sandbox.jar"/>
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;dist.lib.dir&#125;/spring-richclient-resources.jar"/>
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/acegisecurity/acegi-security.jar"/>
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/aopalliance/aopalliance.jar"/>
    @@ -63,9 +64,9 @@
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/hsqldb/hsqldb.jar"/>
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/jakarta-commons/commons-codec.jar"/>
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/jakarta-commons/commons-logging.jar"/>
    -		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/javahelp/jh.jar"/>
    -		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/jgoodies-forms/forms.jar"/>
    -		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/jgoodies-looks/looks.jar"/>
    +		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/javahelp/javahelp.jar"/>
    +		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/jgoodies/forms.jar"/>
    +		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/jgoodies/looks.jar"/>
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/spring/spring.jar"/>
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/spring/spring-sandbox.jar"/>
     		<copy todir="$&#123;dist.dir&#125;/lib" file="$&#123;lib.dir&#125;/spring/spring-petclinic.jar"/>
    @@ -83,7 +84,7 @@
     			</fileset>
     			<manifest>
     				<attribute name="Main-Class" value="org.springframework.richclient.samples.petclinic.PetClinicStandalone"/>
    -				<attribute name="Class-Path" value="lib/acegi-security.jar lib/aopalliance.jar lib/burlap.jar lib/commons-codec.jar lib/commons-logging.jar lib/concurrent.jar lib/forms.jar lib/hessian.jar lib/hsqldb.jar lib/jh.jar lib/looks.jar lib/spring.jar lib/spring-sandbox.jar lib/spring-petclinic.jar lib/spring-richclient.jar lib/spring-rcp-sandbox.jar lib/spring-richclient-resources.jar"/>
    +				<attribute name="Class-Path" value="lib/acegi-security.jar lib/aopalliance.jar lib/burlap.jar lib/commons-codec.jar lib/commons-logging.jar lib/concurrent.jar lib/forms.jar lib/hessian.jar lib/hsqldb.jar lib/javahelp.jar lib/looks.jar lib/spring.jar lib/spring-sandbox.jar lib/spring-petclinic.jar lib/spring-richclient.jar lib/spring-rcp-sandbox.jar lib/spring-richclient-resources.jar"/>
     			</manifest>
     		</jar>
     		
    @@ -100,7 +101,7 @@
     			</fileset>
     			<manifest>
     				<attribute name="Main-Class" value="org.springframework.richclient.samples.petclinic.PetClinicClientServer"/>
    -				<attribute name="Class-Path" value="lib/acegi-security.jar lib/aopalliance.jar lib/burlap.jar lib/commons-codec.jar lib/commons-logging.jar lib/concurrent.jar lib/forms.jar lib/hessian.jar lib/hsqldb.jar lib/jh.jar lib/looks.jar lib/spring.jar lib/spring-sandbox.jar lib/spring-petclinic.jar lib/spring-richclient.jar lib/spring-richclient-resources.jar"/>
    +				<attribute name="Class-Path" value="lib/acegi-security.jar lib/aopalliance.jar lib/burlap.jar lib/commons-codec.jar lib/commons-logging.jar lib/concurrent.jar lib/forms.jar lib/hessian.jar lib/hsqldb.jar lib/javahelp.jar lib/looks.jar lib/spring.jar lib/spring-sandbox.jar lib/spring-petclinic.jar lib/spring-richclient.jar lib/spring-richclient-resources.jar"/>
     			</manifest>
     		</jar>
     
    @@ -120,8 +121,8 @@
        		<!-- Remove signature from Javahelp -->
     		<delete dir="$&#123;tmp.dir&#125;"/>
             <mkdir dir="$&#123;tmp.dir&#125;"/>
    -		<unjar src="$&#123;dist.dir&#125;/lib/jh.jar" dest="$&#123;tmp.dir&#125;"/>
    -		<jar update="false" jarfile="$&#123;dist.dir&#125;/lib/jh.jar">
    +		<unjar src="$&#123;dist.dir&#125;/lib/javahelp.jar" dest="$&#123;tmp.dir&#125;"/>
    +		<jar update="false" jarfile="$&#123;dist.dir&#125;/lib/javahelp.jar">
     			<fileset dir="$&#123;tmp.dir&#125;">
     				<include name="**/*"/>
     				<exclude name="META-INF/*"/>
    Now all works fine. Maybe is due to CVS propagation delay or maybe is due to bad checkins. No matter, it works with my fix.

    See you!

  • #2
    When try to run after building, I discover other errors. To fix, you basically need to change all references to some libraries that were renamed recently. In addition to my patch in post above, you have to also make these changes in "manifest" element in build.xml:
    jh.jar -> javahelp.jar
    spring-rcp-sandbox.jar -> spring-richclient-sandbox.jar

    Also in petclinic-standalone.bat, you have to make same changes for renamed libs.

    Now seems to build and run.

    Okay, Stefano out.

    Comment


    • #3
      Steve,

      Can you submit your patch as a file to me via email, or perhaps the dev list via email, or perhaps as a JIRA issue as an attachment? Really the forums aren't the best place for this kind of stuff--but thanks though, I really appreciate your work investigating/resolving this problem!

      Keith

      Comment


      • #4
        Originally posted by kdonald
        Can you submit your patch as a file to me via email, or perhaps the dev list via email, or perhaps as a JIRA issue as an attachment? Really the forums aren't the best place for this kind of stuff
        Is my bad, Donald. :oops:

        Okay, I post some patch for JIRA. Patch slightly different than above because some bug fix already on weekend, it look like.

        See bug number RCP-35.

        Okay, see you now.

        Comment


        • #5
          Donald, BTW, how often you check JIRA for new bugs? Seems forums are checked more often than JIRA. But could be wrong.

          Comment

          Working...
          X