I am trying to install Sonarqube 5.3 using an Oracle 12.1.0.2.0 database.
Oracle user is created with all permission granted (grant all) and "revoke select any" options.
Sonar is started with "./sonar.sh start" but the initial schema creation fails AFTER table creation ON insert to table "GROUPS":
2016.01.15 09:42:25 ERROR web[jruby.rack] initialization failed
org.jruby.rack.RackInitializationException: An error has occurred, all later migrations canceled:
ActiveRecord::JDBCError: ORA-00904: "VERSION": invalid identifier
: INSERT INTO groups (name, description, created_at, updated_at, displayname, created, lastmodified, version, id) VALUES('sonar-administrators', 'System administrators', TO_TIMESTAMP('2016-01-15 09:42:25:478000','YYYY-MM-DD HH24:MI:SS:FF6
'), TO_TIMESTAMP('2016-01-15 09:42:25:478000','YYYY-MM-DD HH24:MI:SS:FF6'), NULL, NULL, NULL, 0, ?)
Compared the table structure with the statement I noticed that not all columns have been created: Columns DISPLAYNAME, CREATED, LASTMODIFIED, VERSION are missing!
Why are these not created?
If I create them manually, sonar fails to start afterwards. Is there any way to re-init the initial data?
Using sonars embedded database works fine.
Any ideas?
Problem solved!
It seems database configuration and permissions in combination with public synonyms on our database caused this issue.
The problem has been solved by proceeding the following steps:
wipe out partly generated schema including all containing objects
install Sonarqube 5.3 on a newly/clean Oracle XE 11 database and create basic configuration
stop Sonarqube & export database schema
import database schema on Oracle 12 database
After starting up Sonarqube I realized a problem with Oracle JDBC driver 12.1.0.1 producing a NullPointerException while starting.
Basically this is a bug in the driver itself and already fixed by Oracle -> use ojdbc-driver 12.1.0.2 to fix this issue!
Hope this might help some other people with similar problems.
Related
I've two environments, Oracle 12.1.0.2.0 - 64bit, which are basically identical.
In one I could successfully place the tables I wanted in memory, but in the other one I get 'ORA-00922: missing or invalid option'.
The command I'm executing is
ALTER TABLE USER_ROLE_T INMEMORY PRIORITY MEDIUM;
Both environments are configured with INMEMORY parameter and SGA_TARGET is configured to '0'.
What can be the cause?
The issue was caused due to incorrect parameter value.
The COMPATIBLE parameter was set to Oracle 11.2.4, as the server was upgraded to Oracle 12c from Oracle 11g.
Once I've set the parameter to the correct Oracle version, the issue was resolved.
We have recently upgraded to Sonar 5.3 from 4.4.1 and seen duplicate key issue with one of our projects. I checked the collation and found database server and database to be case insensitive and column to be case sensitive. Should we change collation on the database to "Latin1_General_CS_AS" ? Changing the collation on the server is bit difficult but we can try with database.
SELECT SERVERPROPERTY('COLLATION')
Output: Latin1_General_CI_AS
SELECT DATABASEPROPERTYEX('<SonarDatabaseName>', 'Collation') SQLCollation;
Output: Latin1_General_CI_AS
For the column, it is "Laitn1_General_CS_AS"
Error in sonar log. I did see a duplicate key in the table but not sure if this is due to collation as reported here Duplicate key error with SonarQube 5.2:
ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVM28yZdM8YcgYQ_GJuI
org.sonar.server.computation.component.VisitException: Visit failed for Component
.
.
### Error updating database. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert duplicate key row in object 'dbo.projects' with unique index 'projects_kee'.
Thanks in advance.
Case sensitivity is a requirement, so yes you really need to change the collation of this database (putting it case-sensitive (CS) and accent-sensitive (AS)).
I'm looking to get Flyway migrations setup with Oracle 12C, however running the 'flyway baseline' I received the following error on schema_table creation.
Message : ORA-01950: no privileges on tablespace 'USERS'
The end-goal here with this setup is to get a CI and CD process that can create an Oracle Database (with DBCA) then run flyway migrate to migrate the database to the latest version.
With that in mind, how can I get passed this issue? Do i need to create the scheme and Tablespace configuration outside of Flyway before I do anything?.
Edit: Moudiz has suggested ALTER USER quota 100M on USERS, whilst that does get me passed the issue. I'd be more interested in a solution in the area of dbca/flyway configuration. Any extra 'tweak' script i need to run for deployment is not ideal.
this statement should help you.
ALTER USER <user> quota 100M on USERS
After installing SONAR 3.7.3 I received the following error on startup: "o.s.s.p.DatabaseServerCompatibility Database must be upgraded. Please browse /setup"
I then followed instructions to upgrade the databse by navigating to http://:/setup. However, when I click update databse I get the following error
The migration failed: An error has occurred, all later migrations canceled: ActiveRecord::JDBCError: ORA-01430: column being added already exists in table : ALTER TABLE reviews ADD manual_severity NUMBER(1).
Please check the logs.
I can see, as the message suggests that the table reviews already exist and it already contains the column manual_severity, so I'm not sure why its trying to re-add it.
Any ideas?
I would use a backup of the database schema and start the process again from the beginning.
If you don't have a backup, I cannot see any other way than to delete the column in your schema and try to migrate the database again, but you might find a lot of errors of this kind and have to repeat this operation some times. Also, you will never be sure that your DB is Ok.
I have a web app hosted on BEA Weblogic 10.x with an Oracle 10g database backend.
It works perfectly with one database, but when we make a clone of it and try to use a different WebLogic and Oracle instance we are getting this error:
ERROR - Problem initializing invocation tracking - disabling
tracking xxxxclass.BadTableMappingException: Database column
xxxxPeriodEnding in database yyyyyyy, table zzzzzzz has an
unknown type: JDBC Type 91.
We get it every time we do a query that involves a column of type DATE. There was no ORA-XXXX code in the message.
I can access the database using SQL*Plus using the same access and do selects and updates on the same tables with no errors.
The answer to this question is not just a simple description of what a type 91 error is (although that will help) but what could be causing this given the circumstances described above.
I am using ojdbc14.jar for JDBC on both instances of weblogic.
I have no idea about the error, but have you considered the jdbc jar version and more importantly if the oracle DB needs to be updated.
I faced very weird problems with oracle, and struggled for a while to find at the end that installing some patches for oracle would solve the problem.
Set oracle.jdbc.V8Compatible=true.
This remaps the oracle DATE type to a DATETIME time in JDBC. This parameter was missing on the new Weblogic server.