[Geoserver-devel] [JIRA] (GEOS-8008) JDBC Configuration Layer Group NPE

Steve Ikeoka created an issue

GeoServer / BugGEOS-8008

JDBC Configuration Layer Group NPE

Issue Type:

BugBug

Affects Versions:

2.10.1

Assignee:

Unassigned

Components:

JDBCConfig

Created:

01/Mar/17 12:08 AM

Priority:

MediumMedium

Reporter:

Steve Ikeoka

A NullPointerException is thrown during the JDBC Configuration import if there is a layer group that contains at least one layer group and at least one layer and any of the layers are after a layer group. Attempting to create a layer group like this while running JDBC Configuration will also throw an NPE. Editing an existing layer group seems like it may work fine.

will throw NPE:
Group1
Layer1
Layer2

will throw NPE:
Layer1
Group1
Layer2

will not throw NPE:
Layer1
Layer2
Group1

When adding a Layer Group in the GUI, a Layer with the Default Style box checked can be used in place of a Layer Group to trigger the NPE. I haven’t tested whether the equivalent XML configuration also throws the NPE during the import.

The NPE occurs while adding the styles.id property for the layer group.
Partial stack trace:
Caused by: java.lang.NullPointerException
at org.geoserver.jdbcconfig.internal.ConfigDatabase.lookUpRelatedObject(ConfigDatabase.java:552)
at org.geoserver.jdbcconfig.internal.ConfigDatabase.addAttribute(ConfigDatabase.java:452)
at org.geoserver.jdbcconfig.internal.ConfigDatabase.addAttributes(ConfigDatabase.java:433)
at org.geoserver.jdbcconfig.internal.ConfigDatabase.add(ConfigDatabase.java:403)

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.789.1#100032-sha1:3f94b35)

Atlassian logo