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 stanford.edu
Mon Dec 13 17:54:24 PST 2010


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 javax.xml.stream.FactoryLocator 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 
javax.xml.stream.FactoryLocator.  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] http://kickjava.com/src/javax/xml/stream/FactoryLocator.java.htm
[2] http://protegewiki.stanford.edu/wiki/SolvingClassLoaderProblems



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:
>
> javax.xml.stream.FactoryConfigurationError: Requested factory com.ctc.wstx.stax.WstxInputFactory cannot be located.  Classloader =sun.misc.Launcher$AppClassLoader at 546b97fd
> 	at javax.xml.stream.FactoryLocator.loadFactory(FactoryLocator.java:120)
> 	at javax.xml.stream.FactoryLocator.locate(FactoryLocator.java:109)
> 	at javax.xml.stream.FactoryLocator.locate(FactoryLocator.java:54)
> 	at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:41)
> 	at org.apache.axiom.om.util.StAXUtils$7.run(StAXUtils.java:311)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory_perClassLoader(StAXUtils.java:306)
> 	at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:76)
> 	at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:131)
> 	at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:596)
> 	at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:581)
> 	at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:97)
> 	at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:86)
> 	at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:641)
> 	at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
> 	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68)
> 	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184)
> 	at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:150)
> 	at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:143)
>
> com.ctc.wstx.stax.WstxInputFactory is included in a supplied jar, which you can also find here:
> http://www1.inf.tu-dresden.de/~s2715005/gopubmed-ontology-generation-service-clients-jar-with-dependencies.jar
> 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 lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20101213/3482ec33/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: org.protege.osgi.debug.jar
Type: application/x-java-archive
Size: 1441857 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20101213/3482ec33/attachment.jar>


More information about the protege-discussion mailing list