Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Problem during deployment of Protege Plugin

Timothy Redmond tredmond at
Tue Dec 14 08:57:33 PST 2010

I finally found some sources for a FactoryLocator that might be the one 
you are using.  The line numbers don't correspond and I can't be sure 
but if this is the one then the relevant lines are:

	static  Object locate(String factoryId, String altClassName)
			throws  FactoryConfigurationError {
		return  locate(factoryId, altClassName,

This suggests that your problem will go away if you set the context 
class loader to something that can load the WstxInputFactory.  So you 
would figure out the point at which this code is invoked (might be 
tricky...) and call


where Foo is a class defined in your bundle (e.g. 
Foo.class.getClassLoader() is a class loader that sees the 
WstxInputFactory class.

Let me know if this does or does not work.  In retrospect I should have 
suggested it right away, the setContextClassLoader idea is a bit of a 
convention in Java.



On 12/13/2010 05:54 PM, Timothy Redmond wrote:
> I knew that I had lost track of this e-mail.  I don't know the answer 
> but I have seen things like this before.  My reply rambles a bit 
> because I don't have a solution for you yet.
> This looks like a case of the class 
> doing some magic with class loaders which is not working with the OSGi 
> environment.  One of the indicators of this is that it is indicating 
> that it is using the sun.misc.Launcher$AppClassLoader class loader.  
> This is probably the system class loader.  The class loaders for the 
> bundles (Protege plugins) would print out as something like
>     (org.apache.felix.framework.ModuleImpl$ModuleClassLoader) 11.0
> Your WstxInputFactory class probably loads correctly in the bundle 
> context.
> It might help to find the source for the 
>  This might tell you how to either 
> pre-register the WstxInputFactory or to change the class loader that 
> the FactoryLocator is using.  I don't think that this class is a 
> standard java thing.  I noticed that the source in [1] does not 
> correspond to the code that you are running.  This is probably the 
> next step in debugging and I suspect this source can be found in the 
> axis 2 project.  If you find it send it and I will see if this helps.
> Another tool that can be helpful is the attached 
> org.protege.osgi.debug plugin.  Dump it in the plugins directory and 
> start Protege.  You can then see what bundles are able to load which 
> classes.  There are some instructions on how to use this tool here 
> [2].  In particular you can double check that your bundle can load the 
> WstxInputFactory class.
> -Timothy
> [1]
> [2]
> On 12/10/2010 07:06 AM, Götz Fabian wrote:
>> Hello everyone,
>> I'm experiencing some trouble during deployment of a Protege plugin. Building and running it (using the Ant script) works flawlessly in Eclipse. However, when I copy the resulting jar file into the plugins folder of Protege and launch it, the following exception is thrown twice:
>> Requested factory com.ctc.wstx.stax.WstxInputFactory cannot be located.  Classloader =sun.misc.Launcher$AppClassLoader at 546b97fd
>> 	at
>> 	at
>> 	at
>> 	at
>> 	at$
>> 	at Method)
>> 	at
>> 	at
>> 	at
>> 	at org.apache.axis2.util.XMLUtils.toOM(
>> 	at org.apache.axis2.util.XMLUtils.toOM(
>> 	at org.apache.axis2.deployment.DescriptionBuilder.buildOM(
>> 	at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(
>> 	at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(
>> 	at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(
>> 	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(
>> 	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(
>> 	at org.apache.axis2.client.ServiceClient.configureServiceClient(
>> 	at org.apache.axis2.client.ServiceClient.<init>(
>> com.ctc.wstx.stax.WstxInputFactory is included in a supplied jar, which you can also find here:
>> Other classes are successfully loaded from this jar file, with the exception of WstxInputFactory.
>> Has anyone experienced a similar problem? Is there some magic in the class/bundle loading of Protege?
>> Thank you for any kind of help or advice!
>> Götz
>> _______________________________________________
>> protege-discussion mailing list
>> protege-discussion at
>> Instructions for unsubscribing:
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at
> Instructions for unsubscribing:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the protege-discussion mailing list