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)