Maven Plugins and Stack Overflow Assemblies

I have a fairly simple RESTEasy client application that I tried to compile into a standalone JAR file using both the Maven Shade and Assembly plugins. Maven will successfully package the application and it will start normally, but in the end I get the following error:

Exception in thread "main" java.lang.StackOverflowError
    at java.util.regex.ASCII.getType(ASCII.java:199)
    at java.util.regex.ASCII.isType(ASCII.java:203)
    at java.util.regex.Pattern$Ctype.isSatisfiedBy(Pattern.java:3832)
    at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3715)
    at java.util.regex.Pattern$Curly.match(Pattern.java:4125)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4556)
    at java.util.regex.Pattern$Branch.match(Pattern.java:4502)
    at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3715)
    at java.util.regex.Pattern$Start.match(Pattern.java:3408)
    at java.util.regex.Matcher.search(Matcher.java:1199)
    at java.util.regex.Matcher.find(Matcher.java:618)
    at java.util.Formatter.parse(Formatter.java:2517)
    at java.util.Formatter.format(Formatter.java:2469)
    at java.util.Formatter.format(Formatter.java:2423)
    at java.lang.String.format(String.java:2845)
    at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:384)
    at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:346)
    at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:319)
    at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:442)
    at org.jboss.resteasy.client.core.BaseClientResponse.copyFromError(BaseClientResponse.java:94)
    at org.jboss.resteasy.client.ClientResponseFailure.<init>(ClientResponseFailure.java:32)
    at org.jboss.resteasy.client.core.BaseClientResponse.createResponseFailure(BaseClientResponse.java:488)
    at org.jboss.resteasy.client.core.BaseClientResponse.createResponseFailure(BaseClientResponse.java:479)

The call stack after org.jboss.resteasy.client.core.BaseClientResponse.readFrom (BaseClientResponse.javahaps84) is repeated again and again until the memory is exhausted.

My code is not a problem. An application works fine when it is packaged using the Maven dependency plugin .

My code relies on groups called regex (which rely on Java 1.7), but I can confirm that Maven and the application itself are compiled and executed using the correct JDK.

- , JAR , .

+3

All Articles