Monday, May 6, 2013

Error While Creating a New Oracle APEX Workspace


Error provisioning sandbox.

ORA-00001:uniqueconstraint (APEX_040200.WWV_FLOW_PROV_COMPANY_NAME) violated

Fix:
            select COMPANY_NAME from APEX_040200.WWV_FLOW_PROVISION_COMPANY ;
            select SHORT_NAME from  APEX_040200.WWV_FLOW_COMPANIES;
            delete from apex_040200.WWV_FLOW_PROVISION_COMPANY where company_name='SANDBOX';

commit;
-- this resolves the issue

Oracle APEX Errors


Issues we may encounter post installation of Oracle Application Express:


In my previous post we have seen how to install Oracle Application Express, and below are the errors that I've encountered after installation-


First time login to admin page - localhost:8080/apex/apex_admin throws error  like -

A user name and password are being requested by http://localhost:8080. The site says: “XDB”


Fix:


1) Try restarting listener and see if the issue is resolved or not.

2) Unlock xdb user and change password if necessary (default pwd is xdb)
       And try accessing the admin page.

3) If you still see the same error
Check if user ANONYMOUS is locked. If yes, unlock him and change the password if required.
SQL> alter user ANONYMOUS account unlock;

just in case, is to check whether or not APEX is installed properly. The status should show VALID.                                                                    
SQL> select comp_name, version, status  from dba_registry  where comp_name='Oracle Application Express';
  COMP_NAME
---------------------------------------------------------
VERSION                        STATUS
------------------------------ --------------------------
Oracle Application Express
4.2.2.00.11                    VALID
User altered.

SQL> alter user ANONYMOUS identified by ANONYMOUS;
User altered.

We can also run a sql “epgstat.sql” to see what exactly is going on with XDB user, and take necessary steps.
Script location is-
Windows-  C:\app\vmummadi\product\11.2.0\dbhome_1\RDBMS\ADMIN
Unix- $ORACLE_HOME/RDBMS/ADMIN

Oracle Application Express(APEX) Installation Step by Step


Environment: Oracle Windows 32bit,, Oracle database 11.2.0.1.0 EE, APEX 4.2.2.00.11, 4GB RAM
Steps:

1) Download the software
You can download APEX 4.2 from Oracle.com/downloads.  I downloaded  the “only english” zip file. You can download the documentation separately.

2) copy and extract the software
Now copy and extract the apex_4.2.zip file to your machine. I use “unzip” to unzip the zip file. This will create a folder named “apex”. I kept this folder on my machine in a permanent location, c:\apex.

3) check the tablespace requirements –
You need about 275MB of free space in the APEX tablespace (mine is called “APEX”) and 100MB of free space in the SYSTEM tablespace.
Note: Not a problem if you haven’t created one, this will get created once your APEX installation is complete and you start creating workspaces.

SQL executions:

Now login to DOS prompt or PUTTY and execute the sql’s wherever the APEX folder was unzipped:

C:\Users\vmummadi>cd C:\apex
C:\apex>dir – this will show all the contents under this folder.

SQL> connect / as sysdba
Connected.
SQL> @apexins SYSAUX SYSAUX TEMP /i/  

- Pass tbs names as it will put its data and indexes here, it also uses the temp tbs and ‘i’ -is the virtual directory where it stores all images.

This will run for a very long time (anywhere between 30-90mins) depends on server and environment, for me it took 104mins. And it will generate a spool file under the same directory (install2013-05-02_15-24-49.log). At the end you should see success message something like this-

PL/SQL procedure successfully completed.

timing for: Install Internal Applications
Elapsed: 01:23:02.39 

Thank you for installing Oracle Application Express.

Oracle Application Express is installed in the APEX_040200 schema.

The structure of the link to the Application Express administration services is as follows:
http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql)
http://host:port/apex/apex_admin     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)

The structure of the link to the Application Express development interface is as follows:
http://host:port/pls/apex (Oracle HTTP Server with mod_plsql)
http://host:port/apex     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)

JOB_QUEUE_PROCESSES: 1000
PL/SQL procedure successfully completed. 

Session altered. 

Performing Application Express component validation - please wait...

old   6:     if '^UPGRADE' = '1' then
new   6:     if '2' = '1' then
old   7:        dbms_registry.loaded('APEX','^version');
new   7:        dbms_registry.loaded('APEX','4.2.2.00.11');
old   8:     elsif '^UPGRADE' = '2' then
new   8:     elsif '2' = '2' then
old  10:             dbms_registry.upgraded('APEX','^version');
new  10:             dbms_registry.upgraded('APEX','4.2.2.00.11');
old  12:             dbms_registry.loaded('APEX','^version');
new  12:             dbms_registry.loaded('APEX','4.2.2.00.11');
Completing registration process. 17:11:01
Validating installation.  17:11:02
...Database user "SYS", database schema "APEX_040200", user# "92" 17:11:02
...Compiled 0 out of 3004 objects considered, 0 failed compilation 17:11:02
...266 packages
...258 package bodies
...452 tables
...11 functions
...16 procedures
...3 sequences
...457 triggers
...1320 indexes
...211 views
...0 libraries
...6 types
...0 type bodies
...0 operators
...0 index types
...Begin key object existence check 17:11:02
...Completed key object existence check 17:11:03
...Setting DBMS Registry 17:11:03
...Setting DBMS Registry Complete 17:11:03
...Exiting validate 17:11:03

PL/SQL procedure successfully completed.

timing for: Validate Installation
Elapsed: 00:00:02.88
old   1: alter session set current_schema = ^APPUN
new   1: alter session set current_schema = APEX_040200

Session altered.

timing for: Complete Installation
Elapsed: 01:46:11.17

PL/SQL procedure successfully completed.


GLOBAL_NAME
------------------------------
SYS

1 row selected.

 n  If you don’t see something similar to this or any error this script will exit out before completing the execution, and we need to fix the error.

SQL> connect / as sysdba
Connected.

- to check whether or not APEX is installed properly. The status should show VALID.

SQL> select status from dba_registry where comp_id='APEX'; 

STATUS
-------------------------------------------------------
VALID

Images script:  parameterit takes is one directory up. So this one directory level up-

SQL> connect / as sysdba
Connected.
SQL> @apxldimg c:
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
 Loading images directory: c:\/apex/images
Directory created.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Commit complete.
Directory dropped.
timing for: Load Images
Elapsed: 00:10:31.41
C:\apex>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu May 2 17:31:47 2013
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @apxconf
 PORT
----------
8080
Enter values below for the XDB HTTP listener port and the password for the Application Express ADMIN user.
Default values are in brackets [ ].
Press Enter to accept the default value.
Enter a value below for the password for the Application Express ADMIN user.
Enter a password for the ADMIN user     [] – <enter password here>
(remember this pwd as you will use this for login as admin)
Session altered.
...changing password for ADMIN
PL/SQL procedure successfully completed.
Enter a port for the XDB HTTP listener [      8080]
...changing HTTP Port
(leave it at 8080 if you don’t want to change the port number, if you want to change then change it to whatever you want, for LINUX there are rules to changes port numbers below 1024)
PL/SQL procedure successfully completed.

This completes the installation.

Now login to APEX admin:
localhost:8080/apex/apex_admin – this is the administrator page , local host since mine is local machine.
localhost:8080/apex/ - users access page
Now follow the instructions what it says from this page – Ex: change password, etc…

-Now you will be ablet o see lot of applications  like manage requests, manage instance, manage workspace, monitor activity.

Wednesday, May 1, 2013

TAB KEYS DO NOT WORK IN ORACLE WEBLOGIC FORMS SERVER

Problem:

In oracle weblogic forms server when we provide the username and hit the tab for password, it doesn't go to next level(password) instead it highlights the username section- this issue is after upgrading the JRE version to 1.7.17 from 1.6.


After entering username and then tabbing to password field fails. Instead the username is highlighted. Password field can be accessed using mouse.


Description:

Our Oracle forms version 11.1.1.6.

This is one of the known issues from Oracle, possibly this could be -
Java Script Actions Cause Form to Hang when Using JRE 1.7 [ID 1527994.1]

Solution:

But we fixed our issue after implementing step 2 from below steps:


1.  Install Java Release 7_u13 (ie. JRE 7 U13).   Another customer reported the issue reproduces on Java Release 7_u15 (ie. JRE 7 U15).

 -or-

2.  For Oracle Fusion Middleware 11g Release 1, wait for the release of patchset v. 11.1.1.7 . 

Otherwise, there is a one-off patch available for 11.1.1.6, but you need to consume the patchset when it becomes available :
 Patch:14277452 - APPS6: JRE7CERT: TAB KEYS DO NOT WORK IN LOV TO NAVIGATE TO FIND BUTTON (CTRL+L)

 -or-

3.  Upgrade to Oracle Fusion Middleware 11g Release 2 and install patchset 1 (v. 11.1.2.1.0).

 -or-

4.  Wait for the bugfix in the next Oracle Fusion Middleware Release 12.

Known issue from Oracle - Forms Login Screen Does Not Allow Tab To Next Field [ID 1526006.1]
This is also a bug reported by Oracle - Bug 15920248 : TAB KEY DOES NOT WORK ON LOGIN FORM