What's the reason for using Oracle?
Oracle RDBMS latest version on cloud - cost = $0, maintenance time - 0 sec.
I am Oracle PL/SQL Developer.
In current project need server getting mesages from tracing devices and store on DB
Can you provide JDBC details for testing?
Config xml:
<entry key='database.driverFile'>/opt/traccar/lib/ojdbc17.jar</entry>
<entry key="database.driver">oracle.jdbc.OracleDriver</entry>
<entry key='database.url'>jdbc:oracle:thin:@ApexDev19c_medium?TNS_ADMIN=/opt/oracle/db_conn/ApexDev19c</entry>
<entry key='database.user'>VEHICLES_TRACCAR</entry>
<entry key='database.password'>password</entry>
<entry key='database.checkConnection'>SELECT 1 FROM DUAL</entry>
<entry key='logger.queries'>true</entry>
/opt/oracle/db_conn/ApexDev19c
- Dir unziped sertificates from cloud DB
You need connect to my DB ?
I need a real database. It doesn't have to be your production DB.
Where to send login credentials and zip file ?
You can send to the support email address.
Ok. I will prepare test DB for You and send to support email.
Thank you
Sending
Version DB 23i
comment Group query
UNION ... JOUN ... JOIN ... UNION ...
SELECT g2.groupId as parentId, g1.id as groupId FROM tc_groups AS g2
INNER JOIN tc_groups AS g1 ON g2.id = g1.groupId
set false flag Statement.RETURN_GENERATED_KEYS on addPermission and removePermission.
Return Primary Key from DELETE query ?
Add device from web work
Add unregister device - work.
How to set default UserID on <entry key='database.registerUnknown'>true</entry> ?
You can set default group, but not user.
What is the point Groups ? In table Devices present column GroupID , but not present UserID.
Why Groups with recursion ? (self-recursion)
What is relation Devices-Groups-Users ?
I recommend reading documentation first before asking for help.
In documentation writed how to rewrite thi code :
/* if (condition.getIncludeGroups()) {
boolean expandDevices;
String groupStorageName;
if (GroupedModel.class.isAssignableFrom(condition.getOwnerClass())) {
expandDevices = Device.class.isAssignableFrom(condition.getOwnerClass());
groupStorageName = Permission.getStorageName(Group.class, condition.getPropertyClass());
} else {
expandDevices = Device.class.isAssignableFrom(condition.getPropertyClass());
groupStorageName = Permission.getStorageName(condition.getOwnerClass(), Group.class);
}
result.append(" UNION ");
result.append("SELECT DISTINCT ");
if (!expandDevices) {
if (outputKey.equals("groupId")) {
result.append("all_groups.");
} else {
result.append(groupStorageName).append('.');
}
}
result.append(outputKey);
result.append(" FROM ");
result.append(groupStorageName);
result.append(" INNER JOIN (");
result.append("SELECT id as parentId, id as groupId FROM ");
result.append(getStorageName(Group.class));
result.append(" UNION ");
result.append("SELECT groupId as parentId, id as groupId FROM ");
result.append(getStorageName(Group.class));
result.append(" WHERE groupId IS NOT NULL");
result.append(" UNION ");
result.append("SELECT g2.groupId as parentId, g1.id as groupId FROM ");
result.append(getStorageName(Group.class));
result.append(" AS g2");
result.append(" INNER JOIN ");
result.append(getStorageName(Group.class));
result.append(" AS g1 ON g2.id = g1.groupId");
result.append(" WHERE g2.groupId IS NOT NULL");
result.append(") AS all_groups ON ");
result.append(groupStorageName);
result.append(".groupId = all_groups.parentId");
if (expandDevices) {
result.append(" INNER JOIN (");
result.append("SELECT groupId as parentId, id as deviceId FROM ");
result.append(getStorageName(Device.class));
result.append(" WHERE groupId IS NOT NULL");
result.append(") AS devices ON all_groups.groupId = devices.parentId");
}
result.append(" WHERE ");
result.append(conditionKey);
result.append(" = :");
result.append(conditionKey);
} */
?
Table TC_GROUPS recursive (tree) , but query is not recursive
Hi. Try to install traccar
Platform : Traccar running on VM Oracle Cloud (oracle linux 8.6) 1 CPU , 1GB memory.
Database: Oracle 19c on Oracle cloud (ATP) with mTLS connection.
Driver: ojdbc17-full
1.
add
--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED
start optionmanual
INSERT INTO VEHICLES_TRACCAR.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0)
https://docs.oracle.com/error-help/db/ora-00933/' has been mapped by 'org.traccar.api.ResourceErrorHandler' to respons
e 'Bad Request' (400:CLIENT_ERROR).
get sources and edit DatabaseStorage.java
Oracle return ROWID not ID
edit QueryBuilder.java
On this point Web Traccar work, Administarator registered
Current error :
Haw to disable Group functioal ? Or help rewrite code .