Database resource is not available
Problem
Loading an .odb file to open a layer stored in a spatial database fails, the data type indicator is grayed out, showing no data type and the dataset visibility checkbox is unchecked. If you try to activate the dataset visibility, the following error occurs:
An error occurred while opening dataset ’[File location ]’.
Solution
The error may be caused by different reasons. Check the log file for each specific case detailed below.
Problem Details
Case 1
The following entry is shown in the logfile:
java.lang.RuntimeException: DataKeyStoreDefault : Line ' MODEL=' of stream 'D:\Temp\MyDB_CLOB.odb' goes from depth 0 to 2
Generally this error occurs because the example from the Orbit Database File documentation page was followed. Under Multi-Model Dataset, it provides this example:
DATABASE=
CONNECTION=inventory
MODELS=
xMODEL=
xxID=1(...)
Solution
From the Orbit Database File (.odb), remove 1 space of indentation at the beginning of the line ' MODEL=' and all the lines below, so that the text is:
the text should be like:
DATABASE=
CONNECTION=inventory
MODELS=
MODEL=
xID=1(...)
Case 2
The following entry is shown in the logfile:
java.lang.RuntimeException: FixedFieldList : Unable to find fixed field 'type' in table 'Ruelles'
Solution
Make sure that the field mentioned (for example,'type') is included in the table.
The example in the Orbit Database File documentation contains the following line: FIXED_FIELDS=type:1. Do not put this line in your .odb if you do not have fixed fields.
Make sure that the Orbit Database File (.odb) file has correct syntax.
Case 3
The following entries are shown in the logfile:
<DOX.0>: [SpatialPlugin] : Creating spatial plugin 'PointXYZ'
java.lang.NullPointerException
(...)
<DOX.0>: [DataManager] : ERROR : Error while getting description of dataset '<dataset name>'This occurs when the spatial columns are incorrectly referenced in the .odb, for example:
SPATIAL_COLUMN_X=X
SPATIAL_COLUMN_Y=Y
SPATIAL_COLUMN_Y=Z(The third line should read SPATIAL_COLUMN_Z=Z.)
Solution
Make sure the spatial columns are correctly referenced in the .odb.
Case 4
The following entries are shown in the logfile:
<DOX.0>: [SpatialPlugin] : Creating spatial plugin 'SpatialCLOB'
java.lang.NullPointerException
(...)
<DOX.0>: [DataManager] : ERROR : Error while getting spatial type of dataset '<dataset name>'Solution
Make sure the .odb file contains the line:
SPATIAL_COLUMN=<spatial column name>
Case 5
The following entry is shown in the logfile:
java.lang.RuntimeException: SpatialDatabase : Database connection 'Features0' not found
Solution
Make sure a connection is created to the database.
Make sure a connection in the .odb file is referring to the correct connection name.
Case 6
The following entries are shown in the logfile:
[DataSetItem] : ERROR : Error while set defaults
[DataSetItem] : ERROR : Error loading models on dataset 'D:\Support\00090485 Al-Top TMX db issues\poles.odb'
[ManageProjectPanel] : ERROR : Error while fill combobox with datasets.
[ControlPanel] : ERROR : Error while check CRS
[ViewModule] : ERROR : Error while opening dataset 'D:\Support\00090485 Al-Top TMX db issues\poles.odb'In addition, many of the following errors appear:
[ViewportComponent] : ERROR : Error while checking for remote resources
[ViewportComponent] : ERROR : Error while checking for remote resources
[BackgroundRenderer] : ERROR : Error while rendering the view
[BackgroundRenderer] : ERROR : Error while rendering the view
at com.orbitgis.tool.dialog.MessageDialog.showErrorDialog(SourceFile:410)Solution
This happens when opening a PostgreSQL table with the SPATIAL_COLUMN pointing to a PostGIS geometry field. PostGIS WKB or WKT does not follow the OGC standard, therefore TMX cannot understand it.
The solution is to create another field for SPATIAL_COLUMN, then use a trigger to copy the translated content into the PostGIS geometry column and vice-versa when a new object is created.
Case 7
The following entry is shown in the logfile:
ERROR: current transaction is aborted, commands ignored until end of transaction block
Solution
This will occur if an ODB previously loaded had errors, and after fixing these errors the ODB is loaded without restarting the application.
The solution is to restart Trimble MX and load the ODB.
Related Products
Trimble MX software
Support Reference
00090485
Last modified
September 2020