Problem including external jar in Poseidon plug-in

Problem including external jar in Poseidon plug-in

Postby srivas » Sun Nov 19, 2006 4:36 am

Hi, I'm doing a Poseidon plug-in using some externals libraries, specifically I'm using a semantic web framework for Java named Jena (http://jena.sourceforge.net/) which is implemented in some libraries .jar.
One of my problems is that i need include all jar's in the same plug-in jar. For that reason I put all the externals libraries that i need in a folder, and in my ant build i have added the following lines to add this libraries to my package:
<zipgroupfileset dir="folderName">
<include name="**/*.jar"/>
</zipgroupfileset>

Well, the .jar file generated look's fine. I meant that it has all the .class files of the plugin and of the externals libraries.

My problem is when i execute an action in my plugin because it causes the following error:

2006-11-19 00:21:30,140 ERROR [AWT-EventQueue-1 ]: Uncaught exception
java.lang.NoClassDefFoundError: org/apache/xerces/parsers/StandardParserConfiguration
at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.create(RDFXMLParser.java:81)
at com.hp.hpl.jena.rdf.arp.JenaReader.<init>(JenaReader.java:76)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.hp.hpl.jena.rdf.model.impl.RDFReaderFImpl.getReader(RDFReaderFImpl.java:101)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:221)
at com.hp.hpl.jena.ontology.OntDocumentManager.findMetadata(OntDocumentManager.java:954)
at com.hp.hpl.jena.ontology.OntDocumentManager.initialiseMetadata(OntDocumentManager.java:912)
at com.hp.hpl.jena.ontology.OntDocumentManager.<init>(OntDocumentManager.java:199)
at com.hp.hpl.jena.ontology.OntDocumentManager.<init>(OntDocumentManager.java:181)
at com.hp.hpl.jena.ontology.OntDocumentManager.<init>(OntDocumentManager.java:165)
at com.hp.hpl.jena.ontology.OntDocumentManager.getInstance(OntDocumentManager.java:243)
at com.hp.hpl.jena.ontology.OntModelSpec.getDocumentManager(OntModelSpec.java:351)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.getDocumentManager(OntModelImpl.java:192)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:163)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:138)
at com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:393)
at org.uchile.mcc.util.UMLModel.initializeEmptyUMLModel(UMLModel.java:107)
at org.uchile.mcc.modules.MainController.loadModel(MainController.java:72)
at org.uchile.mcc.modules.MCCPane$MyActionListener.actionPerformed(MCCPane.java:152)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at com.gentleware.poseidon.ui.f.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

I think that the problem is caused because Poseidon uses a package named xerces.jar and jena uses a package named xercesImpl.jar and when the plugin is running is using the Poseidon's jar and not the classes added in the plug-in

Please, ¿someone can help me?.
Sebastián Rivas
srivas
 
Posts: 1
Joined: Sun Nov 19, 2006 4:05 am
Location: Chile

Return to Plug-Ins

Who is online

Users browsing this forum: No registered users and 1 guest

cron