View Issue Details

IDProjectCategoryView StatusLast Update
0013433mantisbtdb oraclepublic2015-03-16 19:25
ReporterdregadAssigned Todregad 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.2.9 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0013433: Error ORA-00904: "PROTECTED": invalid identifier for the query
Description

There is an error when start mantis (login_page.php):

"Database query failed. Error received from database was #904: ORA-00904: "PROTECTED": invalid identifier for the query: SELECT basename, priority, protected FROM m_plugin_t WHERE enabled=:0 ORDER BY priority DESC."

Additional Information

This is with work-in-progress patch for Oracle in https://github.com/dregad/mantisbt/tree/oracle (assuming current HEAD 08582828cb)

Initially reported by adou in 0013227:0030017

TagsNo tags attached.

Relationships

related to 0013227 closeddregad Oracle DB support multiple issues 
related to 0007644 closeddregad Problems when creating the Mantis database schema on Oracle 
child of 0013438 closeddregad adodb: Fatal error: Call to a member function FetchRow() on a non-object 

Activities

dregad

dregad

2011-10-21 09:21

developer   ~0030020

I'm surprised by this message, because "PROTECTED" is not a reserved keyword in Oracle [1]

Can you provide the SQL that was generated to build your schema ?

[1] http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/reservewords.htm

dregad

dregad

2011-10-24 03:35

developer   ~0030032

The script you provided is a bit strange:

  • the same SQL commands are repeated 4 times
  • the sql instructions stop with statement "ALTER TABLE m_project_t ADD (category_id NUMBER(10) DEFAULT 1 NOT NULL);"

This corresponds to Mantis schema version 74 but the current version is 183, so there are a lot of missing tables as well as outdated definitions including the plugins table which is missing 2 columns (protected and priority). That is certainly the cause of the error you're experiencing.

Please confirm:

  • if were there any errors either in Mantis (GUI), web server log or in Oracle during the installation
  • the schema version number stored in your database (in mantis config table m_config_t, look for value in row where config_id = 'database_version')
  • how the sql script you uploaded was generated - if that's not how you did it, try from install.php, checking "Print SQL Queries instead of Writing to the Database" then click "Install/Upgrade" and updload the printed SQL queries.
adou

adou

2011-10-24 03:39

reporter   ~0030033

My Oracle version is 10g, 10.2.0.5.0

adou

adou

2011-10-24 05:04

reporter   ~0030038

Provided a wrong file, sorry.
I just added a new file from a fresh install. The script is generated checking "Print SQL Queries instead of Writing to the Database".
The source that i've used is from this link: https://github.com/dregad/mantisbt/zipball/oracle

adou

adou

2011-10-24 05:05

reporter  

20111024_schema_oracle.sql (22,612 bytes)
adou

adou

2011-10-24 06:24

reporter   ~0030039

I found this link about the problem:

http://dbaspot.com/oracle-faq/475947-ora-00904-string-invalid-identifier.html

"4. Some issues related to ORA-00904 have been attributed to incorrect setup of an Oracle database. While this is very uncommon, you should validate if the catproc.sql script has been executed properly and ask your admin to run this if its a new database thats throwing the error continously."

I'll confirm that my Oracle have installed correctly.

dregad

dregad

2011-10-24 06:53

developer   ~0030040

Last edited: 2011-10-24 06:54

View 3 revisions

adou, do you get this at the end of the sql generation ?

Fatal error: Call to a member function FetchRow() on a non-object in /xxx/mantisbt/library/adodb/drivers/adodb-oci8.inc.php on line 368

Call Stack:
0.0018 574752 1. {main}() /xxx/mantisbt/admin/install.php:0
0.3886 12819936 2. call_user_func_array() /xxx/mantisbt/admin/install.php:719
0.3886 12820252 3. db_index_exists() /xxx/mantisbt/admin/install.php:719
0.3888 12820296 4. ADODB_oci8->MetaIndexes() /xxx/mantisbt/core/database_api.php:645

adou

adou

2011-10-24 07:07

reporter   ~0030041

No, there isnt error.
I provide the page in html format with the results of the sql generation.

adou

adou

2011-10-24 07:08

reporter  

install.php.htm.zip (4,584 bytes)
dregad

dregad

2011-10-24 07:21

developer   ~0030042

What do you get with
SQL> DESCRIBE m_plugin_t;

Also, you have not answered my question about the schema version number in 0013433:0030032

adou

adou

2011-10-24 08:08

reporter   ~0030043

desc m_plugin_t
Nombre Nulo Tipo


BASENAME NOT NULL VARCHAR2(40)
ENABLED NOT NULL NUMBER(1)

There isn't rows in table m_config_t

dregad

dregad

2011-10-25 13:21

developer   ~0030069

adou, your issue is probably resolved by the latest commits I pushed to https://github.com/dregad/mantisbt/tree/oracle. Please test and let me know.

adou

adou

2011-10-26 07:22

reporter   ~0030075

It's ok!

desc m_plugin_t
Nombre Nulo Tipo


BASENAME NOT NULL VARCHAR2(40)
ENABLED NOT NULL NUMBER(1)
PROTECTED NOT NULL NUMBER(1)
PRIORITY NOT NULL NUMBER(10)

The schema version number is 183.

Thanks!!

dregad

dregad

2011-10-26 07:57

developer   ~0030076

That's good to hear !

Please report any other issues you may find with the Oracle patch in 0013227.

Issue History

Date Modified Username Field Change
2011-10-21 09:17 dregad New Issue
2011-10-21 09:18 dregad Relationship added child of 0013227
2011-10-21 09:21 dregad Note Added: 0030020
2011-10-24 02:31 adou File Added: schema_oracle.sql
2011-10-24 02:35 adou Sponsorship Added adou: US$ 10
2011-10-24 02:35 adou Sponsorship Total 0 => 10
2011-10-24 03:35 dregad Note Added: 0030032
2011-10-24 03:35 dregad Assigned To => dregad
2011-10-24 03:35 dregad Status new => feedback
2011-10-24 03:39 adou Note Added: 0030033
2011-10-24 05:04 adou Note Added: 0030038
2011-10-24 05:05 adou File Added: 20111024_schema_oracle.sql
2011-10-24 05:15 dregad File Deleted: schema_oracle.sql
2011-10-24 06:24 adou Note Added: 0030039
2011-10-24 06:53 dregad Note Added: 0030040
2011-10-24 06:53 dregad Status feedback => assigned
2011-10-24 06:54 dregad Note Edited: 0030040 View Revisions
2011-10-24 06:54 dregad Note Edited: 0030040 View Revisions
2011-10-24 07:07 adou Note Added: 0030041
2011-10-24 07:08 adou File Added: install.php.htm.zip
2011-10-24 07:21 dregad Note Added: 0030042
2011-10-24 07:36 dregad Relationship added related to 0007644
2011-10-24 08:08 adou Note Added: 0030043
2011-10-24 08:56 dregad Relationship added parent of 0013438
2011-10-25 13:21 dregad Note Added: 0030069
2011-10-26 07:22 adou Note Added: 0030075
2011-10-26 07:57 dregad Note Added: 0030076
2013-10-17 12:50 dregad Status assigned => resolved
2013-10-17 12:50 dregad Fixed in Version => 1.3.0-beta.1
2013-10-17 12:50 dregad Resolution open => fixed
2013-10-17 12:51 dregad Target Version => 1.3.0-beta.1
2014-04-12 19:39 grangeway Issue cloned: 0017206
2014-12-08 00:34 vboctor Status resolved => closed
2015-03-16 19:24 dregad Relationship replaced child of 0013438
2015-03-16 19:25 dregad Relationship replaced related to 0013227