Quantcast

maven-assembly-plugin StackOverflowError

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

maven-assembly-plugin StackOverflowError

john.vint
This post has NOT been accepted by the mailing list yet.
I am using maven-assembly-plugin version 2.2.  When I run it with a certain dependency to the project it gets into a StackOverflowError.

The dependency is

      <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml-schemas</artifactId>
            <version>3.6</version>
      </dependency>

The stacktrace is (overflow at AbstractArchiver.java:481)

java.lang.StackOverflowError
        at sun.nio.cs.SingleByteEncoder.encodeArrayLoop(SingleByteEncoder.java:91)
        at sun.nio.cs.SingleByteEncoder.encodeLoop(SingleByteEncoder.java:130)
        at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
        at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:252)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
        at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)
        at java.io.PrintStream.write(PrintStream.java:476)
        at java.io.PrintStream.print(PrintStream.java:619)
        at org.codehaus.plexus.logging.console.ConsoleLogger.info(ConsoleLogger.java:40)
        at org.codehaus.plexus.logging.AbstractLogger.info(AbstractLogger.java:56)
        at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:478)
        at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:481)
        at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:481)
        at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:481)

I will keep looking at the root cause, but if someone has some insight I would appreciate it.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: maven-assembly-plugin StackOverflowError

john.vint
A quick update.  Despite having other poi dependencies, this is the only one which causes the StackOverFlow.  It occurs when the plugin imports the xsb's into the jar.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: maven-assembly-plugin StackOverflowError

kueblboe
Hello,

did you ever resolve this issue? I ran into the same problem using poi 3.7 and maven-assembly-plugin 2.2.1.

Cheers,
Manuel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: maven-assembly-plugin StackOverflowError

john.vint

The best I could do was to exclude the dependency itself (this works for me because I needed a subset of the code that was not effected by the exclusion)

<exclusion>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml-schemas</artifactId>
</exclusion>

Not sure if this would help you.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: maven-assembly-plugin StackOverflowError

john.vint
I ended up getting this resolved some time ago but I figure I post the best solution.  The stackoverflow isnt a product of infinite recursion it's just a matter of recursion that is simply too deep because of how far down the file directory tree goes.

Simply increasing the stack size with -Xss.  We increased it to 2m and the assembler plugin was able to handle the recursive stack size.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: maven-assembly-plugin StackOverflowError

burcakulug
I had a similar problem and fixed it by setting the stack size -Xss10M. The output was even more than the max screen buffer, I couldn't even see the exception message. I found this post by searching "at org.codehaus.plexus.archiver.AbstractArchiver". Thanks for the solution, it saved my time.
Loading...