Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Maven build hangs on simple Roo script

  1. #1
    Join Date
    Mar 2008
    Posts
    261

    Default Maven build hangs on simple Roo script

    I'm trying to run a Maven build on a newly created Roo project.

    But the build hangs, the console display stops at the Test phase.

    [INFO] Nothing to compile - all classes are up to date
    [INFO] [surefire:test {execution: default-test}]
    [INFO] Surefire report directory: /home/stephane/dev/java/projects/spring-roo/ajeter/data/target/surefire-reports

    -------------------------------------------------------
    T E S T S
    -------------------------------------------------------
    This occurs consistently. It occurs both on Maven 2.2.1 and on Maven 3.0.4.

    I run a Linux Mint box.

    I only run the two commands:

    Code:
    roo.sh script lms.roo
    mvn clean install
    Stephane

  2. #2
    Join Date
    Mar 2008
    Posts
    261

    Default The roo script.

    The roo script.
    Attached Files Attached Files
    Stephane

  3. #3
    Join Date
    Mar 2008
    Posts
    261

    Default

    Running the command:
    mvn -X -e clean test
    does not give a lot more:


    -------------------------------------------------------
    T E S T S
    -------------------------------------------------------
    Forking command line: /bin/sh -c cd /home/stephane/dev/java/projects/spring-roo/ajeter/data && /home/stephane/programs/jdk1.6.0_29/jre/bin/java -jar /home/stephane/dev/java/projects/spring-roo/ajeter/data/target/surefire/surefirebooter515377858181215462.jar /home/stephane/dev/java/projects/spring-roo/ajeter/data/target/surefire/surefire628953390200507817tmp /home/stephane/dev/java/projects/spring-roo/ajeter/data/target/surefire/surefire_05262971527775049412tmp
    Stephane

  4. #4
    Join Date
    Mar 2008
    Posts
    261

    Default The cpu is around 100

    The cpu is quite high..

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    5315 stephane 20 0 932m 331m 8860 S 102 11.0 0:38.60 java
    Stephane

  5. #5
    Join Date
    Mar 2008
    Posts
    261

    Default

    After a long hanging wait, I've now got more feedback:


    -------------------------------------------------------
    T E S T S
    -------------------------------------------------------
    Exception in thread "ThreadedStreamConsumer" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOfRange(Arrays.java:3209)
    at java.lang.String.<init>(String.java:215)
    at java.lang.StringBuilder.toString(StringBuilder.jav a:430)
    at org.apache.maven.plugin.surefire.report.TestSetRun Listener.getAsString(TestSetRunListener.java:213)
    at org.apache.maven.plugin.surefire.report.TestSetRun Listener.testError(TestSetRunListener.java:150)
    at org.apache.maven.plugin.surefire.booterclient.outp ut.ForkClient.consumeLine(ForkClient.java:115)
    at org.apache.maven.plugin.surefire.booterclient.outp ut.ThreadedStreamConsumer$Pumper.run(ThreadedStrea mConsumer.java:67)
    at java.lang.Thread.run(Thread.java:662)
    Exception in thread "Thread-1" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.util.Arrays.copyOf(Arrays.java:2882)
    at java.lang.AbstractStringBuilder.expandCapacity(Abs tractStringBuilder.java:100)
    at java.lang.AbstractStringBuilder.append(AbstractStr ingBuilder.java:515)
    at java.lang.StringBuffer.append(StringBuffer.java:30 6)
    at java.io.BufferedReader.readLine(BufferedReader.jav a:345)
    at java.io.BufferedReader.readLine(BufferedReader.jav a:362)
    at org.codehaus.plexus.util.cli.StreamPumper.run(Stre amPumper.java:129)
    But even after setting the variable:

    export JVM_ARGS="-Xmx1024m -XX:MaxPermSize=1024m"
    the problem remained the same.

    I guess the memory heap space message came up because the process had been hanging for a very long time.
    Last edited by stephaneeybert; Oct 8th, 2012 at 08:22 AM.
    Stephane

  6. #6
    Join Date
    Mar 2008
    Posts
    261

    Default

    The build does not hang if running on a much smaller database schema.

    I tried the same script against a database schema that only contains two tables and it did not hang.
    Stephane

  7. #7
    Join Date
    Mar 2008
    Posts
    261

    Default

    I also tried setting the variable:
    export MAVEN_OPTS="-Xmx1024M -XX:MaxPermSize=1024m"
    the problem remained the same.
    Stephane

  8. #8
    Join Date
    Mar 2008
    Posts
    261

    Default

    The schema has 127 tables, it's not so uncommon.

    And I have hand coded in another Spring project (not a Roo one), a Dao with lots of integration tests, against the same database schema, and it works just fine.
    Last edited by stephaneeybert; Oct 9th, 2012 at 11:13 AM.
    Stephane

  9. #9
    Join Date
    Mar 2008
    Posts
    261

    Default

    Here is where it hangs:

    -------------------------------------------------------
    T E S T S
    -------------------------------------------------------
    Forking command line: /bin/sh -c cd /home/stephane/dev/java/projects/spring-roo/learnintouch/data && /home/stephane/programs/jdk1.6.0_29/jre/bin/java -jar /home/stephane/dev/java/projects/spring-roo/learnintouch/data/target/surefire/surefirebooter3683447800132461289.jar /home/stephane/dev/java/projects/spring-roo/learnintouch/data/target/surefire/surefire968319973164727757tmp /home/stephane/dev/java/projects/spring-roo/learnintouch/data/target/surefire/surefire_03812166631428931851tmp
    Stephane

  10. #10
    Join Date
    Nov 2007
    Posts
    14

    Default

    Hi,

    Has anyone found a solution for this?

    Thanks,
    Rosh

Posting Permissions

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