LinkageError wrt abbot lib org.xml.sax.ErrorHandler

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

LinkageError wrt abbot lib org.xml.sax.ErrorHandler

Postby wesisberg » Thu Aug 12, 2010 8:21 am

Hi -

We're getting the LinkageError below that might stem from the packaging of your runtime. I'm looking for workarounds. (My email to wintest-support@instantiations.com on Monday has gone unanswered.)

I'm not sure, but it looks like org.xml.sax.ErrorHandler was loaded both by the boot class loader (presumably from 1.6 rt.jar) and the bundle class loader (presumably from runtime jar abbot lib xml-apis.jar). I can run normally using both dev/eclipse and CI/command-line, but when I install WindowTester and run with those configurations, I get the error.

We also embed xml-apis.jar in the plug-in that is failing. For now we have found a workaround for running that involves reconfiguring other libraries, but we can't deploy that way, so it invalidates the test configuration.

I wonder if it is necessary to export the packages from xml-api.jar in the runtime. Shall l retry without those exports? Or, if those are needed by your components, is it possible to refactor the runtime into runtime-api and runtime-ops, for the client-visible API's and the component-required classes? That might enable our test code to rely on the API's without putting the abbot xml-api's into our classloader namespace.

I've tried tracing the classloading to identify exactly which loaders are being called and the current delegation scheme, but not successfully.

Thanks,
Wes

Caused by: java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.xerces.jaxp.validation.XMLSchemaFactory.getErrorHandler()Lorg/xml/sax/ErrorHandler;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/apache/xerces/jaxp/validation/XMLSchemaFactory, and its superclass loader (instance of <bootloader>), have different Class objects for the type org/xml/sax/ErrorHandler used in the signature
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at javax.xml.validation.SchemaFactoryFinder.loadFromService(SchemaFactoryFinder.java:431)
at javax.xml.validation.SchemaFactoryFinder._newFactory(SchemaFactoryFinder.java:246)
at javax.xml.validation.SchemaFactoryFinder.newFactory(SchemaFactoryFinder.java:145)
at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:205)
wesisberg
 
Posts: 1
Joined: Thu Aug 12, 2010 8:00 am

Re: LinkageError wrt abbot lib org.xml.sax.ErrorHandler

Postby keertip » Thu Sep 30, 2010 8:21 pm

Will need a bit of looking into to figure out a workaround. Will post it once we do that.
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest

cron