Good Morning Thomas:
I had a very difficult time debugging acquire recently (as there were several
implementations of it around, and some of the wizard code was not actually
using it).
Let me check - here is the code in "AddToCatalog":
ICatalog localCatalog = CatalogPlugin.getDefault().getLocalCatalog();
ID serviceUrl = new ID(MapGraphicService.SERVICE_URL);
IService service = localCatalog.getById(IService.class, serviceUrl,
ProgressManager.instance().get());
if( service !=null )
return;
service=new MapGraphicService();
localCatalog.add(service);
I also note that MapGraphicService.SERVICE_URL is slightly different then what
you used below:
--
Jody Garnett
On Thursday, 18 October 2012 at 6:10 AM, thomas dolley wrote:
> Hello ,
>
> I'm mooving my application from udig-1.3.1 to udig 1.3.2.
>
> In one of my view I was using he folowing code in the method public void
> createPartControl(Composite parent) of my view
>
> ***********************************************************************************************************
>
> try {
> local.acquire(MapGraphicService.SERVICE_URL, null);
>
> } catch (IOException e) {
> // TODO Auto-generated catch block
>
> e.printStackTrace();
> }
> final ID SCALE_BAR = new ID(
> "mapgraphic:/localhost/mapgraphic#scalebar", null);
> IGeoResource scalebarRessource = local.getById(IGeoResource.class,
> SCALE_BAR, new NullProgressMonitor());
>
> ***********************************************************************************************************
>
> And i Have the following exeption and that I don't understand. Why
> can't catalogue acquire the MapGraphicService.Service. Do you have any
> idea ?
>
>
> java.io.IOException: Unable to connect to any service supporting
> mapgraphic:/localhost/mapgraphic
> at
> net.refractions.udig.catalog.internal.CatalogImpl.acquire(CatalogImpl.java:290)
> at
> fr.guyasim.ui.modules.carbone.CarboneMapView.addDecoration(CarboneMapView.java:337)
> at
> fr.guyasim.ui.modules.carbone.CarboneMapView.createPartControl(CarboneMapView.java:165)
> at
> org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
> at
> org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
>
>
> Best regards
> Thomas
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel