On Tue, Oct 2, 2012 at 9:47 AM, Miguel Angel Pastor Olivar <miguelinl...@gmail.com> wrote: > Ok, > > First of all sorry for not being too explicit. I will try to give some more > details: > > > - I am embedding Apache Felix (and Equinox because I would like to > switch depending on the application server I am running on). > - > - The xalan ExtensionHandler executes something like this: > ObjectFactory.findProviderClass(className, > ObjectFactory.findClassLoader(), true) > - The className has the format "java:....PortletBridge" ( I am embedding > the OSGI container into Liferay portal :) ) > - The extension manager have already added the extension loader to the > classloader > > > Felix.m_secureAction.addURLToURLClassLoader(Felix.m_secureAction.createURL(Felix.m_secureAction.createURL(null, > "http:", extensionManager),"http://felix.extensions:9/", extensionManager), > Felix.class.getClassLoader()); > > - When resolving the "java:xxxxxx....PortletBridge" the previous loader > added by the ExtensionManager cause an unhandled error.
Well, it shouldn't do that I guess - maybe you could create a jira issue as a bug report against the framework and give me some more information like stack trace of the error etc. and I can see whether we can fix that. > In addition; when trying to embed the container inside JBoss 7+ the > extension manager fails to load because it is not being loaded by an > instance of the URLClassloader (it is not really a problem) Yeah, that makes sense and is working as designed. If we can't add ourself to a urlclassloader we just don't provide extension bundle support but should continue to work correctly. > As I have said in the previous mail, isolating the the framework into its > own classloader is working but it is trickier. If you don't need extension bundle support you shouldn't have to do that then. Your real problems seems to be a bug in the extension manager that prevents it from working with your third-party library even so it likely should. Please create a bug report and lets try to fix the bug. regards, Karl > So this was the reason of asking you guys! > > Thx a lot! > > On 2 October 2012 09:20, Karl Pauls <karlpa...@gmail.com> wrote: > >> > I am using Apache Felix as the internal OSGI container inside a webapp. >> The >> > extension bundle manager adds the extension loader to the classloader >> which >> > is causing me many headaches because some thirty-part libraries. >> >> What is the problem exactly? If you don't have any extension bundles, >> why would this cause problems (let alone with third-party libs)? >> >> > My first solution was to isolate the embedded container into its own >> > classloader but I think this approach adds too much complexity. >> > >> > Should be possible to make the Extension Bundle manager to be >> configurable? >> > I mean, disabling it could cause some other problems to the framework? >> >> Again, it might help if you let us know what your problem is with it >> in the first place. That said, I'm not against adding a switch to >> disable it but it is somewhat tricky.... >> >> >> regards, >> >> Karl >> >> > Cheers, >> > >> > Migue >> > >> > -- >> > Un saludo, >> > >> > Migue >> > >> > http://migue.github.com >> >> >> >> -- >> Karl Pauls >> karlpa...@gmail.com >> http://twitter.com/karlpauls >> http://www.linkedin.com/in/karlpauls >> https://profiles.google.com/karlpauls >> > > > > -- > Un saludo, > > Migue > > http://migue.github.com -- Karl Pauls karlpa...@gmail.com http://twitter.com/karlpauls http://www.linkedin.com/in/karlpauls https://profiles.google.com/karlpauls