Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Flex Addon ! Working Walkthrough !

  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

  7. #7
    Join Date
    Jun 2010
    Posts
    440

    Default

    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

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

    Thumbs down 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...

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

    Default 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

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

    Thumbs down 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.

Posting Permissions

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