Results 1 to 3 of 3

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

  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Default 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. #2
    Join Date
    Jun 2008
    Location
    Philadelphia, PA, USA
    Posts
    212

    Default

    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.
    Ken Rimple
    Chariot Solutions
    email: krimple@chariotsolutions.com
    work: www.chariotsolutions.com/education
    personal: www.rimple.com

    Author: Spring Roo in Action (Manning)
    MEAP Site: manning.com/rimple

  3. #3
    Join Date
    Oct 2012
    Posts
    2

    Default

    Quote 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

Posting Permissions

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