Results 1 to 7 of 7

Thread: getting the example to work

  1. #1
    Join Date
    May 2010
    Posts
    5

    Default getting the example to work

    Hello everyone,

    this is my first attempt do deal with spring webflow, so I'm a noob.


    First I want to make the examples work because if I can't even do that I'll probably won't be able to do anything with spring webflow 2.

    So I followed the instructions in the readme file.
    - Imported the the project into eclipse
    - set up IVY_Cache variable under preferences

    The result is I still get errors in eclipse on taglibs that can't be found. Here is what it looks like:
    http://www.bilder-hochladen.net/files/emh0-2-jpg.html

    I'm using Eclipse 3.4.2

    Any help is greatly appreciated. Thanks in advance.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    Build webflow/samples, refresh afterwards else the jar files including the classes and taglibs aren't available.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    May 2010
    Posts
    5

    Default

    Quote Originally Posted by Marten Deinum View Post
    Build webflow/samples, refresh afterwards else the jar files including the classes and taglibs aren't available.
    Thank you, unfortunately it didn't work.

    Now I tried to build everything outside eclipse, using ant from the spring webflow 2 distribution without dependencies. Doesn't work either:


    [ivy:cachepath] downloading s3://repository.springsource.com/ivy/bundles/externa
    l/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.sprin
    gsource.org.apache.commons.logging-1.1.1.jar ...
    [ivy:cachepath] .............. (60kB)
    [ivy:cachepath] (60kB)
    [ivy:cachepath] .. (0kB)
    [ivy:cachepath] (0kB)
    [ivy:cachepath] [SUCCESSFUL ] org.apache.commons#com.springsource.org.ap
    ache.commons.logging;1.1.1!com.springsource.org.ap ache.commons.logging.jar (1156
    ms)
    [ivy:cachepath] downloading s3://repository.springsource.com/ivy/bundles/release
    /org.springframework/org.springframework.beans/2.5.6.SEC01/org.springframework.b
    eans-2.5.6.SEC01.jar ...
    [ivy:cachepath] .............................................. (476kB)
    [ivy:cachepath] (476kB)
    [ivy:cachepath] .. (0kB)
    [ivy:cachepath] (0kB)
    [ivy:cachepath] [SUCCESSFUL ] org.springframework#org.springframework.be
    ans;2.5.6.SEC01!org.springframework.beans.jar (2469ms)
    ...
    ...
    ...
    org.springframework.build#org.springframew
    ork.build.ant;1.1.0.RELEASE!org.springframework.bu ild.ant.jar (1578ms)
    [ivy:cachepath] downloading s3://repository.springsource.com/ivy/bundles/externa
    l/org.eclipse.jdt/com.springsource.org.eclipse.jdt.core.compiler.bat ch/3.3.0/lic
    ense-3.3.0.txt ...
    [ivy:cachepath] .......... (10kB)
    [ivy:cachepath] (10kB)
    [ivy:cachepath] .. (0kB)
    [ivy:cachepath] (0kB)
    [ivy:cachepath] [SUCCESSFUL ] org.eclipse.jdt#com.springsource.org.eclip
    se.jdt.core.compiler.batch;3.3.0!license.txt(licen se) (1391ms)
    [ivy:cachepath] downloading s3://repository.springsource.com/ivy/bundles/externa
    l/org.eclipse.jdt/com.springsource.org.eclipse.jdt.core.compiler.bat ch/3.3.0/com
    .springsource.org.eclipse.jdt.core.compiler.batch-sources-3.3.0.jar ...
    [ivy:cachepath] (1201kB)
    [ivy:cachepath] downloading s3://repository.springsource.com/ivy/bundles/externa
    l/org.eclipse.jdt/com.springsource.org.eclipse.jdt.core.compiler.bat ch/3.3.0/com
    .springsource.org.eclipse.jdt.core.compiler.batch-3.3.0.jar ...
    [ivy:cachepath] ...........................................
    [ivy:cachepath] ...........................................
    [ivy:cachepath] ..........................................
    [ivy:cachepath] ... (1534kB)
    [ivy:cachepath] (1534kB)
    [ivy:cachepath] .. (0kB)
    [ivy:cachepath] (0kB)
    [ivy:cachepath] [SUCCESSFUL ] org.eclipse.jdt#com.springsource.org.eclip
    se.jdt.core.compiler.batch;3.3.0!com.springsource. org.eclipse.jdt.core.compiler.
    batch.jar (6281ms)
    [ivy:cachepath]
    [ivy:cachepath] :: problems summary ::
    [ivy:cachepath] :::: WARNINGS
    [ivy:cachepath] [FAILED ] org.eclipse.jdt#com.springsource.o
    rg.eclipse.jdt.core.compiler.batch;3.3.0!com.sprin gsource.org.eclipse.jdt.core.c
    ompiler.batch-sources.jar(src): F:\programmieren\WM2010\spring-webflow-2.0.9.REL
    EASE\projects\spring-binding\..\ivy-cache\repository\org.eclipse.jdt\com.springs
    ource.org.eclipse.jdt.core.compiler.batch\3.3.0\co m.springsource.org.eclipse.jdt
    .core.compiler.batch-sources-3.3.0.jar.part (The filename, directory name, or vo
    lume label syntax is incorrect) (390ms)
    [ivy:cachepath] [FAILED ] org.eclipse.jdt#com.springsource.o
    rg.eclipse.jdt.core.compiler.batch;3.3.0!com.sprin gsource.org.eclipse.jdt.core.c
    ompiler.batch-sources.jar(src): F:\programmieren\WM2010\spring-webflow-2.0.9.REL
    EASE\projects\spring-binding\..\ivy-cache\repository\org.eclipse.jdt\com.springs
    ource.org.eclipse.jdt.core.compiler.batch\3.3.0\co m.springsource.org.eclipse.jdt
    .core.compiler.batch-sources-3.3.0.jar.part (The filename, directory name, or vo
    lume label syntax is incorrect) (390ms)
    [ivy:cachepath] ==== bundle-external-repository: tried
    [ivy:cachepath] s3://repository.springsource.com/ivy/bundles/external/
    org.eclipse.jdt/com.springsource.org.eclipse.jdt.core.compiler.bat ch/3.3.0/com.s
    pringsource.org.eclipse.jdt.core.compiler.batch-sources-3.3.0.jar
    [ivy:cachepath] ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:cachepath] :: FAILED DOWNLOADS ::
    [ivy:cachepath] :: ^ see resolution messages for details ^ ::
    [ivy:cachepath] ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:cachepath] :: org.eclipse.jdt#com.springsource.org.eclipse.
    jdt.core.compiler.batch;3.3.0!com.springsource.org .eclipse.jdt.core.compiler.bat
    ch-sources.jar(src)
    [ivy:cachepath] ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:cachepath]
    [ivy:cachepath]
    [ivy:cachepath] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
    [subant] Leaving directory: F:\programmieren\WM2010\spring-webflow-2.0.9.RELE
    ASE\projects\spring-binding

    BUILD FAILED
    F:\programmieren\WM2010\spring-webflow-2.0.9.RELEASE\projects\spring-build\multi
    -bundle\artifact.xml:45: The following error occurred while executing this line:

    F:\programmieren\WM2010\spring-webflow-2.0.9.RELEASE\projects\spring-build\multi
    -bundle\common.xml:71: The following error occurred while executing this line:
    F:\programmieren\WM2010\spring-webflow-2.0.9.RELEASE\projects\spring-build\stand
    ard\artifact.xml:16: impossible to resolve dependencies:
    resolve failed - see output for details

    Total time: 1 minute 9 seconds
    F:\programmieren\WM2010\spring-webflow-2.0.9.RELEASE\projects\build-spring-webfl
    ow>
    My noobism must be more serious than I thought.

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    You are on windows, judging from some of the paths the path length exceeds the maximum length windows can handle and hence the build fails. Try putting the webflow directory in the root of F instead of F:\programmieren\WM2010\
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5
    Join Date
    May 2010
    Posts
    5

    Default

    Omg! Thank you.

    The build failed but it got way farther down the road (almost took 7 minutes) so your suggestion was correct. Maybe some path length are still too long?

    jar:
    [mkdir] Created dir: F:\spring-webflow-2.0.9.RELEASE\projects\spring-webflow
    -library\target\artifacts
    [copy] Copying 1 file to F:\spring-webflow-2.0.9.RELEASE\projects\spring-we
    bflow-library\target\artifacts
    :: delivering :: org.springframework.webflow#org.springframework.we bflow-library
    ;working@hell9000 :: 2.0.9.BUILD-20100503124843 :: integration :: Mon May 03 12:
    48:43 CEST 2010
    delivering ivy file to F:\spring-webflow-2.0.9.RELEASE\projects\spring-w
    ebflow-library\target\artifacts\ivy.xml
    :: publishing :: org.springframework.webflow#org.springframework.we bflow-library

    publish aborted: deleted F:\spring-webflow-2.0.9.RELEASE\projects\spring
    -webflow-library\..\integration-repo\org.springframework.webflow\org.springframe
    work.webflow-library\2.0.9.BUILD-20100503124843.part
    [subant] Leaving directory: F:\spring-webflow-2.0.9.RELEASE\projects\spring-w
    ebflow-library

    BUILD FAILED
    F:\spring-webflow-2.0.9.RELEASE\projects\spring-build\multi-bundle\artifact.xml:
    45: The following error occurred while executing this line:
    F:\spring-webflow-2.0.9.RELEASE\projects\spring-build\multi-bundle\common.xml:71
    : The following error occurred while executing this line:
    F:\spring-webflow-2.0.9.RELEASE\projects\spring-build\library\artifact.xml:27: i
    mpossible to publish artifacts for org.springframework.webflow#org.springframewo
    rk.webflow-library;working@hell9000: java.io.FileNotFoundException: F:\spring-we
    bflow-2.0.9.RELEASE\projects\spring-webflow-library\..\integration-repo\org.spri
    ngframework.webflow\org.springframework.webflow-library\2.0.9.BUILD-201005031248
    43.part\org.springframework.webflow-library-2.0.9.BUILD-20100503124843.libd.sha1
    (The filename, directory name, or volume label syntax is incorrect)

    Total time: 6 minutes 52 seconds
    F:\spring-webflow-2.0.9.RELEASE\projects\build-spring-webflow>
    If this persists I'll switch to linux - I guess no dev in here uses windows anyways or else someone would have stumbled upon this already... ^^ But there should be really a hint to this in the readme file or instructions elsewhere.

    Thank you for your help, I'm learning from this.

  6. #6
    Join Date
    May 2010
    Posts
    5

    Default

    New week, new attempt.

    Thanks for the help so far.

    I switched to Linux (opensuse 11.2) and carried on. After setting ANT_OPTS to a higher MaxPermSize the whole build process runs smoothly... until it tries to run the junit tests that is...

    The problem seems to be that ant doesn't find the classes for junit testing. Am I getting this right?
    Code:
    resolve.compile:
    [ivy:cachepath] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
    [ivy:cachepath] :: loading settings :: file = /home/horschte/spring3/projects/spring-build/common/ivysettings.xml
    
    resolve.test:
    
    compile.init:
    
    test.init:
    
    test.do:
        [mkdir] Created dir: /home/horschte/spring3/projects/org.springframework.core/target/test-classes
      [s:javac] Compiling 87 source files to /home/horschte/spring3/projects/org.springframework.core/target/test-classes
         [copy] Copying 4 files to /home/horschte/spring3/projects/org.springframework.core/target/test-classes
       [subant] Leaving directory: /home/horschte/spring3/projects/org.springframework.core
    
    BUILD FAILED
    /home/horschte/spring3/projects/spring-build/multi-bundle/quality.xml:28: The following error occurred while executing this line:
    /home/horschte/spring3/projects/spring-build/multi-bundle/common.xml:71: The following error occurred while executing this line:
    /home/horschte/spring3/projects/spring-build/common/quality.xml:54: The following error occurred while executing this line:
    /home/horschte/spring3/projects/spring-build/common/quality.xml:245: Problem: failed to create task or type junit
    Cause: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.
            This looks like one of Ant's optional components.
    Action: Check that the appropriate optional JAR exists in
            -/usr/share/ant/lib
            -/root/.ant/lib
            -a directory added on the command line with the -lib argument
    
    Do not panic, this is a common problem.
    The commonest cause is a missing JAR.
    
    This is not a bug; it is a configuration problem
    
    
    Total time: 1 minute 13 seconds
    linux-9pb9:/home/horschte/spring3/projects/build-spring-framework #
    Well, I didn't panic. Included the jars in the lib dir of ant.
    ant-junit.jar and junit-4.8.2.jar

    How can I find out which classpath ant currently sees? My approach was to change the quality.xml in [basespringdir]/projects/spring-build/common in the right fashion and add the missing classpath. Strange that ant doesn't recognize the jars in the lib dir...

    Any help would be greatly appreciated.

  7. #7
    Join Date
    May 2010
    Posts
    5

    Default

    I feel kind of embarressed now but I wanted to let all the other noobs out there know how I got it to work.

    After fiddling a while with trying to put the jars in the right folder, passing -lib options I just installed optional ant package ant-junit. That was not enough, ant-trax was needed, too. Perhaps someone can enlighten why this worked and trying to make ant aware of the jars didn't. After increasing MaxPermSize to 768M it finally went through - BUILD SUCCESSFUL. I hope other configuration stuff for Spring Web Flow isn't as bad. At least I'll be working in Eclipse, so there is some hope. ^^

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •