[ https://issues.apache.org/jira/browse/FELIX-6729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17890554#comment-17890554 ]
Mahesh Kantharaj commented on FELIX-6729: ----------------------------------------- Hi Karl, Please note that the deep recursion resulting in Stack Overflow Errors with respect to URL processing has now we been RESOLVED after we disabled the Felix URL Handler using the flag "felix.service.urlhandlers=false" in the OSGi framework properties section and performed multiple server restarts to validate issue behavior. However we would now like to focus on the root cause analysis of the issue that exist on the Felix jar with respect to URL Handers. There is NO much clarity on the purpose of URL Handlers in the Felix jars based on the Apache Felix documentation. Please confirm the loss of functionality that would occur when the "felix.service.urlhandlers=false" property (i.e. URL Handler has been disabled) has been configured / applied ? What does the method "URL.setURLStreamHandlerFactory()" and "URLConnection.setContentHandlerFactory()" exactly meant for in terms of URL specific workflow? Will the usage of "java.net.URL" in our custom plugin be impacted while using Felix Framework jar reference when the "felix.service.urlhandlers=false" property has been set (i.e. URL Handler has been disabled) ? Please confirm > Infinite recursion observed with Felix Main and Felix Framework jar usage > ------------------------------------------------------------------------- > > Key: FELIX-6729 > URL: https://issues.apache.org/jira/browse/FELIX-6729 > Project: Felix > Issue Type: Bug > Components: Framework, Main > Affects Versions: framework-7.0.5 > Environment: Oracle WebLogic on which Custom Plugin applications have > been deployed which uses the "org.apache.felix.org.apache.felix.main.jar" and > "org.apache.felix.framework.jar" jar as 3rd party references for OSGi > implementation. > Operating System : Oracle Linux > Reporter: Mahesh Kantharaj > Priority: Blocker > Fix For: framework-7.0.5 > > Original Estimate: 168h > Remaining Estimate: 168h > > The Custom Plugin which references the > "org.apache.felix.org.apache.felix.main.jar" and > "org.apache.felix.framework.jar" 3rd Party jars is deployed on WLS (Oracle > WebLogic Server). The Felix Framework jar is used in the Custom Plugin to > enable the plugin to interact with the OAM (Oracle Access Manager) system > wherein it helps in integrating the custom plugin with the OAM seamlessly and > efficiently. > However there is an intermittent issue that is observed during the > initialization phase (Deployed Server restart) of the custom plugin wherein > repeated looping is observed with the below mentioned stack upon > java.net.URL usage. > This results in Stack Over Exception with an abnormal compressed class space > growth that eventually leads to Out of Memory exception and thereby the JVM > crashes. The only workaround available with us now is to perform the Server > restart on which the custom plugin is deployed so that the Full GC is > triggered and thereby the compressed class space is cleared as a temporary > relief to the issue. We would like to have the URL Handler related looping > stack from Felix Main and Framework to be investigated to devise a solution > from Apache team, to resolve the issue (This seems to be a race condition > scenario based on issue symptoms). > at > org.apache.felix.framework.util.SecureAction.getDeclaredMethod(SecureAction.java:850) > at > org.apache.felix.framework.URLHandlers.getFrameworkFromContext(URLHandlers.java:752) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.getStreamHandlerService(URLHandlersStreamHandlerProxy.java:574) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:369) > at java.net.URL.<init>(URL.java:639) > at java.net.URL.<init>(URL.java:507) > ********** > The complete stack trace having the deep recursive call related to Felix jar > is pasted below for your reference: > <FINER> <ClassLoader> Thread [ACTIVE] ExecuteThread: '37' for queue: > 'weblogic.kernel.Default (self-tuning)' Defining > org.osgi.service.packageadmin.ExportedPackage from > file:/p01/app/oracle/oam12c/wlserver/server/lib/org.apache.felix.org.apache.felix.main.jar > in 'weblogic-launcher' > java.lang.Exception > at > sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1340) > at sun.misc.URLClassPath.getResource(URLClassPath.java:250) > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:363) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:362) > at java.lang.ClassLoader.loadClass(ClassLoader.java:418) > at java.lang.ClassLoader.loadClass(ClassLoader.java:351) > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) > at java.lang.Class.getDeclaredMethod(Class.java:2128) > at > org.apache.felix.framework.util.SecureAction.getDeclaredMethod(SecureAction.java:850) > at > org.apache.felix.framework.URLHandlers.getFrameworkFromContext(URLHandlers.java:752) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.getStreamHandlerService(URLHandlersStreamHandlerProxy.java:574) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:369) > at java.net.URL.<init>(URL.java:639) > at java.net.URL.<init>(URL.java:507) > at > sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1340) > at sun.misc.URLClassPath.getResource(URLClassPath.java:250) > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:363) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:362) > at java.lang.ClassLoader.loadClass(ClassLoader.java:418) > at java.lang.ClassLoader.loadClass(ClassLoader.java:351) > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) > at java.lang.Class.getDeclaredMethod(Class.java:2128) > at > org.apache.felix.framework.util.SecureAction.getDeclaredMethod(SecureAction.java:850) > at > org.apache.felix.framework.URLHandlers.getFrameworkFromContext(URLHandlers.java:752) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.getStreamHandlerService(URLHandlersStreamHandlerProxy.java:574) > at > org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:369) > at java.net.URL.<init>(URL.java:639) > at java.net.URL.<init>(URL.java:507) > at > sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1340) > at sun.misc.URLClassPath.getResource(URLClassPath.java:250) > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:363) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:362) > at java.lang.ClassLoader.loadClass(ClassLoader.java:418) > at java.lang.ClassLoader.loadClass(ClassLoader.java:351) > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) > at java.lang.Class.getDeclaredMethod(Class.java:2128) > at > org.apache.felix.framework.util.SecureAction.getDeclaredMethod(SecureAction.java:850) > > > > -- This message was sent by Atlassian Jira (v8.20.10#820010)