You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Nikolas Falco (Jira)" <ji...@apache.org> on 2019/11/29 16:59:00 UTC

[jira] [Created] (ARIES-1950) Starting EBA raise StackOverflowError when a third party bundle MANIFEST.MF contains very long uses directive.

Nikolas Falco created ARIES-1950:
------------------------------------

             Summary: Starting EBA raise StackOverflowError when a third party bundle MANIFEST.MF contains very long uses directive.
                 Key: ARIES-1950
                 URL: https://issues.apache.org/jira/browse/ARIES-1950
             Project: Aries
          Issue Type: Bug
          Components: Subsystem
    Affects Versions: subsystem-2.0.10
         Environment: oracle jdk 1.8.0 build 181
oracle jdk 11
            Reporter: Nikolas Falco


I had create and EBA file with 157 dependencies. The Application-Content declares only web bundles, actually just one.

The EBA contains two dependencies that cause a StackOverflowError parsing MANIFEST.MF of the shared bundle repository. The actual parser is done by very complex regular expression.
The clause that cause the issue is the very long "uses" directive.
I had attach the two MANIFEST.MF that cause the issue and a main Java class to reproduce the issue.

I got the issue debugging the EBA in a IBM Webshere Liberty 19.0.0.1 application server.

{code:java}
package debug;

import java.util.Map;
import java.util.jar.Manifest;
import org.apache.aries.subsystem.core.archive.HeaderFactory;

public class Main {
    public static void main(String[] args) throws Exception {
        Manifest mf = new Manifest(Main.class.getResourceAsStream("es-manifest.mf"));
        for (Map.Entry<Object, Object> entry : mf.getMainAttributes().entrySet()) {
            HeaderFactory.createHeader(String.valueOf(entry.getKey()), String.valueOf(entry.getValue()));
        }
    }
}
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)