uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Holmberg <holmberg2...@comcast.net>
Subject Clerezza and UIMA
Date Thu, 07 Feb 2013 21:42:30 GMT
Hi Tommaso-- 


Sorry for the direct email, but you seem to be the expert on combining UIMA and Clerezza.


I'm trying to generate RDF from my UIMA AE. I started with the code in RDFCASConsumer.java
and modified it to change the directory and file to which the RDF is written. 

I put this in my AE and deployed it in UIMA, running in my own container. This container does
this: 

AnalysisEngine engine = UIMAFramework.produceAnalysisEngine(...); 
ClassLoader uimaClassLoader = engine.getResourceManager().getExtensionClassLoader(); 
Thread thread = Thread.currentThread(); 
thread.setContextClassLoader(uimaClassLoader); 
engine.process(cas); 

When I run I get: 

Exception in thread "TAService Worker 0" java.lang.LinkageError: loader constraint violation
in interface itable initialization: when resolving method "org.apache.xerces.dom.ElementImpl.getSchemaTypeInfo()Lorg/w3c/dom/TypeInfo;"
the class loader (instance of org/apache/uima/internal/util/UIMAClassLoader) of the current
class, org/apache/xerces/dom/ElementImpl, and the class loader (instance of <bootloader>)
for interface org/w3c/dom/Element have different Class objects for the type m/TypeInfo; used
in the signature 


I see several issues in Clerezza about UIMA and classloaders, which you have resolved. There's
even a method that gets the classloader to be used for XML parsing. 

So it seems like you've probably solved this problem related to Xerces and classloaders. However,
I can't find any documentation about how to use your fix. 

Can you tell me what I need to do when creating my analysis engine and setting the classloader
in order to avoid this LinkageError? 

Thanks, 


Greg Holmberg 




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message