-
-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oracle compatibility #2777
Oracle compatibility #2777
Conversation
Please @Delawen, can you give a look? |
@PascalLike I see for example in https://github.com/geonetwork/core-geonetwork/blob/3.4.x/domain/src/main/java/org/fao/geonet/domain/MetadataValidation.java#L141-L145 that is not using the I have done a quick check and other cases in the domain package have But in any case if you can verify no more cases also would be great, thanks. |
@josegar74 this should not be an issue... I checked and it seems that hibernate manage the conversion from boolean to NUMBER in this cases. I'm not sure why sometimes the BooleanToYNConverter is necessary, maybe another DBMS? Or it was necessary before with some older library? |
@PascalLike afaik |
Please @etj , if you have time to add some extra info it would be really useful. I did my tests on Oracle 12c and I found that it works without issues (just a conversion from boolean to NUMBER). I will do some extra tests on Oracle 11, probably the issues are on older versions. |
I still get this error: When starting GeoNetwork over an empty database. Maybe I didn't configure it right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also there is a mistake on the oracle.xml file, as the port is fixed:
$ git diff web/src/main/webResources/WEB-INF/config-db/oracle.xml
diff --git a/web/src/main/webResources/WEB-INF/config-db/oracle.xml b/web/src/main/webResources/WEB-INF/config-db/oracle.xml
index 1fe61bf71a..1d7f50bfcb 100644
--- a/web/src/main/webResources/WEB-INF/config-db/oracle.xml
+++ b/web/src/main/webResources/WEB-INF/config-db/oracle.xml
@@ -51,7 +51,7 @@
</bean>
<bean id="jdbcURL" class="java.lang.String">
- <constructor-arg value="jdbc:oracle:thin:@${jdbc.host}:1521:${jdbc.database}"/>
+ <constructor-arg value="jdbc:oracle:thin:@${jdbc.host}:${jdbc.port}:${jdbc.database}"/>
</bean>
</beans>
@@ -1,119 +0,0 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing a whole file for Oracle compatiblity? This is weird... Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This table's not needed anymore, not really related to Oracle compatibility, but it created issues, so I decided to remove it directly here
Probably the cursos error comes from this previous error (that leaves the connection on a weird state?):
And at the end of a long trace, it says:
I am testing with this Oracle: https://hub.docker.com/r/wnameless/oracle-xe-11g/ |
@Delawen, all the errors are related to the maximum number of cursors open... I had the same problem, to solve it by giving to my Oracle user more advanced dba permissions, with an unlimited number of cursors. After the first startup, you can switch back to the normal permissions. |
It would be good to merge GN 3.4.x in your branch to fix the broken Travis tests and check if your PR causes any new issue, @PascalLike. |
Fix for issues on Oracle DB
Tested in an Oracle 11g XE without problems. To avoid the jdbc.basic.poolPreparedStatements=false
jdbc.basic.maxOpenPreparedStatements=-1 After the initial database creation it can be set to normal: jdbc.basic.poolPreparedStatements=true
jdbc.basic.maxOpenPreparedStatements=1200 |
I am new to this, I am connecting geonetwork 3.6 to an Oracle 12c database and I get the following error: ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - HHH000388: Unsuccessful: alter table GUF_UserFeedbacks add constraint FK_fdrac6cxjiirwxm814musflwy foreign key (metadata_uuid) references Metadata (uuid) ADVERTENCIA [main] org.apache.tomcat.util.scan.StandardJarScanner.processURLs Fallo al escanear [file:/C:/apache-tomcat-9.0.21/lib/orai18n-mapping.jar] desde la herarquia classloader hierarchy ADVERTENCIA [main] org.apache.tomcat.util.scan.StandardJarScanner.processURLs Fallo al escanear [file:/C:/apache-tomcat-9.0.21/lib/orai18n-utility.jar] desde la herarquia classloader hierarchy ADVERTENCIA [main] org.apache.tomcat.util.scan.StandardJarScanner.processURLs Fallo al escanear [file:/C:/apache-tomcat-9.0.21/lib/orai18n-collation.jar] desde la herarquia classloader hierarchy ADVERTENCIA [main] org.apache.tomcat.util.scan.StandardJarScanner.processURLs Fallo al escanear [file:/C:/apache-tomcat-9.0.21/lib/orai18n-translation.jar] desde la herarquia classloader hierarchy deploys the geonetwork application, but at the time of loading the standard generates new errors, I don't know what the problem is, they could help me with a geonetwork to oracle connection manual maybe I forget something. install the .jre, the jdbc, modify the file jdbc.properties and the srv tables METADATA and SPATIAL_REF_SYS I have to create it directly in oracle since I do not create them automatically. I appreciate your help and collaboration |
the errors that it presents to me when I charge a new norm is the following: WARN [geonetwork.settings] - Requested setting with name: metadata/import/restrict but null value found. Check the settings table. Caused by: java.sql.BatchUpdateException: ORA-01465: n·mero hexadecimal no vßlido Caused by: org.hibernate.exception.GenericJDBCException: could not execute batch |
This PR fix the Oracle DB compatibility and fix some code style issues on some entities (commit bd97bc6)
There are also some code style fixes on some entities (commit 1d40cf0)