Using geoserver 2.7.2 and matching geofence…
With an Oracle schema targeted for geofence data-persistence it is impossible to edit-details for a given geofence layer rule. The problem happens because geofence fails to successfully create the gf_layer_attributes table in Oracle, as its create-table statement is not valid SQL for an Oracle 11g database.
I can create users, groups, instance, rules in general and it all saves to Oracle and behaves as expected.
During startup of geofence I see the following in my tomcat log:
17:25:09,357 ERROR SchemaUpdate:212 - Unsuccessful: create table FDOTWEBSVC.gf_layer_attributes (details_id number(19,0) not null, access_type varchar2(255 char), data_type varchar2(255 char), name varchar2(255 char) not null, primary key (details_id, name), unique (details_id, name))
17:25:09,358 ERROR SchemaUpdate:213 - ORA-02261: such unique or primary key already exists in the table
If I execute the SQL that’s shown in Oracle’s sqlDev I see this error output:
SQL Error: ORA-02261: such unique or primary key already exists in the table
02261. 00000 - “such unique or primary key already exists in the table”
*Cause: Self-evident.
*Action: Remove the extra key.
The problem is apparently that the “primary key” has already established that details_id, name are unique. So the “unique” statement is rejected.
I can workaround the problem entirely by creating the table manually as follows and then restart tomcat.
CREATE TABLE gf_layer_attributes
(
details_id NUMBER(19,0) NOT NULL,
access_type VARCHAR2(255 CHAR),
data_type VARCHAR2(255 CHAR),
name VARCHAR2(255 CHAR) NOT NULL,
PRIMARY KEY(details_id, name)
);
Walter