Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8017909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:58:38+00:00 2026-06-04T20:58:38+00:00

When I run mvn test I receive the below exception. I have tried both

  • 0

When I run mvn test I receive the below exception. I have tried both raising and lowering my Xmx and Xss JVM settings and bumping all limits under ulimit. There are about 1300 tests and the last 200 always fail with this exception. Running those tests by themselves allows them to pass. The same tests pass on my ubuntu box. I receive this exception when running the tests on my mac. I am pretty sure its an environment issue, but I have tweaked every setting that I am aware of with absolutely no luck.

I am using mvn 2.1 and Java 6. My test framework is junit 4.8.

java.lang.OutOfMemoryError: unable to create new native thread
        at java.lang.Thread.start0(Native Method)
        at java.lang.Thread.start(Thread.java:658)
        at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
        at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
        at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:92)
        at com.google.appengine.tools.development.ApiProxyLocalImpl$PrivilegedApiAction.run(ApiProxyLocalImpl.java:197)
        at com.google.appengine.tools.development.ApiProxyLocalImpl$PrivilegedApiAction.run(ApiProxyLocalImpl.java:184)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.google.appengine.tools.development.ApiProxyLocalImpl.doAsyncCall(ApiProxyLocalImpl.java:172)
        at com.google.appengine.tools.development.ApiProxyLocalImpl.makeAsyncCall(ApiProxyLocalImpl.java:138)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:58:40+00:00Added an answer on June 4, 2026 at 8:58 pm

    I ran into this problem using the Maven Surefire plugin (v2.12). I had to configure surefire as follows:

    <configuration>
      <forkMode>always</forkMode>
      ... other surefire config ...
    </configuration>
    

    If I omitted the “forkMode” element in my config, I would get the “unable to create new native thread” error because the java Surefire process would create thousands of threads otherwise, exceeding my OS limit (Mac OSX — you can see this in the Activity Monitor).

    As best I can tell, all the new threads are getting created because the default “forkMode” is “once” in Surefire, and whatever new threads are getting created don’t die off until the “one” surefire process terminates.

    One final note: adjusting my JVM memory settings seemed to have no effect (good or bad). Using default values worked normally, as did the following:

    <argLine>-Xss512k -Xms512m -Xmx4096m -XX:MaxPermSize=2048m</argLine>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a maven program, it compiles fine. When I run mvn test it
I want to do something between instrumentation and test when I run command mvn
I run mvn install in command line and get stuck by below error. Caused
I have a problem currently when i run the command mvn install, the artifact
I have a Spring Roo project and I use mvn jetty:run to run my
How do I make the manifest available during a Maven/Surefire unittest run mvn test
When running the mvn test command, the PHPUnit tests are run. The problem I
i know how to run Junit test class: mvn test -Dtest=classname but when i
When I run mvn clean install , for the integration-test phase it does not
When I run my selenium test (mvn test) from jenkins (windows) I see only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.