Announcement Announcement Module
Collapse
No announcement yet.
The specified target '--type' does not exist or can not be found. Please create this Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • The specified target '--type' does not exist or can not be found. Please create this

    When i run following command in Roo:

    Code:
    field reference --fieldName icon --type java.awt.image.BufferedImage
    I am getting following error

    Code:
    The specified target '--type' does not exist or can not be found. Please create this type first.
    How can i fix this? Shouldn't roo know the standard java classes?

  • #2
    The --type option is used to reference an existing entity in your own project, not some arbitrary class. As per the field help, "The Java type of the entity to reference"

    Comment


    • #3
      Originally posted by Alan Stewart View Post
      The --type option is used to reference an existing entity in your own project, not some arbitrary class. As per the field help, "The Java type of the entity to reference"
      Thanks for the reply but in this case how can i add my field? Do i need to edit the source code myself? If so, i dont think that this is a good design decision.

      Comment


      • #4
        The "field reference" command is used to create a many-to-one or one-to-one relationship to another entity.

        If you want to add your awt field, perhaps use the field other command, eg

        Code:
        roo> field other --class ~.domain.Foo --fieldName icon --type java.awt.image.BufferedImage
        Alan

        Comment


        • #5
          Originally posted by Alan Stewart View Post
          The "field reference" command is used to create a many-to-one or one-to-one relationship to another entity.

          If you want to add your awt field, perhaps use the field other command, eg

          Code:
          roo> field other --class ~.domain.Foo --fieldName icon --type java.awt.image.BufferedImage
          Alan
          Thanks for the answer but it is not working. I am getting this exception

          Code:
          org.hibernate.MappingException: Could not determine type for: java.awt.image.BufferedImage, at table: project, for columns: [org.hibernate.mapping.Column(icon)]

          Comment


          • #6
            So this is now a Hibernate issue, not a Roo issue?

            Can you try EclipseLink and OpenJPA as the provider?

            Comment

            Working...
            X