Announcement Announcement Module
Collapse
No announcement yet.
Flex Addon ! Working Walkthrough ! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 07:23 AM.

  • #2
    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

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment


        • #5
          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, http://dl.dropbox.com/u/249163/image...29%2008.33.jpg

          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.

          Comment


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

            A field with name 'RainType' already exists

            Comment


            • #7
              The believe I walked this road months ago...

              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.
              Actually you can do something better...
              You can start with ROO 1.1.0M1 and the very first Flex addon published. Sorry I forgot the version. Create the project and then update to the latest Roo. Continue development using Flash Builder plugin.

              This is the way I created-circa Sep 2010-following Flex app: http://pragmatikroo.org/gnc/gnc-debug/gnc.html.

              A least you get the project setup and the back end stuff this way.
              B. Roogards
              jD

              Comment


              • #8
                More samples

                I REALLY want to get Flex ROO working for many reasons, so if I can help by showing what I did and the results, I will.

                Best results I have had were with STS 2.5.2 and org.springframework.flex.roo.addon-1.0.0.BUILD-20110219.075648-225

                I was able to get the Wedding Example to run, so I have high hopes.

                Something is very touchy and it doesn't handle errors well. Here is the roo.log on a small sample.

                Code:
                // Spring Roo 1.1.1.RELEASE [rev 156ccd6] log opened at 2011-04-30 06:34:19
                project --topLevelPackage com.corenttech.care --projectName CARE3 --java 6
                // Spring Roo 1.1.1.RELEASE [rev 156ccd6] log closed at 2011-04-30 06:34:25
                // Spring Roo 1.1.1.RELEASE [rev 156ccd6] log opened at 2011-04-30 06:34:27
                persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT 
                flex setup
                entity --class ~.Actions --abstract false --testAutomatically true --mappedSuperclass false --serializable false --permitReservedWords false 
                field number --fieldName ID --type java.lang.Long --notNull true --nullRequired false --comment PK --transient false --primitive false --unique true --permitReservedWords false 
                field string --fieldName ActionName --notNull true --nullRequired false --sizeMin 4 --sizeMax 128 --transient false --unique false --permitReservedWords false 
                field string --fieldName ActionDescription --notNull false --nullRequired false --sizeMax 255 --transient false --unique false --permitReservedWords false 
                field string --fieldName ActionScript --notNull true --nullRequired false --sizeMax 30000 --transient false --unique false --permitReservedWords false 
                field string --fieldName AttachmentType --notNull true --nullRequired false --sizeMin 3 --sizeMax 50 --transient false --unique false --permitReservedWords false 
                field string --fieldName ActionAttachmentFileName --notNull true --nullRequired false --sizeMax 255 --transient false --unique false --permitReservedWords false 
                field string --fieldName ActionAttachmentFilePath --notNull true --nullRequired false --sizeMax 255 --transient false --unique false --permitReservedWords false 
                field string --fieldName BuilderWidgetSWCPath --notNull false --nullRequired false --sizeMax 255 --transient false --unique false --permitReservedWords false 
                // [failed] flex remoting all --package ~.service 
                flex remoting all --package ~.service 
                logging setup --level DEBUG
                To be continued...

                Comment


                • #9
                  Samples Part 2

                  Part 2

                  Note that the first time I tried flex remoting all it failed. Here is the Roo Shell to match.

                  Code:
                  roo> persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT 
                  Updated ROOT\pom.xml [Removed redundant artifacts]
                  Updated SRC_MAIN_RESOURCES\META-INF\spring\applicationContext.xml
                  Created SRC_MAIN_RESOURCES\META-INF\persistence.xml
                  Created SRC_MAIN_RESOURCES\META-INF\spring\database.properties
                  Updated ROOT\pom.xml [Added dependencies org.hsqldb:hsqldb:1.8.0.10, org.hibernate:hibernate-core:3.6.0.Final, org.hibernate:hibernate-entitymanager:3.6.0.Final, org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final, org.hibernate:hibernate-validator:4.1.0.Final, javax.validation:validation-api:1.0.0.GA, cglib:cglib-nodep:2.2, javax.transaction:jta:1.1, org.springframework:spring-jdbc:${spring.version}, org.springframework:spring-orm:${spring.version}, commons-pool:commons-pool:1.5.4, commons-dbcp:commons-dbcp:1.3]
                  Updated ROOT\pom.xml [Added repository https://repository.jboss.org/nexus/content/repositories/releases]
                  roo> flex setup
                  Created SRC_MAIN_WEBAPP\WEB-INF\flex
                  Created SRC_MAIN_WEBAPP\WEB-INF\flex\services-config.xml
                  Created SRC_MAIN_WEBAPP\WEB-INF\spring
                  Created SRC_MAIN_WEBAPP\WEB-INF\spring\flex-config.xml
                  Created SRC_MAIN_WEBAPP\WEB-INF\spring\webmvc-config.xml
                  Created SRC_MAIN_WEBAPP\WEB-INF\web.xml
                  Updated SRC_MAIN_WEBAPP\WEB-INF\web.xml
                  Updated ROOT\pom.xml [Added dependency org.springframework:spring-web:${spring.version}]
                  Updated ROOT\pom.xml [Added dependency org.springframework:spring-webmvc:${spring.version}]
                  Updated ROOT\pom.xml [Added dependency org.springframework.webflow:spring-js-resources:2.2.1.RELEASE]
                  Updated ROOT\pom.xml [Added dependency commons-digester:commons-digester:2.0]
                  Updated ROOT\pom.xml [Added dependency commons-fileupload:commons-fileupload:1.2.1]
                  Updated ROOT\pom.xml [Added dependency javax.servlet:jstl:1.2]
                  Updated ROOT\pom.xml [Added dependency javax.el:el-api:1.0]
                  Updated ROOT\pom.xml [Added dependency joda-time:joda-time:1.6]
                  Updated ROOT\pom.xml [Added dependency javax.servlet.jsp:jsp-api:2.1]
                  Updated ROOT\pom.xml [Updated project type to war]
                  Updated SRC_MAIN_WEBAPP\WEB-INF\spring\webmvc-config.xml
                  Updated ROOT\pom.xml [Added dependency com.adobe.flex.framework:flex-framework:4.0.0.14159]
                  Updated ROOT\pom.xml [Added dependency org.springframework.flex:spring-flex-core:1.5.0.BUILD-SNAPSHOT]
                  Updated ROOT\pom.xml [Added dependency org.springframework.flex.roo.addon:org.springframework.flex.roo.annotations:1.0.0.BUILD-SNAPSHOT]
                  Updated ROOT\pom.xml
                  Updated ROOT\pom.xml [Added repository spring-external]
                  Updated ROOT\pom.xml [Added repository flex]
                  Updated ROOT\pom.xml [Added plugin flexmojos-maven-plugin]
                  Updated ROOT\pom.xml [Removed plugin maven-eclipse-plugin]
                  Updated ROOT\pom.xml [Added plugin maven-eclipse-plugin]
                  Updated ROOT\pom.xml
                  Created ROOT\.flexProperties
                  Created ROOT\.actionScriptProperties
                  Created ROOT\src\main\flex\CARE3_scaffold.mxml
                  Created SRC_MAIN_WEBAPP\CARE3_scaffold.html
                  Created SRC_MAIN_WEBAPP\playerProductInstall.swf
                  Created SRC_MAIN_WEBAPP\textLayout_1.0.0.595.swf
                  Created SRC_MAIN_WEBAPP\sparkskins_4.0.0.14159.swf
                  Created SRC_MAIN_WEBAPP\swfobject.js
                  Created SRC_MAIN_WEBAPP\spark_4.0.0.14159.swf
                  Created SRC_MAIN_WEBAPP\rpc_4.0.0.14159.swf
                  Created SRC_MAIN_WEBAPP\framework_4.0.0.14159.swf
                  Created SRC_MAIN_WEBAPP\osmf_flex.4.0.0.13495.swf
                  Created SRC_MAIN_WEBAPP\history
                  Created SRC_MAIN_WEBAPP\history\history.css
                  Created SRC_MAIN_WEBAPP\history\historyFrame.html
                  Created SRC_MAIN_WEBAPP\history\history.js
                  Created ROOT\html-template
                  Created ROOT\html-template\index.template.html
                  Created ROOT\html-template\playerProductInstall.swf
                  Created ROOT\html-template\swfobject.js
                  Created ROOT\html-template\history
                  Created ROOT\html-template\history\history.css
                  Created ROOT\html-template\history\historyFrame.html
                  Created ROOT\html-template\history\history.js
                  Created ROOT\src\main\flex\CARE3_scaffold-config.xml
                  roo> entity --class ~.Actions --abstract false --testAutomatically true --mappedSuperclass false --serializable false --permitReservedWords false 
                  Created SRC_MAIN_JAVA\com\corenttech\care
                  Created SRC_MAIN_JAVA\com\corenttech\care\Actions.java
                  Created SRC_TEST_JAVA\com\corenttech\care
                  Created SRC_TEST_JAVA\com\corenttech\care\ActionsDataOnDemand.java
                  Created SRC_TEST_JAVA\com\corenttech\care\ActionsIntegrationTest.java
                  Created SRC_MAIN_JAVA\com\corenttech\care\Actions_Roo_Entity.aj
                  Created SRC_MAIN_JAVA\com\corenttech\care\Actions_Roo_ToString.aj
                  Created SRC_MAIN_JAVA\com\corenttech\care\Actions_Roo_Configurable.aj
                  Created SRC_TEST_JAVA\com\corenttech\care\ActionsDataOnDemand_Roo_DataOnDemand.aj
                  Created SRC_TEST_JAVA\com\corenttech\care\ActionsDataOnDemand_Roo_Configurable.aj
                  Created SRC_TEST_JAVA\com\corenttech\care\ActionsIntegrationTest_Roo_IntegrationTest.aj
                  Deleted SRC_MAIN_JAVA\com\corenttech\care\Actions_Roo_ToString.aj
                  Created SRC_TEST_JAVA\com\corenttech\care\ActionsIntegrationTest_Roo_Configurable.aj
                  ~.Actions roo> Updated SRC_MAIN_JAVA\com\corenttech\care\Actions.java
                  ...
                  field number --fieldName ID --type java.lang.Long --notNull true --nullRequired false --comment PK --transient false --primitive false --unique true --permitReservedWords false 
                  ~.Actions roo> Updated SRC_MAIN_JAVA\com\corenttech\care\Actions.java
                  Updated SRC_TEST_JAVA\com\corenttech\care\ActionsDataOnDemand_Roo_DataOnDemand.aj
                  field string --fieldName ActionName --notNull true --nullRequired false --sizeMin 4 --sizeMax 128 --transient false --unique false --permitReservedWords false 
                  Updated SRC_MAIN_JAVA\com\corenttech\care\Actions_Roo_ToString.aj
                  Updated SRC_MAIN_JAVA\com\corenttech\care\Actions_Roo_JavaBean.aj
                  ~.Actions roo> Updated SRC_MAIN_JAVA\com\corenttech\care\Actions.java
                  Updated SRC_TEST_JAVA\com\corenttech\care\ActionsDataOnDemand_Roo_DataOnDemand.aj
                  Updated SRC_MAIN_JAVA\com\corenttech\care\Actions_Roo_ToString.aj
                  field string --fieldName ActionDescription --notNull false --nullRequired false --sizeMax 255 --transient false --unique false --permitReservedWords false 
                  Updated SRC_MAIN_JAVA\com\corenttech\care\Actions_Roo_JavaBean.aj
                  ~.Actions roo> Updated SRC_MAIN_JAVA\com\corenttech\care\Actions.java
                  ...
                  field string --fieldName ActionScript --notNull true --nullRequired false --sizeMax 30000 --transient false --unique false --permitReservedWords false 
                  ~.Actions roo> Updated SRC_MAIN_JAVA\com\corenttech\care\Actions.java
                  field string --fieldName AttachmentType --notNull true --nullRequired false --sizeMin 3 --sizeMax 50 --transient false --unique false --permitReservedWords false 
                  ...
                  ~.Actions roo> Updated SRC_MAIN_JAVA\com\corenttech\care\Actions.java
                  Updated SRC_TEST_JAVA\com\corenttech\care\ActionsDataOnDemand_Roo_DataOnDemand.aj
                  field string --fieldName ActionAttachmentFileName --notNull true --nullRequired false --sizeMax 255 --transient false --unique false --permitReservedWords false 
                  ...
                  ~.Actions roo> Updated SRC_MAIN_JAVA\com\corenttech\care\Actions.java
                  ...
                  field string --fieldName ActionAttachmentFilePath --notNull true --nullRequired false --sizeMax 255 --transient false --unique false --permitReservedWords false 
                  ~.Actions roo> Updated SRC_MAIN_JAVA\com\corenttech\care\Actions.java
                  Updated SRC_TEST_JAVA\com\corenttech\care\ActionsDataOnDemand_Roo_DataOnDemand.aj
                  field string --fieldName BuilderWidgetSWCPath --notNull false --nullRequired false --sizeMax 255 --transient false --unique false --permitReservedWords false 
                  ...
                  ~.Actions roo> Created SRC_MAIN_JAVA\com\corenttech\care\service
                  Created SRC_MAIN_JAVA\com\corenttech\care\service\ActionsService.java
                  flex remoting all --package ~.service 
                  Created ROOT\src\main\flex\com\corenttech\care
                  Created ROOT\src\main\flex\com\corenttech\care\Actions.as
                  Updated ROOT\src\main\flex\CARE3_scaffold.mxml
                  Updated ROOT\src\main\flex\CARE3_scaffold-config.xml
                  Created ROOT\src\main\flex\com\corenttech\care\presentation\actions
                  Created ROOT\src\main\flex\com\corenttech\care\presentation\actions\ActionsEvent.as
                  Created ROOT\src\main\flex\com\corenttech\care\presentation\actions\ActionsView.mxml
                  Created ROOT\src\main\flex\com\corenttech\care\presentation\actions\ActionsForm.mxml
                  Undo manage ROOT\src\main\flex\CARE3_scaffold-config.xml
                  Undo manage ROOT\src\main\flex\CARE3_scaffold.mxml
                  Undo create ROOT\src\main\flex\com\corenttech\care\presentation\actions\ActionsForm.mxml
                  Undo create ROOT\src\main\flex\com\corenttech\care\presentation\actions\ActionsView.mxml
                  Undo create ROOT\src\main\flex\com\corenttech\care\presentation\actions\ActionsEvent.as
                  Undo create ROOT\src\main\flex\com\corenttech\care\presentation\actions
                  Undo manage ROOT\src\main\flex\CARE3_scaffold-config.xml
                  Undo manage ROOT\src\main\flex\CARE3_scaffold.mxml
                  Undo create ROOT\src\main\flex\com\corenttech\care\Actions.as
                  Undo create ROOT\src\main\flex\com\corenttech\care
                  Undo create SRC_MAIN_JAVA\com\corenttech\care\service\ActionsService.java
                  Undo create SRC_MAIN_JAVA\com\corenttech\care\service
                  A field with name 'ActionAttachmentFileName' already exists
                  ~.Actions roo> flex remoting all --package ~.service 
                  Created SRC_MAIN_JAVA\com\corenttech\care\service
                  Created SRC_MAIN_JAVA\com\corenttech\care\service\ActionsService.java
                  Created SRC_MAIN_JAVA\com\corenttech\care\service\ActionsService_Roo_Service.aj
                  ~.Actions roo> 
                  required --level: The log level to configure; no default value
                  ~.Actions roo> logging setup --level DEBUG 
                  Updated SRC_MAIN_RESOURCES\log4j.properties
                  ~.Actions roo>
                  I think it has to do with the error that caused it to Undo everything with
                  A field with name 'ActionAttachmentFileName' already exists
                  Running flex remoting all --package ~.service then does NOT create the same things, leading to running it not showing any Entities.

                  To be continued

                  Comment


                  • #10
                    Samples Part 3

                    Part 3
                    I think it has to do with the error that caused it to Undo everything with
                    A field with name 'ActionAttachmentFileName' already exists
                    Running flex remoting all --package ~.service then does NOT create the same things, leading to running it not showing any Entities.

                    So I tried

                    Code:
                    Created SRC_MAIN_JAVA\com\corenttech\care\service\ActionsService2.java
                    ~.Actions roo> flex remoting scaffold --name ~.service.ActionsService2 --entity ~.Actions 
                    Updated ROOT\src\main\flex\CARE3_scaffold.mxml
                    Updated ROOT\src\main\flex\CARE3_scaffold-config.xml
                    Created ROOT\src\main\flex\com\corenttech\care\presentation\actions
                    Created ROOT\src\main\flex\com\corenttech\care\presentation\actions\ActionsEvent.as
                    Created ROOT\src\main\flex\com\corenttech\care\presentation\actions\ActionsView.mxml
                    Created ROOT\src\main\flex\com\corenttech\care\presentation\actions\ActionsForm.mxml
                    Created SRC_MAIN_JAVA\com\corenttech\care\service\ActionsService2_Roo_Service.aj
                    ~.Actions roo>
                    No Entities listed when I run it.

                    Since I do see the Rsvp entity listed when running the Flex Wedding example, I decided to compare the two projects thinking the difference will point to the problem.

                    CARE3_scaffold.mxml and FlexWedding_scaffold.mxml are virtually identical, except the package path.

                    So given the "entities" array list was the same and not displaying in CARE3 but displaying in FlexWedding, I assumed the CARE3_scaffold.swf was simply not updated. I deleted it and did a restart of STS.

                    I got
                    An internal error occurred during: "Initialize CompilationUnit Manager".
                    java.lang.NullPointerException
                    I also noted several Errors related to ROO Projects that I have deleted like
                    Java Model Exception: Java Model Status [CARESpring does not exist]
                    at org.eclipse.jdt.internal.core.JavaElement.newJavaM odelException(JavaElement.java:502)
                    at org.eclipse.jdt.internal.core.Openable.generateInf os(Openable.java:246)
                    at org.eclipse.jdt.internal.core.JavaElement.openWhen Closed(JavaElement.java:515)
                    at org.eclipse.jdt.internal.core.JavaElement.getEleme ntInfo(JavaElement.java:252)
                    at org.eclipse.jdt.internal.core.JavaElement.getEleme ntInfo(JavaElement.java:238)
                    at org.eclipse.jdt.internal.core.JavaProject.getJavaP rojectElementInfo(JavaProject.java:1603)
                    at org.eclipse.jdt.internal.core.JavaProject.newNameL ookup(JavaProject.java:2282)
                    at org.eclipse.jdt.internal.core.SearchableEnvironmen t.<init>(SearchableEnvironment.java:57)
                    at org.eclipse.jdt.internal.core.SearchableEnvironmen t.<init>(SearchableEnvironment.java:64)
                    at org.eclipse.jdt.internal.core.JavaProject.init$_ar oundBody2(JavaProject.java:2307)
                    at org.eclipse.jdt.internal.core.JavaProject.newSearc hableNameEnvironment(JavaProject.java:2307)
                    at org.eclipse.jdt.internal.core.NamedMember.resolveT ype(NamedMember.java:253)
                    at org.eclipse.jdt.internal.core.NamedMember.resolveT ype(NamedMember.java:245)
                    at org.springframework.ide.eclipse.core.java.JdtUtils .resolveClassName(JdtUtils.java:596)
                    at org.springframework.ide.eclipse.core.java.classrea ding.JdtAnnotationUtils.processAnnotation(JdtAnnot ationUtils.java:73)
                    at org.springframework.ide.eclipse.core.java.classrea ding.JdtAnnotationUtils.processAnnotation(JdtAnnot ationUtils.java:46)
                    at org.springframework.ide.eclipse.core.java.classrea ding.JdtAnnotationMetadata.init(JdtAnnotationMetad ata.java:105)
                    at org.springframework.ide.eclipse.core.java.classrea ding.JdtAnnotationMetadata.<init>(JdtAnnotationMet adata.java:43)
                    at org.springframework.ide.eclipse.core.java.classrea ding.JdtMetadataReader.getAnnotationMetadata(JdtMe tadataReader.java:35)
                    at org.springframework.context.annotation.Configurati onClassBeanDefinitionReader.checkConfigurationClas sCandidate(ConfigurationClassBeanDefinitionReader. java:301)
                    at org.springframework.context.annotation.Configurati onClassPostProcessor.processConfigBeanDefinitions( ConfigurationClassPostProcessor.java:172)
                    at com.springsource.sts.ide.metadata.process.JdtConfi gurationClassPostProcessor.postProcess(JdtConfigur ationClassPostProcessor.java:58)
                    at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig$4.run(BeansConfig.java:695)
                    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
                    at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig.executePostProcessor(BeansConf ig.java:688)
                    at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig.postProcess(BeansConfig.java:5 80)
                    at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig.access$6(BeansConfig.java:539)
                    at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig$3.call(BeansConfig.java:424)
                    at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig$3.call(BeansConfig.java:1)
                    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
                    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
                    at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
                    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
                    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
                    at java.lang.Thread.run(Thread.java:662)
                    I couldn't seem to force the generation of the swf (probably just my ignorance) but I thought adding another Entity would, so

                    Code:
                    entity --class ActionProperties --abstract false --testAutomatically true --mappedSuperclass false --serializable false --permitReservedWords false 
                    Created SRC_TEST_JAVA\com\corenttech\care\ActionPropertiesIntegrationTest_Roo_IntegrationTest.aj
                    Created SRC_TEST_JAVA\com\corenttech\care\ActionPropertiesDataOnDemand_Roo_DataOnDemand.aj
                    Created SRC_TEST_JAVA\com\corenttech\care\ActionPropertiesDataOnDemand_Roo_Configurable.aj
                    Deleted SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_ToString.aj
                    Created SRC_TEST_JAVA\com\corenttech\care\ActionPropertiesIntegrationTest_Roo_Configurable.aj
                    ~.ActionProperties roo> Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties.java
                    Updated SRC_TEST_JAVA\com\corenttech\care\ActionPropertiesDataOnDemand_Roo_DataOnDemand.aj
                    Created SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_ToString.aj
                    Created SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_JavaBean.aj
                    field number --fieldName ID --type java.lang.Long --notNull true --nullRequired false --transient false --primitive false --unique true --permitReservedWords false 
                    ~.ActionProperties roo> field string APropertyName --notNull 
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties.java
                    Updated SRC_TEST_JAVA\com\corenttech\care\ActionPropertiesDataOnDemand_Roo_DataOnDemand.aj
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_ToString.aj
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_JavaBean.aj
                    ~.ActionProperties roo> field string APropertyType --notNull 
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties.java
                    Updated SRC_TEST_JAVA\com\corenttech\care\ActionPropertiesDataOnDemand_Roo_DataOnDemand.aj
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_ToString.aj
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_JavaBean.aj
                    ~.ActionProperties roo> field string APropertyValidator 
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties.java
                    Updated SRC_TEST_JAVA\com\corenttech\care\ActionPropertiesDataOnDemand_Roo_DataOnDemand.aj
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_ToString.aj
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_JavaBean.aj
                    ~.ActionProperties roo> field string APropertyDefault
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties.java
                    Updated SRC_TEST_JAVA\com\corenttech\care\ActionPropertiesDataOnDemand_Roo_DataOnDemand.aj
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_ToString.aj
                    Updated SRC_MAIN_JAVA\com\corenttech\care\ActionProperties_Roo_JavaBean.aj
                    ~.ActionProperties roo> flex remoting scaffold --name ~.service.ActionPropertiesService --entity com.corenttech.care.ActionProperties 
                    Created SRC_MAIN_JAVA\com\corenttech\care\service\ActionPropertiesService.java
                    Created ROOT\src\main\flex\com\corenttech\care\ActionProperties.as
                    Undo create ROOT\src\main\flex\com\corenttech\care\ActionProperties.as
                    Undo create SRC_MAIN_JAVA\com\corenttech\care\service\ActionPropertiesService.java
                    A field with name 'APropertyDefault' already exists
                    ~.ActionProperties roo>
                    Again it threw that "already exists" and Undo of the service and .as

                    I also noted the presentation mxml was not generated for the ActionProperties Entity.

                    Running it again in the ROO Shell...

                    Code:
                    ~.ActionProperties roo> flex remoting scaffold --name ~.service.ActionPropertiesService --entity com.corenttech.care.ActionProperties 
                    Created SRC_MAIN_JAVA\com\corenttech\care\service\ActionPropertiesService.java
                    Updated ROOT\src\main\flex\CARE3_scaffold.mxml
                    Updated ROOT\src\main\flex\CARE3_scaffold-config.xml
                    Created ROOT\src\main\flex\com\corenttech\care\presentation\actionproperties
                    Created ROOT\src\main\flex\com\corenttech\care\presentation\actionproperties\ActionPropertiesEvent.as
                    Created ROOT\src\main\flex\com\corenttech\care\presentation\actionproperties\ActionPropertiesView.mxml
                    Created ROOT\src\main\flex\com\corenttech\care\presentation\actionproperties\ActionPropertiesForm.mxml
                    Created SRC_MAIN_JAVA\com\corenttech\care\service\ActionPropertiesService_Roo_Service.aj
                    ~.ActionProperties roo>
                    Now did not throw the "already exists" error and generated the ActionProperties presentation mxml.

                    But still no new CARE3_scaffold.swf

                    So I did a clean of the project and rebuild.

                    Comment


                    • #11
                      Samples Part 4

                      Part 4 final

                      The console on the build...

                      4/30/11 8:27:48 AM CST: [ERROR] C:\Users\user\Documents\workspace-sts-2.5.2.RELEASE-FB4\CARE3\src\main\flex\com\corenttech\care\presen tation\actions\ActionsEvent.as:[15,59] Type was not found or was not a compile-time constant: Actions. public function ActionsEvent(type:String, actions:Actions, bubbles:Boolean = true, cancelable:Boolean = false)
                      4/30/11 8:27:48 AM CST: [ERROR] C:\Users\user\Documents\workspace-sts-2.5.2.RELEASE-FB4\CARE3\src\main\flex\com\corenttech\care\presen tation\actionproperties\ActionPropertiesEvent.as:[15,77] Type was not found or was not a compile-time constant: ActionProperties. public function ActionPropertiesEvent(type:String, actionProperties:ActionProperties, bubbles:Boolean = true, cancelable:Boolean = false)
                      So I looked at ActionPropertiesEvent.as...

                      Code:
                      package com.corenttech.care.presentation.actionproperties
                      {
                          import flash.events.Event;
                      
                          import com.corenttech.care.ActionProperties;
                      
                          public class ActionPropertiesEvent extends Event
                          {
                              public static const CREATE:String = "actionPropertiesCreate";
                              public static const UPDATE:String = "actionPropertiesUpdate";
                              public static const DELETE:String = "actionPropertiesDelete";
                      
                              public var actionProperties:ActionProperties;
                              
                              public function ActionPropertiesEvent(type:String, actionProperties:ActionProperties, bubbles:Boolean = true, cancelable:Boolean = false)
                              {
                                  this.actionProperties = actionProperties;
                                  super(type, bubbles, cancelable);
                              }
                          }
                      }
                      I don't see anything wrong or different from the FlexWedding example.

                      Ok Sorry for this long post, but I hope it helps zero in on the problem.

                      Lastly here is the Error Log from the Build.

                      org.apache.maven.lifecycle.LifecycleExecutionExcep tion: Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1:compile-swf (compile-scaffold-swf) on project CARE3: Error compiling!
                      at org.apache.maven.lifecycle.internal.MojoExecutor.e xecute(MojoExecutor.java:203)
                      at org.apache.maven.lifecycle.internal.MojoExecutor.e xecute(MojoExecutor.java:148)
                      at org.apache.maven.lifecycle.internal.MojoExecutor.e xecute(MojoExecutor.java:140)
                      at org.apache.maven.lifecycle.internal.LifecycleModul eBuilder.buildProject(LifecycleModuleBuilder.java: 84)
                      at org.apache.maven.lifecycle.internal.LifecycleModul eBuilder.buildProject(LifecycleModuleBuilder.java: 59)
                      at org.apache.maven.lifecycle.internal.LifecycleStart er.singleThreadedBuild(LifecycleStarter.java:183)
                      at org.apache.maven.lifecycle.internal.LifecycleStart er.execute(LifecycleStarter.java:161)
                      at org.apache.maven.DefaultMaven.doExecute(DefaultMav en.java:314)
                      at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:151)
                      at org.maven.ide.eclipse.internal.embedder.MavenImpl. execute(MavenImpl.java:223)
                      at org.maven.ide.eclipse.internal.project.GenericBuil dParticipant.executePostBuild(GenericBuildParticip ant.java:138)
                      at org.maven.ide.eclipse.internal.project.GenericBuil dParticipant.build(GenericBuildParticipant.java:77 )
                      at org.maven.ide.eclipse.internal.builder.MavenBuilde r.build(MavenBuilder.java:153)
                      at org.eclipse.core.internal.events.BuildManager$2.ru n(BuildManager.java:629)
                      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
                      at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:172)
                      at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:203)
                      at org.eclipse.core.internal.events.BuildManager$1.ru n(BuildManager.java:255)
                      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
                      at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:258)
                      at org.eclipse.core.internal.events.BuildManager.basi cBuildLoop(BuildManager.java:311)
                      at org.eclipse.core.internal.events.BuildManager.buil d(BuildManager.java:343)
                      at org.eclipse.core.internal.events.AutoBuildJob.doBu ild(AutoBuildJob.java:144)
                      at org.eclipse.core.internal.events.AutoBuildJob.run( AutoBuildJob.java:242)
                      at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:54)
                      Caused by: org.apache.maven.plugin.MojoExecutionException: Error compiling!
                      at org.sonatype.flexmojos.compiler.AbstractCompilerMo jo.callCompiler(AbstractCompilerMojo.java:1141)
                      at org.sonatype.flexmojos.compiler.AbstractCompilerMo jo.run(AbstractCompilerMojo.java:2403)
                      at org.sonatype.flexmojos.AbstractIrvinMojo.execute(A bstractIrvinMojo.java:155)
                      at org.apache.maven.plugin.DefaultBuildPluginManager. executeMojo(DefaultBuildPluginManager.java:107)
                      at org.apache.maven.lifecycle.internal.MojoExecutor.e xecute(MojoExecutor.java:195)
                      ... 24 more
                      So it looks like a maven Mojo problem, I will try to dig deeper.

                      I also noted that Flex Roo seems to keep projects in its queue that have been deleted as I get errors on projects that have been deleted.

                      Comment


                      • #12
                        My Mojo

                        Code:
                        <repository>
                                    <id>flex</id>
                                    <url>http://repository.sonatype.org/content/groups/flexgroup</url>
                                    <name>Sonatype Flex Repo</name>
                                </repository>
                            </repositories>


                        yes I can access it from here.

                        Comment

                        Working...
                        X