FAQ
Hi,

I have a Maven build that hangs and I wonder what to do to get some feedback
like a message or stack trace or dump..

I'm stuck trying to run some integration tests
http://forum.springsource.org/showthread.php?130859-Maven-build-hangs-on-simple-Roo-script&p=426888&posted=1#post426888

Thanks
Stephane



--
View this message in context: http://maven.40175.n5.nabble.com/What-diagnostic-action-to-take-when-Maven-hangs-tp5725345.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

Search Discussions

  • Ron Wheeler at Oct 9, 2012 at 6:34 pm
    What is it doing when it hangs.

    It is CPU bound, IO bound or waiting for roo to access a database or
    remote service?

    On which test is it hanging?
    What does that test do?

    Do you have lots of debug statements in your tests?

    Just some ideas to think about.

    Ron
    On 09/10/2012 2:15 PM, Stephane-3 wrote:
    Hi,

    I have a Maven build that hangs and I wonder what to do to get some feedback
    like a message or stack trace or dump..

    I'm stuck trying to run some integration tests
    http://forum.springsource.org/showthread.php?130859-Maven-build-hangs-on-simple-Roo-script&p=426888&posted=1#post426888

    Thanks
    Stephane



    --
    View this message in context: http://maven.40175.n5.nabble.com/What-diagnostic-action-to-take-when-Maven-hangs-tp5725345.html
    Sent from the Maven - Users mailing list archive at Nabble.com.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org

    --
    Ron Wheeler
    President
    Artifact Software Inc
    email: rwheeler@artifact-software.com
    skype: ronaldmwheeler
    phone: 866-970-2435, ext 102


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Stephane-3 at Oct 9, 2012 at 8:00 pm
    Hello,

    How can I find out if it is CPU or OI bound ?

    It hangs before the very first test.

    The test is an integration test, connecting to a MySql database schema.

    For now my test is very simple:

    @RooIntegrationTest(entity = Address.class)
    public class AddressIntegrationTest {

    @Before
    public void beforeAnyTest() throws Exception {
    }

    @After
    public void afterAnyTest() throws Exception {
    }

    @Test
    @Transactional
    public void testSaveAndRetrieve() {
    AddressDataOnDemand dod = new AddressDataOnDemand();
    Address address = dod.getRandomAddress();
    assertNotNull(address.getId());
    Integer version = address.getVersion();
    addressRepository.saveAndFlush(address);
    assertTrue(version != address.getVersion());
    }

    }

    Doing a Ctrl-C gives me back the prompt but I don't see any console output
    like a dump.

    This test is within a Spring Roo application.

    I also created a pure Spring application last year, not a Roo one, with lots
    of integration tests against a Dao layer on the very same MySql database
    schema. And this Maven project builds fine. But not the Roo one.



    --
    View this message in context: http://maven.40175.n5.nabble.com/What-diagnostic-action-to-take-when-Maven-hangs-tp5725345p5725358.html
    Sent from the Maven - Users mailing list archive at Nabble.com.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Ron Wheeler at Oct 9, 2012 at 8:17 pm
    Adding some logging to the tests would help.

    In Windows, you can use Task Manager to see what your processes are doing.
    In Linux, top will tell you.

    Ron
    On 09/10/2012 3:59 PM, Stephane-3 wrote:
    Hello,

    How can I find out if it is CPU or OI bound ?

    It hangs before the very first test.

    The test is an integration test, connecting to a MySql database schema.

    For now my test is very simple:

    @RooIntegrationTest(entity = Address.class)
    public class AddressIntegrationTest {

    @Before
    public void beforeAnyTest() throws Exception {
    }

    @After
    public void afterAnyTest() throws Exception {
    }

    @Test
    @Transactional
    public void testSaveAndRetrieve() {
    AddressDataOnDemand dod = new AddressDataOnDemand();
    Address address = dod.getRandomAddress();
    assertNotNull(address.getId());
    Integer version = address.getVersion();
    addressRepository.saveAndFlush(address);
    assertTrue(version != address.getVersion());
    }

    }

    Doing a Ctrl-C gives me back the prompt but I don't see any console output
    like a dump.

    This test is within a Spring Roo application.

    I also created a pure Spring application last year, not a Roo one, with lots
    of integration tests against a Dao layer on the very same MySql database
    schema. And this Maven project builds fine. But not the Roo one.



    --
    View this message in context: http://maven.40175.n5.nabble.com/What-diagnostic-action-to-take-when-Maven-hangs-tp5725345p5725358.html
    Sent from the Maven - Users mailing list archive at Nabble.com.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org

    --
    Ron Wheeler
    President
    Artifact Software Inc
    email: rwheeler@artifact-software.com
    skype: ronaldmwheeler
    phone: 866-970-2435, ext 102


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Curtis Rueden at Oct 9, 2012 at 8:23 pm
    Hi Stephane,
    Doing a Ctrl-C gives me back the prompt but I don't see any console
    output like a dump.
    Not Ctrl-C. Use Ctrl+\ (Linux/Mac/etc.) or Ctrl+Pause (Windows).

    HTH,
    Curtis

    On Tue, Oct 9, 2012 at 2:59 PM, Stephane-3 wrote:

    Hello,

    How can I find out if it is CPU or OI bound ?

    It hangs before the very first test.

    The test is an integration test, connecting to a MySql database schema.

    For now my test is very simple:

    @RooIntegrationTest(entity = Address.class)
    public class AddressIntegrationTest {

    @Before
    public void beforeAnyTest() throws Exception {
    }

    @After
    public void afterAnyTest() throws Exception {
    }

    @Test
    @Transactional
    public void testSaveAndRetrieve() {
    AddressDataOnDemand dod = new AddressDataOnDemand();
    Address address = dod.getRandomAddress();
    assertNotNull(address.getId());
    Integer version = address.getVersion();
    addressRepository.saveAndFlush(address);
    assertTrue(version != address.getVersion());
    }

    }

    Doing a Ctrl-C gives me back the prompt but I don't see any console output
    like a dump.

    This test is within a Spring Roo application.

    I also created a pure Spring application last year, not a Roo one, with
    lots
    of integration tests against a Dao layer on the very same MySql database
    schema. And this Maven project builds fine. But not the Roo one.



    --
    View this message in context:
    http://maven.40175.n5.nabble.com/What-diagnostic-action-to-take-when-Maven-hangs-tp5725345p5725358.html
    Sent from the Maven - Users mailing list archive at Nabble.com.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Curtis Rueden at Oct 9, 2012 at 7:23 pm
    Hi Stephane,
    I have a Maven build that hangs and I wonder what to do to get some
    feedback like a message or stack trace or dump..
    Did you try Ctrl+\ (or Ctrl+Pause on Windows) from the console to do a full
    thread dump? It might shed some light on what is going on. You can also run
    Maven in debug mode ("mvn -X") to potentially get more information about
    where things hang.

    HTH,
    Curtis

    On Tue, Oct 9, 2012 at 1:15 PM, Stephane-3 wrote:

    Hi,

    I have a Maven build that hangs and I wonder what to do to get some
    feedback
    like a message or stack trace or dump..

    I'm stuck trying to run some integration tests

    http://forum.springsource.org/showthread.php?130859-Maven-build-hangs-on-simple-Roo-script&p=426888&posted=1#post426888

    Thanks
    Stephane



    --
    View this message in context:
    http://maven.40175.n5.nabble.com/What-diagnostic-action-to-take-when-Maven-hangs-tp5725345.html
    Sent from the Maven - Users mailing list archive at Nabble.com.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Ron Wheeler at Oct 9, 2012 at 7:53 pm
    From the original post, it appears that the hang is in the testing
    phase so I am not sure how much information will come out in a dump or
    Maven debug mode but it will not hurt anything.

    I am more suspicious about a test with a loop that does not terminate or
    a test with a set of bad credentials or a bad URL that is causing a
    remote operation or database access to fail and go into a wait state.

    Ron
    On 09/10/2012 3:22 PM, Curtis Rueden wrote:
    Hi Stephane,
    I have a Maven build that hangs and I wonder what to do to get some
    feedback like a message or stack trace or dump..
    Did you try Ctrl+\ (or Ctrl+Pause on Windows) from the console to do a full
    thread dump? It might shed some light on what is going on. You can also run
    Maven in debug mode ("mvn -X") to potentially get more information about
    where things hang.

    HTH,
    Curtis

    On Tue, Oct 9, 2012 at 1:15 PM, Stephane-3 wrote:

    Hi,

    I have a Maven build that hangs and I wonder what to do to get some
    feedback
    like a message or stack trace or dump..

    I'm stuck trying to run some integration tests

    http://forum.springsource.org/showthread.php?130859-Maven-build-hangs-on-simple-Roo-script&p=426888&posted=1#post426888

    Thanks
    Stephane



    --
    View this message in context:
    http://maven.40175.n5.nabble.com/What-diagnostic-action-to-take-when-Maven-hangs-tp5725345.html
    Sent from the Maven - Users mailing list archive at Nabble.com.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org

    --
    Ron Wheeler
    President
    Artifact Software Inc
    email: rwheeler@artifact-software.com
    skype: ronaldmwheeler
    phone: 866-970-2435, ext 102


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesmaven
postedOct 9, '12 at 6:16p
activeOct 9, '12 at 8:23p
posts7
users3
websitemaven.apache.org
irc#maven

People

Translate

site design / logo © 2021 Grokbase