Source Code for Roo Project?
I'm reading this book online through safari books online - "You need to install the tables, whichare available as part of this book’s source code download, as roo_crm.sql." Well eh - where? Why not just include the few lines of SQL (in an appendix if needed)...
-
Hi Peter,
which book are referring to specifically? the only book on ROO I see in our catalog here is:
Getting Started with Roo
http://oreilly.com/catalog/0636920020981
Is that the one?
Cheers,
Tai Hake
Customer Service Rep,
O'Reilly Media -
-
Yep, page 15 mentions the "book’s source code download" but there is nothing to download in http://my.safaribooksonline.com/book/...
-
-
-
-
Not that complicated to do this on our own:
CREATE TABLE COMPANY (
COMPANY_ID BIGINT,
COMPANY VARCHAR(255),
PRIMARY KEY (COMPANY_ID)
);
CREATE TABLE PRODUCT (
PRODUCT_ID BIGINT,
NAME VARCHAR,
DESCRIPTION VARCHAR(1000),
PRICE DOUBLE,
PRIMARY KEY (PRODUCT_ID)
);
CREATE TABLE CUSTOMER (
CUSTOMER_ID BIGINT,
LAST_NAME VARCHAR,
FIRST_NAME VARCHAR,
COMPANY_ID BIGINT,
PRIMARY KEY (CUSTOMER_ID),
FOREIGN KEY (COMPANY_ID) REFERENCES COMPANY(COMPANY_ID)
);
CREATE TABLE CART_ORDER (
CART_ORDER_ID BIGINT,
DATE_OF_ORDER DATE,
CUSTOMER_ID BIGINT,
PRIMARY KEY (CART_ORDER_ID),
FOREIGN KEY (CUSTOMER_ID) REFERENCES CUSTOMER(CUSTOMER_ID)
);
CREATE TABLE LINE_ITEM (
LINE_ITEM_ID BIGINT,
PRODUCT_ID BIGINT,
QUANTITY BIGINT,
CART_ORDER_ID BIGINT,
PRIMARY KEY (LINE_ITEM_ID),
FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCT(PRODUCT_ID),
FOREIGN KEY (CART_ORDER_ID) REFERENCES CART_ORDER(CART_ORDER_ID)
);
Page 14 probably should have been: "field string --fieldName firstName"--notNull -
-
-
I was thinking there would be more source code examples which i normally find in the manning books, but thanks anyway
-
-
Was anybody else able to download the spring roo Bot for neo4j.
-
-
What's the problem? Just 'use the Roo Bot' for downloading and 'installing' the reqiured stuff by executing:
pgp trust --keyId 0x29C2D8FD
addon search graph
addon install id --searchResultId 01
And now we have to create a new Roo-project (followed by the described steps)...to see the neo4j data-graph version of the crm-example. -
-
And now I'm delayed by not creating the LineItem as a graph entity as described on page 33:
graph relationship --from ~.model.CartOrder --to ~.model.Product --via
~.model.LineItem --fieldName items --cardinality ONE_TO_MANY
I' just receive the following error message:
NullPointerException at org.springframework.roo.addon.graph.GraphMetadata$1.addRelationshipMethods(GraphMetadata.java:168)
(spring-data-neo4j.version. 1.1.0.RC1; the final AnnotationMetadata annotation seems to be null...)
Anyone any idea?-
Looks like command in the book example is missing REQUIRED option '--type'. Although it is listed as 'Optional' in documentation the code really cannot run without it.
This version of command fixed it
graph relationship --from ~.model.CartOrder --to ~.model.Product --via ~.model.LineItem --fieldName items --type "ITEMS" --cardinality ONE_TO_MANY
Without '--type' I was getting the same NPE, just at different line, because they've updated the released version.
NullPointerException at org.springframework.roo.addon.graph.GraphMetadata$1.addRelationshipMethods(GraphMetadata.java:173) -
-
-
-
-
-
I am stuck too. The LineItem.java already existed so when i tried when it was already there. it was giving an error LineItem.java already exists and after deleting its giving this exception..
-
-
Finally (from the eclipse roo-shell) the 'graph-relationship-via'-command created code (LineItem and annotated CartOrder) and compiled without errors
but
...
bought dearly by playing 2 hours with versions of
roo version: 1.1.4.RELEASE (and 1.1.5.RELEASE)
neo4j.version: 1.4.1 (and 1.4.1)
spring-data-neo4j.version: 1.1.0.RELEASE (and 1.1.0RC1)
and last but not least:
aspectj.version 1.6.12.M1 (and 1.6.12.M2)
In addition I amended some code by hand to get rid of compile errors: CartOrder: @RelatedToVia(type="HAS_ORDER", elementClass = LineItem.class, direction = Direction.OUTGOING))
I'm confused - and not yet able to recreate the steps...it's a mess. -
-
I think Spring Roo is not the right choice for me. I prefer Spring Data JPA for Entities. Plus using JSPX. shucks!! I hated it. I still have to try out the GWT and Vaadin Plugin. Vaadin is quite a nice framework. Lets hope it matures enough.
-
-
The experienced problem is not caused by Roo - which is really fine.
It is the neo4j graph database integration/addon that is not yet 'stable' (see also http://forum.springsource.org/showthr....
The integrations of the typical used relational databases are working.-
The only error was:
graph relationship --from ~.model.CartOrder --to ~.model.Product --via ~.model.LineItem --fieldName items --type "ITEMS" --cardinality ONE_TO_MANY
I did the steps again with it fix and all ok -
-
-
-
-
-
-
If anyone needs the the DDL for the CRM table please let me know. You can request this material by emailing us at booktech@oreilly.com and I can send it to you directly. We're trying to get it posted online as well.
-
-
Thanks for the hint but unfortunately (not having) the DDL is the slightest problem (see above)
-
-
If you got stuck in the database reverse engineering process, maybe this helps you out:
- download h2 and run it from the bin directory
- open the h2 console and connect to jdbc:h2:~/roo_crm
- run the sql provided by the user Orca above
- then run the database reverse engineer command again in the roo shell
probably optional:
- sequentially open every $ENTITY_Roo_DbManaged.aj file, cut out the fields and paste them into the corresponding $ENTITY.java file
- in front of every field name remove $ENTITY and the subsequent dot
where $ENTITY is the class name like "Product" or "Customer".-
correct me if I'm wrong for I'm a n00b. What I did was that I opened the dbmanaged,aj files but went to the outline to the right and looked closely and there were the fields, plus the setters and getter methods. So i dragged just the fields into the jav file. It then created the beans.
-
-
-
-
Loading Profile...



Twitter,
Facebook, or email.

EMPLOYEE


