Results 1 to 10 of 12

Thread: Flex Addon ! Working Walkthrough !

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Posts
    4

    Default Flex Addon ! Working Walkthrough !

    UPDATED: You need to download SpringSource 2.6
    and use the Spring Roo 1.1.3 release that comes packaged with the sts, as well as using the flex addon from...

    the most recent nightly build from here

    http://s3browse.springsource.com/bro...UILD-SNAPSHOT/

    and the annotations jar from

    http://s3browse.springsource.com/bro...UILD-SNAPSHOT/


    Setup the Roo Environment variables

    ROO_HOME = installed roo dir
    Add %ROO_HOME%\bin to your path variable


    Put the flex addon and annotations jars into your %ROO_HOME%\bundle directory

    (you may have to rename your flex addon jar and annotations jar, this may or may not be the case but its something I did and it seemed to resolve an error, if you have any errors about it expecting to find the jar you have included but the name is different rename them to the following...)

    org.springframework.flex.roo.addon.jar
    org.springframework.flex.roo.annotations-1.0.0.BUILD-SNAPSHOT.jar



    The procedure to start a new project is...

    1. Open SpringSource Tool Suite
    2. File -> New Spring Roo Project
    3. Give the project a name and package name, project type standard
    4. Make sure your using Roo 1.1.3.RELEASE
    5. Then click Finish


    Once the project is generated double click on the "pom.xml" then click the "pom.xml" tab at the bottom of the Overview, inside the xml insert the following tag inside of the <respositories> area...

    Code:
    <repository>
    <id>spring-snapshot</id>
    <name>Spring Portfolio Snapshot Repository</name>
    <url>http://maven.springframework.org/snapshot</url>
    <releases>
    <enabled>false</enabled>
    </releases>
    <snapshots>
    <enabled>true</enabled>
    </snapshots>
    </repository>

    (The next step is probably optional, but I always setup my database first) Then setup your persistence... for example "persistence setup --provider HIBERNATE --database H2_IN_MEMORY"

    Finally type "flex setup" and your project will be prepared to work with flex, then you should be able to use the flex remoting all / flex remoting scaffold commands!

    Now I hope we can get this for AIR too!
    Last edited by jblouir; Apr 20th, 2011 at 06:23 AM.

  2. #2
    Join Date
    Jun 2008
    Location
    Philadelphia, PA, USA
    Posts
    212

    Default

    That doesn't work for me. I followed your instructions exactly, trying various snapshots from April 18 to 20. I'm using Roo 1.1.3 on OS X. I get this error with the flex remoting all command:

    Code:
    roo> flex remoting all --package org.rooina.coursemgr.flex.scaffold
    Created SRC_MAIN_JAVA/org/rooina/coursemgr/flex/scaffold
    Created SRC_MAIN_JAVA/org/rooina/coursemgr/flex/scaffold/ScheduledCourseService.java
    Created ROOT/src/main/flex/org/rooina/coursemgr/flex/model
    Created ROOT/src/main/flex/org/rooina/coursemgr/flex/model/ScheduledCourse.as
    Created ROOT/src/main/flex/org/rooina/coursemgr/flex/model/Room.as
    Created ROOT/src/main/flex/org/rooina/coursemgr/flex/model/Course.as
    Created ROOT/src/main/flex/org/rooina/coursemgr/flex/model/Curriculum.as
    Created ROOT/src/main/flex/org/rooina/coursemgr/flex/model/Registration.as
    Created SRC_MAIN_JAVA/org/rooina/coursemgr/flex/scaffold/CurriculumService.java
    Created SRC_MAIN_JAVA/org/rooina/coursemgr/flex/scaffold/RoomService.java
    Created SRC_MAIN_JAVA/org/rooina/coursemgr/flex/scaffold/CourseService.java
    Created SRC_MAIN_JAVA/org/rooina/coursemgr/flex/scaffold/RegistrationService.java
    Exception in thread "Spring Roo JLine Shell" java.lang.NoClassDefFoundError: org/springframework/roo/addon/web/mvc/controller/details/WebMetadataUtils
    	at org.springframework.flex.roo.addon.FlexScaffoldMetadataProvider.getMetadata(FlexScaffoldMetadataProvider.java:92)
    	at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:270)
    	at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:148)
    	at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:82)
    	at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:147)
    	at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:235)
    	at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:214)
    	at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131)
    	at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:330)
    	at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:213)
    	at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:189)
    	at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:143)
    	at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
    	at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:182)
    	at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:373)
    	at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:134)
    	at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: org.springframework.roo.addon.web.mvc.controller.details.WebMetadataUtils not found by org.springframework.roo.addon.web.mvc.controller [32]
    	at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
    	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
    	at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    	at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:645)
    	at org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:99)
    	at org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1390)
    	at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:722)
    	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
    	at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    	... 17 more
    Any idea why this is happening? Anyone else getting this?

    Ken
    Ken Rimple
    Chariot Solutions
    email: krimple@chariotsolutions.com
    work: www.chariotsolutions.com/education
    personal: www.rimple.com

    Author: Spring Roo in Action (Manning)
    MEAP Site: manning.com/rimple

  3. #3
    Join Date
    Apr 2011
    Posts
    4

    Default

    Hi Krimple, i have not come across that error before, I have actually given up any hope of getting Roo to work, even after doing the instructions above there were still a few things there were off even in my own installation that just were too much of an issue to continue to use it, if I could modify this thread I would probably say "might work" if your lucky, im not sure what else to do, I spent ages trying all different versions of roo, sts, flex addon, and absolutely no joy, apart from the solution above which worked partially for me. Im not sure what else to suggest, heck I even did the exact versions that were shown in the 15 minute flex addon introduction videos from the spring sight and still no luck. I would love to use roo, obviously but I gave up in the end, the above instructions gave me the best results I had.

  4. #4

    Unhappy I'm with you

    I believe even the developers of flex roo are having trouble specifying which version of STS + Roo + flex addon is a good combination...
    I have also downloaded STS 2.5.2 to try the 'stable', 'production' version with absolutely no luck, I've been doing this for more than one week now.... Moving my project away from roo

  5. #5
    Join Date
    Nov 2010
    Location
    Santo Domingo, Albay Philippines
    Posts
    158

    Unhappy Mega Ditto No luck

    First I tried on my big machine, Win 7 Ultimate (64bit) with quad core and 8GB Ram, Java 6, STS 2.6 and the snapshot builds for flex roo add on and annotations as per above, first with 290 then 291. No luck and Roo shell would hang.

    So I moved to a smaller machine Win 7 Ultimate (32bit), also quad core and 4 GB Ram, Java 6, STS 2.6. Before adding the flex add on jars I tested Roo on its own and AOK!

    I then added the two jars for flex with snapshot build 291. It didn't hang, and I did the following steps:

    Code:
    // Spring Roo 1.1.3.RELEASE [rev 4404ffb] log opened at 2011-04-29 08:00:03
    project --topLevelPackage com.corenttech.flex --projectName OneRooFlex --java 6
    // Spring Roo 1.1.3.RELEASE [rev 4404ffb] log closed at 2011-04-29 08:00:08
    // modified pom as directed to add snapshot repository
    // Spring Roo 1.1.3.RELEASE [rev 4404ffb] log opened at 2011-04-29 08:00:17
    persistence setup --database DERBY --provider HIBERNATE 
    entity --class Rain --testAutomatically 
    field string RainType --notNull 
    field string Description
    flex setup
    flex remoting all --package com.corenttech.flex
    I then tried it and http://localhost:8080/OneRooFlex/One..._scaffold.html

    Showed the Flex screen, but not complete,

    I think until someone can spend the time to get the kinks out, the Flex ROO add on is more work than it saves. The BlazeDS integration with Spring, coupled to Flash Builder Plugin to STS seems like the best bet for now.

  6. #6
    Join Date
    Nov 2010
    Location
    Santo Domingo, Albay Philippines
    Posts
    158

    Default

    It may not mean anything but when I did the flex remoting all it showed

    A field with name 'RainType' already exists

Posting Permissions

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