Morning:
Thanks for the stack trace - I am not sure why line numbers did not
show up (it makes it hard to know exactly where the problem is).
The method where the error occurs is here; I cannot spot anything that
does not have a null check myself; the next step is to get you a copy
that will provide line numbers in the stack trace or ask you to post
the image somewhere.
public synchronized Object findResource() throws IOException {
lock.lock();
try {
if (this.coverage == null || this.coverage.get()==null
) {
try {
AbstractGridCoverage2DReader reader =
this.service(new
NullProgressMonitor()).getReader(null);
ParameterGroup pvg =
getReadParameters();
List list = pvg.values();
@SuppressWarnings("unchecked")
GeneralParameterValue[] values =
(GeneralParameterValue[]) list
.toArray(new
GeneralParameterValue[0]);
this.coverage = new
SoftReference<GridCoverage>(reader.read(values));
} catch (Throwable t) {
msg = t;
RasteringsPlugin.log("error reading
coverage", t);
return null;
}
}
return this.coverage.get();
} finally {
lock.unlock();
}
}
Jody
2009/5/8 Mario Nuñez Jimenez <[email protected]>:
> But I still have some problems. I have been trying to load programmatically
> but something fails.
>
> Now I am trying to load as user in udig but it doesn’t work so I tried a
> different map and works. The thing is that I have one with 27mb (high
> resolution, the one that I need, but doesn’t work) and another with 2mb (low
> resolution that works fine), both of them are .jpg with his corresponding
> .jgw file.
>
> I get this error in udig’s log when I try to load the 27mb one:
>
> !ENTRY net.refractions.udig.project 2 0 2009-05-08 13:41:52.001
>
> !MESSAGE
>
> !STACK 0
>
> java.lang.NullPointerException
>
> at
> net.refractions.udig.catalog.rasterings.AbstractRasterGeoResource.findResource(Unknown
> Source)
>
> at
> net.refractions.udig.catalog.rasterings.AbstractRasterGeoResource.resolve(Unknown
> Source)
>
> at
> net.refractions.udig.project.internal.impl.LayerResource.processResourceCachingStrategy(Unknown
> Source)
>
> at
> net.refractions.udig.project.internal.impl.LayerResource.resolve(Unknown
> Source)
>
> at
> net.refractions.udig.render.internal.gridcoverage.basic.BasicGridCoverageRenderer.prepareRender(Unknown
> Source)
>
> at
> net.refractions.udig.render.internal.gridcoverage.basic.BasicGridCoverageRenderer.render(Unknown
> Source)
>
> at
> net.refractions.udig.render.internal.gridcoverage.basic.BasicGridCoverageRenderer.render(Unknown
> Source)
>
> at
> net.refractions.udig.project.internal.render.impl.RenderJob.startRendering(Unknown
> Source)
>
> at
> net.refractions.udig.project.internal.render.impl.RenderJob.run(Unknown
> Source)
>
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
>
>
> Thank you in advance for any help you can give me.
>
> Kind regards.
>
>
>
> ________________________________
>
> From: Mario Nuñez Jimenez
> Sent: viernes, 08 de mayo de 2009 9:55
> To: 'User-friendly Desktop Internet GIS'
> Subject: Adding a image layer
>
>
>
> Thank you guys,
>
> very useful information.
>
> King regards.
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group liability cannot be triggered for the message content. Although
> the sender endeavours to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and
> will not be liable for any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial
> destinada solamente a la(s) persona(s) mencionadas anteriormente
> pueden estar protegidos por secreto profesional.
> Si usted recibe este correo electronico por error, gracias por informar
> inmediatamente al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin
> no se hace responsable por su contenido. Su contenido no constituye ningun
> compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas
> partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
> no puede garantizar nada al respecto y no sera responsable de cualesquiera
> danos que puedan resultar de una transmision de virus.
> ------------------------------------------------------------------
> _______________________________________________
> 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