2020-01-17

fixing a failed APEX installation

Today I tried to install APEX 19.2.0.00.18 into a 19.5 database, but apexins.sql failed with

Errors found. Drop APEX_190200 before re-starting the installation.
#
# Actions in Phase 1:
#
    ok 1 - BEGIN                                                        |   0.00
    ok 2 - Creating FLOWS_FILES                                         |   0.00
    ok 3 - Creating APEX_PUBLIC_USER                                    |   0.02
    ok 4 - Creating APEX_GRANTS_FOR_NEW_USERS_ROLE                      |   0.00
    ok 5 - Creating SYS Objects                                         |   0.00
    ok 6 - Creating APEX Tables                                         |   0.13
    ok 7 - Installing Package Specs (Runtime)                           |   0.48
    not ok 8 - Installing Package Bodies (Runtime)                      |   0.20
    # Message: ORA-00933: SQL command not properly ended
    # Statement: comment on column apex_team_feedback.logged_as_issue_id      is
 'If feedback resulted in an issue, the unique identifier of the resulting issue
.'
    #
    # comment on column apex_team_feedback.LABEL_01 is 'Identifies the label for
 corresponding attribute.'
    ok 9 - Dev Grants                                                   |   0.00
    ok 10 - Creating Dev-Only Tables and Triggers                       |   0.00
    ok 11 - Installing Package Specs (Dev)                              |   0.20
    ok 12 - Installing Views (Dev)                                      |   0.02
    ok 13 - Installing Package Bodies (Dev)                             |   0.07
    ok 14 - Recompiling APEX_190200                                     |   0.33
    ok 15 - Creating APEX$ objects in APEX_190200                       |   0.02
    ok 16 - Creating Spatial Support                                    |   0.00
    ok 17 - Creating Instance Parameter Defaults                        |   0.00
    ok 18 - Installing Page Designer Metadata                           |   0.03
    ok 19 - Inherit Privileges                                          |   0.00
    ok 20 - Creating APEX_INSTANCE_ADMIN_USER                           |   0.00
not ok 1 - 19 actions passed, 1 actions failed                          |   1.50
begin
*
ERROR at line 1:
ORA-20001: Install errors found in phase 1, see "not ok" messages above for
details.
ORA-06512: at "APEX_190200.WWV_INSTALL_API", line 440
ORA-06512: at line 5

Some lines above in the logfile I found
...apex_team_feedback
comment on column apex_team_feedback.LABEL_01 is 'Identifies the label for corresponding attribute.'
*
ERROR at line 3:
ORA-00933: SQL command not properly ended



This lead me to the file core/apex_views.sql

There a simple ; was missing:
17374c17374
< comment on column apex_team_feedback.logged_as_issue_id      is 'If feedback resulted in an issue, the unique identifier of the resulting issue.';
---
> comment on column apex_team_feedback.logged_as_issue_id      is 'If feedback resulted in an issue, the unique identifier of the resulting issue.'


I have no idea why this file is missing that character.
The zip file seems not to be corrupted:
md5sum apex_19.2_en.zip
dbf813eb9ec65ff91ef1f90e8c9b0148  apex_19.2_en.zip

Maybe this helps anyone, Or I managed to find a problem in this env which causes unzip to drop a single ; - who knows?

3 Kommentare:

Mikhail Velikikh hat gesagt…

Hi Martin,

I installed APEX 19.2 a while ago and was wondering why I did not get any errors, even though core/apex_views.sql has the same lines.
It happened due to the fact that I used SQLBLANKLINES OFF (default) in my environment. Here is an example:

drop table t;
create table t(x int, y int, z int);


comment on column t.x is 'x comment';

comment on column t.y is 'y comment'

comment on column t.z is 'z comment';

It works fine when SQLBLANKLINES OFF but fails when it is set to ON:

SQL> @comment_test.sql
SQL> drop table t;

Table dropped.

SQL> create table t(x int, y int, z int);

Table created.

SQL>
SQL>
SQL> comment on column t.x is 'x comment';

Comment created.

SQL>
SQL> comment on column t.y is 'y comment'
2
SQL> comment on column t.z is 'z comment';

Comment created.

SQL> set sqlblanklines on
SQL> @comment_test.sql
SQL> drop table t;

Table dropped.

SQL> create table t(x int, y int, z int);

Table created.

SQL>
SQL>
SQL> comment on column t.x is 'x comment';

Comment created.

SQL>
SQL> comment on column t.y is 'y comment'
2
3 comment on column t.z is 'z comment';
comment on column t.z is 'z comment'
*
ERROR at line 3:
ORA-00933: SQL command not properly ended

It might be a good idea for Oracle to amend their APEX installation scripts and set all SQL*Plus/SQLcl options as needed without relying on a user's environment.

Regards,
Mikhail.

Carsten hat gesagt…

Hi Martin,

thank you for the heads-up. I have filed bug number 31809249 for this issue and this will be fixed for the upcoming APEX releases.

regards

-Carsten

Carsten hat gesagt…

Hi Martin,

thank you for the heads-up about this. This is indeed pretty dependent on SQL Plus environments, it appears that hardly anybody stumbled across this. Anyway: I have filed bug 31809249 for this and this will be fixed for the upcoming APEX releases.

regards

-Carsten