[OpenMap Users] Re: Layer worker Construct

From: Jeff Kuntz <jeffrey.kuntz_at_gmail.com>
Date: Fri, 7 Nov 2008 13:27:12 -0600

On Fri, Nov 7, 2008 at 10:56 AM, Jeff Kuntz <jeffrey.kuntz_at_gmail.com> wrote:
> Hey everyone,
>
> I have recently upgraded to the new version of openmap, version 4.6.3
> to 4.6.4. In my application I have several shapefiles that I have
> been using with no problems at all. After I upgraded to the new
> version I am now getting an error from the openmap code
> "layername|LayerWorker.construct(): null". I am getting this error
> with two of my shapefiles but a third that is very similar is just
> fine. I googled the problem and found an old post on the openmap
> forums to modify come code in the ESRIPolygonRecord.java file, but the
> openmap code already has this modification.
>
> I am assuming that this problem has to do with the new version since
> the application worked just fine before had and I was wondering if
> anyone else has ran into this problem using the new version of
> openmap? If you have any tips, suggestions, hints or anything it
> would be awsome to hear about them.
>
> Thanks,
>
> Jeff
>

I just wanted to add to my previous post. I debugged the problem a
bit more by adding some print statements to the openmap code to try to
figure out what was causing the problem. Below is a stack trace from
the the construct() method in the LayerWorker class that is defined in
OMGraphicHandlerLayer.

java.lang.NullPointerException
        at com.bbn.openmap.dataAccess.shape.DbfHandler.evaluate(DbfHandler.java:249)
        at com.bbn.openmap.layer.shape.SpatialIndex.getOMGraphics(SpatialIndex.java:519)
        at com.bbn.openmap.layer.shape.ShapeLayer.prepare(ShapeLayer.java:522)
        at com.bbn.openmap.layer.policy.StandardRenderPolicy.prepare(StandardRenderPolicy.java:99)
        at com.bbn.openmap.layer.OMGraphicHandlerLayer$LayerWorker.construct(OMGraphicHandlerLayer.java:695)
        at com.bbn.openmap.util.SwingWorker$2.run(SwingWorker.java:127)
        at java.lang.Thread.run(Unknown Source)

In the DbfHandler.evaluate method it seems that this line of code is breaking:

Integer index = (Integer)
omg.getAttribute(ShapeConstants.SHAPE_INDEX_ATTRIBUTE);

Is this caused by a bad dbf file? Have there been any changes to this
code from the last version?

Jeff

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Nov 07 2008 - 14:28:00 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT