ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | oscar List | April 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [oscar] Get a ressource from another bundle


Ok
here is the issue of the problem in fact it works fine but i have another problem

BundleA contains method :
    public URL getXmlFileUrl(){   
        return context.getBundle().getResource(XML_FILE);
    }

BundleB  calls this method to get the url :
URL xmlTaskDescriptionFileUrl = taskSetSvc.getXmlFileUrl();
System.out.println("[Boss] xmlTaskDescriptionFileUrl   = "+xmlTaskDescriptionFileUrl);

Here is the output :
[Boss] xmlTaskDescriptionFileUrl   = bundle://15.0/pitask.xml

Then this url is passed to another bundle Dom4jService (a simple dom4j wrapper)
TaskDescription [] descs = dom4jSvc.createDescriptions(xmlTaskDescriptionFileUrl); //this methode parse the xml file ....

Here is the output :
org.dom4j.DocumentException: /home/smac/aitelhab/Doom/Oscar/bundle:/15.0/pitask.xml (No such file or directory) Nested exception: /home/smac/aitelhab/Doom/Oscar/bundle:/15.0/pitask.xml (No such file or directory) //The problem is here
        at org.dom4j.io.SAXReader.read(SAXReader.java:353)
        at org.dom4j.io.SAXReader.read(SAXReader.java:236)
        at doom.dom4jservice.Dom4jImpl.parse(Dom4jImpl.java:78)
        at doom.dom4jservice.Dom4jImpl.createDescriptions(Dom4jImpl.java:89)
        .....................................

In fact the url was not null but how can i give to my "Dom4jService" to be correctly interpreted ...
Thanks



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.