[ 
https://issues.apache.org/jira/browse/FELIX-6729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888065#comment-17888065
 ] 

Karl Pauls commented on FELIX-6729:
-----------------------------------

Can you share the stack trace with the stack overflow exception in 7.0.5? What 
you provided there doesn't show a recursion. Additionally, what is the problem 
you are observing that is caused be the exception (other than the exception 
itself)?

Wrt. the disabling, I'm not sure why you are trying to do it via the config - I 
suppose it depends on how you are launching the framework but you can just pass 
framework properties to it: 
https://docs.osgi.org/specification/osgi.core/8.0.0/framework.lifecycle.html#framework.lifecycle.launchingproperties

If you need todo it via the jars, I'm confused as IIRC, neither the framework 
nor the main jar contain any of the places you mention 
("config/config.properties", "classes/config.properties", 
"resources/config.properties"). The main jar has an embedded config.properties 
but in the root (and an additional default.properties in the root as well). 

> 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)

Reply via email to