Announcement Announcement Module
No announcement yet.
STS pizzashop - List doesn't show, and create gives "resource not found" Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS pizzashop - List doesn't show, and create gives "resource not found"

    I'm new to Spring Roo. Trying to get the pizzashop example to work.
    I got it to work fine on two machines at work that have Windows 7. But I can't make it work on my home Mac. It's a 2011 MacBook Air. I'm using the latest x64 STS. I've tried re-installing it, etc. I know the fact that is is on a MAC shouldn't matter, but I can't think of what else is different for such a simple example.

    The problem that occurs is... when I create a simple example... it will not show the "List all [domain object]" link. And on the "create" link, it gives me a "resource not found" error. I narrowed it down to the example below.

    This doesn't happen on my Windows machines, and here's another odd thing... It doesn't occur when I start out the project only using the Roo shell that comes bundled with STS. But as soon as I move the project to STS, and i try adding domain objects or fields, and refreshing using "web mvc all --package ~.web"... it won't refresh accordingly.

    I zipped up the project and placed here (i wasn't able to upload as an attachment to this post):

    I'm not expert in roo nor Spring, etc to figure out what is missing. If someone could take a look and let me know, i'd greatly appreciate.

    Below is the roo log file.. note the first line was generated using the GUI (creating the project via STS):

    project --topLevelPackage com.springsource.pizzashop --projectName pizzashop --java 6 --packaging JAR
    jpa setup --provider ECLIPSELINK --database H2_IN_MEMORY
    entity jpa --class ~.domain.Base --activeRecord false --testAutomatically
    field string --fieldName name --sizeMin 2 --notNull
    web mvc setup
    web mvc all --package ~.web

  • #2
    If you're following the pizzashop.roo example script that's bundled with the Roo runtime you'll need to give it these couple of lines that are missing from the snippet you've posted:

    // Define a repository layer for persistence
    repository jpa --interface ~.repository.BaseRepository --entity ~.domain.Base
    // Define a service/facade layer
    service --interface ~.service.BaseService --entity ~.domain.Base
    The first command gave me the "List all Bases" link that was missing from the web page. The second command made the links functional. Let me know if that doesn't work for you, but it seems that maybe you skipped over a command or two from the pizzashop sample script.


    • #3
      Thanks so much for replying... It looks like I didn't have as good an understanding of "which commmand did what" as much as I thought... Yes, with the commands you mentioned, it looks like it is working the way I expected.
      Tx again,