Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Problem with TemporaryResource. Errormessage: Could not aquire scale range

I solved the problem:

i had to add " -Dosgi.parentClassloader=ext" to the vm arguments in the run
configuration. now all is fine. 

thanks for your help again. i never found this error qithout your hint.


Ingmar Eveslage wrote:
> 
> Strange: i just looked in the /System/Library/Java/Extensions directory
> and all jai libraries are allready installed. as written on
> http://en.wikipedia.org/wiki/Java_Advanced_Imaging jai is shipped with osx
> 10.4 (so it also should be shippe with osx 10.5). then i looked in the
> eclipse setting -> installed JREs -> JVM 1.5.0 (default), and all jai
> libraries are part of this jre.
> 
> all seems fine, but i get this error message. 
> 
> any other ideas?
>  
> 
> Jesse Eichar wrote:
>> 
>> Right.  I get them directly from the JAI project site.  I will try to  
>> find time to put them on the site for future developers.
>> 
>> Jesse
>> 
>> Le 9-Feb-08 à 3:38 PM, Ingmar Eveslage a écrit :
>> 
>>>
>>> Thanks. I will try this. But the modified jre archives are no longer  
>>> in the
>>> udig download folder. the links on the quickstart page are dead ends.
>>>
>>> i will search for the linux files on another page.
>>>
>>> ingmar
>>>
>>>
>>> Jesse Eichar wrote:
>>>>
>>>> Hi,
>>>>
>>>> What you can do is grab the linux zip file and put the jars in your
>>>>
>>>> /System/Library/Java/Extensions
>>>>
>>>> directory
>>>>
>>>> Jesse
>>>> Le 9-Feb-08 à 3:22 PM, Ingmar Eveslage a écrit :
>>>>
>>>>>
>>>>> Thank you for your fast answer. I followed your link, but there is
>>>>> only a
>>>>> version for windows and linux of the modified jre. but i cant find
>>>>> any jai
>>>>> for mac osx. but it should be possible to develope on osx without  
>>>>> this
>>>>> exception, or not?
>>>>>
>>>>> thanks forward
>>>>>
>>>>> ingmar
>>>>>
>>>>>
>>>>> Andrea Antonello-3 wrote:
>>>>>>
>>>>>> Hi Ingmar,
>>>>>> you are using java without the java advanced imaging part, which is
>>>>>> needed in udig.
>>>>>> The udig sdk quick start has all the needed links to download it:
>>>>>> http://udig.refractions.net/confluence/display/DEV/1+SDK+Quickstart
>>>>>>
>>>>>> Cheers,
>>>>>> Andrea
>>>>>>
>>>>>> On Feb 9, 2008 11:45 PM, Ingmar Eveslage <eveslage@xxxxxxxxx>  
>>>>>> wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> i have a problem with my uDig plugin. i create a featuretype,  
>>>>>>> then a
>>>>>>> IGeoResource and a new Layer which a add to a map using this code:
>>>>>>>
>>>>>>> try {
>>>>>>>      CoordinateReferenceSystem crs = CRS.decode("EPSG:4326");
>>>>>>>      final AttributeType GEOM =
>>>>>>> AttributeTypeFactory.newAttributeType("Location",Point.class,true,
>>>>>>> null,null,crs );
>>>>>>>      FeatureType stationFeatureType =
>>>>>>> FeatureTypeFactory.newFeatureType(new
>>>>>>> AttributeType[] { GEOM },"station");
>>>>>>>      IGeoResource stationGeoResource =
>>>>>>> CatalogPlugin
>>>>>>> .getDefault
>>>>>>> ().getLocalCatalog().createTemporaryResource(stationFeatureType);
>>>>>>>
>>>>>>>      //create list of IGeoResource
>>>>>>>      List <IGeoResource> geoResourceList = new
>>>>>>> LinkedList<IGeoResource>();
>>>>>>>      geoResourceList.add(stationGeoResource);
>>>>>>>
>>>>>>>      Map map = ApplicationGISInternal.getActiveMap();
>>>>>>>
>>>>>>>      //create layer
>>>>>>>      Layer stationLayer = null;
>>>>>>>
>>>>>>>      stationLayer =
>>>>>>> map.getLayerFactory().createLayer(stationGeoResource);
>>>>>>>      stationLayer.setName("stations");
>>>>>>>      stationLayer.setSelectable(true);
>>>>>>>
>>>>>>>      ApplicationGIS.addLayersToMap(map, geoResourceList, 0);
>>>>>>> } catch (Exception e) {
>>>>>>>      // TODO Auto-generated catch block
>>>>>>>      e.printStackTrace();
>>>>>>> }
>>>>>>>
>>>>>>> all seems fine. but a get this exception very very often:
>>>>>>>
>>>>>>> !ENTRY net.refractions.udig.project 1 0 2008-02-09 23:26:16.368
>>>>>>> !MESSAGE Could not aquire scale range
>>>>>>> !STACK 0
>>>>>>> java.lang.NoClassDefFoundError: javax/media/jai/util/Range
>>>>>>>      at
>>>>>>> net
>>>>>>> .refractions
>>>>>>> .udig
>>>>>>> .project
>>>>>>> .internal
>>>>>>> .provider.LayerItemProvider.outOfScale(LayerItemProvider.java:653)
>>>>>>>      at
>>>>>>> net
>>>>>>> .refractions
>>>>>>> .udig
>>>>>>> .project
>>>>>>> .internal
>>>>>>> .provider.LayerItemProvider.getForeground(LayerItemProvider.java:
>>>>>>> 604)
>>>>>>>      at
>>>>>>> net
>>>>>>> .refractions.udig.project.ui.AdapterFactoryLabelProviderDecorator
>>>>>>> $
>>>>>>> LabelProvider
>>>>>>> .getForeground(AdapterFactoryLabelProviderDecorator.java:106)
>>>>>>>      at
>>>>>>> org
>>>>>>> .eclipse
>>>>>>> .jface
>>>>>>> .viewers
>>>>>>> .DecoratingLabelProvider
>>>>>>> .getForeground(DecoratingLabelProvider.java:288)
>>>>>>>      at
>>>>>>> org
>>>>>>> .eclipse
>>>>>>> .jface
>>>>>>> .viewers
>>>>>>> .WrappedViewerLabelProvider
>>>>>>> .getForeground(WrappedViewerLabelProvider.java:130)
>>>>>>>      at
>>>>>>> org
>>>>>>> .eclipse
>>>>>>> .jface
>>>>>>> .viewers
>>>>>>> .WrappedViewerLabelProvider 
>>>>>>> .update(WrappedViewerLabelProvider.java:
>>>>>>> 188)
>>>>>>>      at
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Apple Message framework v919.2)
Subject: Re: [udig-devel] get a mapgraphic layer
Date: Thu, 14 Feb 2008 13:48:49 -0800
References: <116eb44a0802141345w799fcb8ck28fbd973ef3cb606@xxxxxxxxxxxxxx>
X-Mailer: Apple Mail (2.919.2)
X-BeenThere: udig-devel@xxxxxxxxxxxxxxxxxxxxx
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: User-friendly Desktop Internet GIS <udig-devel@xxxxxxxxxxxxxxxxxxxxx>
List-Id: User-friendly Desktop Internet GIS <udig-devel.lists.refractions.net>
List-Unsubscribe: <http://lists.refractions.net/mailman/listinfo/udig-devel>,
	<mailto:udig-devel-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe>
List-Archive: <http://lists.refractions.net/pipermail/udig-devel>
List-Post: <mailto:udig-devel@xxxxxxxxxxxxxxxxxxxxx>
List-Help: <mailto:udig-devel-request@xxxxxxxxxxxxxxxxxxxxx?subject=help>
List-Subscribe: <http://lists.refractions.net/mailman/listinfo/udig-devel>,
	<mailto:udig-devel-request@xxxxxxxxxxxxxxxxxxxxx?subject=subscribe>
X-List-Received-Date: Thu, 14 Feb 2008 21:49:29 -0000

Just the standard way of searching through the layers in a map and  
comparing ids...
Le 14-Feb-08 à 1:45 PM, andrea antonello a écrit :

> Hi, is there a way to get a Layer by its ID? i mean, I need to
> retrieve teh styledBlackboard from a mapgraphic layer without having
> it selected or whatever.
>
> Ciao
> Andrea
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top