Results 1 to 4 of 4

Thread: Java source code unavailable for type SRC_MAIN_JAVA

  1. #1
    Join Date
    Sep 2008
    Posts
    21

    Default Java source code unavailable for type SRC_MAIN_JAVA

    Hi all:
    Sometimes while adding my properties to the domain class gives strange error.

    ____ ____ ____
    / __ \/ __ \/ __ \
    / /_/ / / / / / / /
    / _, _/ /_/ / /_/ /
    /_/ |_|\____/\____/ 1.0.0.RELEASE [rev 564]


    Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
    roo> field string --fieldName name --class com.payroll.domain.CompanyDetails
    Java source code unavailable for type SRC_MAIN_JAVA/com.payroll.domain.CompanyDetails
    com.payroll.domain.CompanyDetails roo> field string --fieldName name
    Java source code unavailable for type SRC_MAIN_JAVA/com.payroll.domain.CompanyDetails
    com.payroll.domain.CompanyDetails roo> fi

    field boolean field date field email template field enum field number field other
    field reference field set field string finder add finder list
    com.payroll.domain.CompanyDetails roo> field s

    field set field string
    com.payroll.domain.CompanyDetails roo> field string --fieldName
    field string --fieldName
    required --fieldName: The name of the field to add; no default value
    com.payroll.domain.CompanyDetails roo> field string --fieldName name
    Java source code unavailable for type SRC_MAIN_JAVA/com.payroll.domain.CompanyDetails
    com.payroll.domain.CompanyDetails roo>

    not sure why that happens, i do have a domain class by name CompanyDetails

    any thoughts ?

    thanks
    rohit

  2. #2
    Join Date
    Sep 2008
    Posts
    21

    Default

    like to add very quickly here , i noticed a behaviour -

    if you create a domain class like below

    roo> entity --class ~.domain.CompanyDetails

    and then add a property

    roo> field string --fieldName name

    it works

    BUT

    if you try this (which is not a good idea , I think but sometimes you might need this as roo shell only shows 'roo>' at times and not the latest class we have been working on)

    roo> field string --fieldName name -- class com.stragure.payroll.domain.CompanyDetails


    it fails and gives an error
    Java source code unavailable for type SRC_MAIN_JAVA/com.payroll.domain.CompanyDetails


    thanks
    rohit

  3. #3
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Default

    Have you tried Roo 1.0.1?
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

  4. #4
    Join Date
    Sep 2008
    Posts
    21

    Default

    not yet - will try and post the results.

    thanks
    rohit

Posting Permissions

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