Creating a view for SpatiaLite in GeoServer - geoserver

I can create SpatiaLite layers from SpatiaLite tables. However, I would like to create a layer based on a SpatiaLite view. I click on "Configure new Sql View" from the "New Layer" screen. Then I am able to create the sql view. However, after I create the new layer based on a SpatiaLite view, I cannot get queries to run against the SpatiaLite table. If I go into the newly created layer, I click on "Edit sql view", I type in a known working sql for this SpatiaLite db such as:
select * from lines
Then under Attributes, I click on "Refresh" and it shows no fields. Also if I click on "Layer Preview", select the layer and click on GML, I get the following error:
error:java.lang.RuntimeException: java.io.IOException java.lang.RuntimeException: java.io.IOException java.io.IOExceptionjava.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "FROM": syntax error) [SQLITE_ERROR] SQL error or missing database (near "FROM": syntax error)
Somehow it is not finding the sqlite table. Any help would be appreciated.
Update #1
I found this in the geoserver.log file:
Could not find mapping for 'GEOMETRY', ignoring the column and setting the feature type read only

I took a look at all the info I found online and it looks to be a limitation of the SpatiaLite provider for GEOSERVER in that it does not allow to create custom SQL views in GEOSERVER.

Related

Oracle SQL Developer 20.4.1 - View Object Details Not Showing SQL?

I am using Oracle SQL Developer 20.4.1.407 connecting to an Oracle 11g database
I have a view in the left hand side pane which I click on once and then on the right hand side it pulls up the object details.
So I see multiple tabs
Columns - Data - Grants - Dependancies - Details - Triggers - SQL - Errors
When I click on "SQL" a pop up comes up saying "Generating DDL" then it pulls up blank
Now when I go to the "Details" tab I can see some sort of SQL in the "TEXT" field as shown
So 2 questions
First I was wondering why doesnt the SQL just show up in the SQL tab? Is this a permissions issue with my loggged in user?
Second if the SQL is shown in the details TEXT column why have a SQL tab at all? Whats the difference between the two spots?
Thanks in advance
For a view, this is most likely a privileges issue.
For example, if I logon as SCOTT on my database, I can click on views in the SYS schema and see their Details, eg
But if click DDL, then I'll get a blank because I don't have privileges to query the contents of the view or its definition.
Views are an "odd" case, because the DDL is virtually synonymous with the data in ALL_VIEWS.TEXT_VC.
Sidenote: SQL Dev 20 is long in the tooth. Its trivial to upgrade so why not head over to SQL Dev 22.

Unable to bind Application item - Oracle Apex

I have created 2 application items in shared component option.
Protection level: Restricted
Scope: Application
Then I have created a process in the login page where sql query is
select user_id, name into :G_USER_ID , :G_USER_NAME
from t_users
where upper(email) = upper(:P9999_USERNAME);
When I try to login it gives me error. Debugging says that there is an error in the above statement. I am not able to bind these items.
I'm using apex 19.1
It would help if you said which error you got.
However, if this piece of code runs before you managed to log in, you didn't establish connection to the database (yet) and can't select from any table, including t_users.

Ucanaccess 4.0.3 cannot find a specific table in my DB

I'm using jdbc with ucanaccess... When I connect to the database, there is one table that Ucanaccess is not finding... I saw that in debug mode in NetBeans...
Therefore when I try a transaction on that table, I get :
UCAExc:::4.0.3 user lacks privilege or object not found [Name of my table]
I guess everything else works perfectly since when I did a select on another table it worked...
I'm using :
ucanaccess 4.0.3
MS Access 2007
JDK : java 1.8.0_151
Netbeans : NetBeans IDE 8.2
Update
When Opening the database with console.bat ( by the way, this file is located in UcanAccess download folder) I got the follwoing warnings/errors :
WARNING:Looking for usage map at page 9093, but page type is 1
Cannot load procedure Query4 user lacks privilege or object not found: [My Table Name]
Cannot resolve table [My Table Name]
WARNING:Looking for usage map at page 9093, but page type is 1
strongly suggests a damaged database file. Jackcess, the record manager used by UCanAccess, retrieved a page (block) of data from the file expecting it to be tagged as a "usage map" but it was tagged as something else.
The most common solution for a damaged database file is to open it in Access and then do a "Compact and Repair Database" operation on it.

Is it possible to edit a table via dblink in APEX?

I've created a form in the APEX and I need to edit a table via dblink, which is already created . So, when I ask to show me a data in this remoute table- it's work fine, but when I'm trying to edit data, I get the error:
"Table or view OPERATION#DBQA not found Contact your application
administrator."
In the SQL workshop>SQL Commands- it also works fine(
update usr.operation#dbqa
set description='admin3' where operation_id=10
)
Well, I've created view usr.operation_qa as select * from usr.operation#dbqa, but, anyway, I receive the same error
"Table or view OPERATION_QA not found Contact your application
administrator."
I'll repeat, a permission and dblink -are ok, couse it's worl in SQL Commands
Will be appreciate for any help or comments. Thanks!

Kendo spring demo project missing database

I'm trying to run Kendo spring demo application, most of the demos works but whenever I run remote binding examples I'm getting
[SQLITE_ERROR] SQL error or missing database (no such table:
Employees)]
It seems like it couldn't find the database, where can I find the database or how can I fix this?
The database should be available under the following folder:
spring-demos\src\main\webapp\WEB-INF\sample.db

Resources