Announcement Announcement Module
Collapse
No announcement yet.
Newbie problem with STS, Roo and 'premature end of file' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbie problem with STS, Roo and 'premature end of file'

    Hello all,
    I am a newbie, please be gentle!
    I've been following some tutorials
    http://duckranger.com/2012/04/spring...-add-some-jpa/
    and I am hitting a problem when trying to set up JPA with STS and ROO.
    I'm running Kubuntu / Linux and I'm using
    JDK 1.7.0_05
    STS 2.9.2

    I've tried ROO
    1.1.5
    1.2.2

    I basically open a new roo shell

    I've tried the following commands

    jpa setup --provider HIBERNATE --database MYSQL
    jpa setup --provider HIBERNATE --database H2_IN_MEMORY

    Both of which give me

    ____ ____ ____
    / __ \/ __ \/ __ \
    / /_/ / / / / / / /
    / _, _/ /_/ / /_/ /
    /_/ |_|\____/\____/ 1.2.2.RELEASE [rev 7d75659]


    Welcome to Spring Roo. For assistance press CTRL+SPACE or type "hint" then hit ENTER.
    roo> jpa setup --provider HIBERNATE --database H2_IN_MEMORY
    Premature end of file.
    roo>

    I've read a bit about this but cannot seem to get anywhere.

    One post said try Roo 1.1.5, which I have tried (use 'persistence' in command not JPA) - I get the same results.

    Nothing of any relevance appears in my Eclipse logs.

    Any tips would be greatly appreciated,

    Many thanks
    Kai

  • #2
    I don't see a project creation command. You'd need project --topLevelPackage...

    Can you try this:

    mkdir somedir
    cd /somedir
    roo script wedding.roo

    If that works, then I am guessing it's your configuration. Do you have the JDK in your path, or a JRE? Can you do a java -fullversion and give us the complete JDK you're using (openjdk, etc)?

    Roo 1.1.5 is old. It will work, but will give you an older Spring configuration and comes with its own bugs. You're better off with a 1.2 code line.

    Comment


    • #3
      Originally posted by krimple View Post
      I don't see a project creation command. You'd need project --topLevelPackage...

      Can you try this:

      mkdir somedir
      cd /somedir
      roo script wedding.roo

      If that works, then I am guessing it's your configuration. Do you have the JDK in your path, or a JRE? Can you do a java -fullversion and give us the complete JDK you're using (openjdk, etc)?

      Roo 1.1.5 is old. It will work, but will give you an older Spring configuration and comes with its own bugs. You're better off with a 1.2 code line.
      Krimple,
      Thank you for your reply and my apologies for the late response.
      OK, I've cured this problem, it was er, a schoolboy error. When I ran the command, Roo initially complained that it could not find src/main/resources/META_INF/spring/applicationContext.xml. As per the tutorial (comments at the bottom) I just created it manually, but with no real content (via STS new->xml file). This was the premature end of file. I did it so quickly I dismissed it. When I went back to the file and added the usual header details, the problem went away.

      Thanks again for your help
      Kai

      Comment

      Working...
      X