Installation steps of Apex 4.0 with Oracle Application Express Listener as HTTP Listener.
Oracle Application Express Listener is a Java-based Web server. It features file system caching, support for FOP transformations to PDF, offers improved file upload capability, and is certified against Web Logic, Tomcat, OC4J, and Oracle Glassfish Server.
Installation of an Oracle Database Enterprise Edition, Standard Edition or Standard Edition One, Express) that is release 10.2.0.3 or higher.
For instance, Oracle Database - Installation of 11gR1/R2 on Windows
Minimum 100 Mo of Shared Pool Size
SQL> SHOW PARAMETER SHARED_POOL_SIZE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size big integer 0
SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='100M' SCOPE=spfile;
System altered.
SQL> SHUTDOWN
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP
ORACLE instance started.
Total System Global Area 778387456 bytes
Fixed Size 1374808 bytes
Variable Size 486540712 bytes
Database Buffers 285212672 bytes
Redo Buffers 5259264 bytes
Database mounted.
Database opened.
SQL> SHOW PARAMETER SHARED_POOL_SIZE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size big integer 104M
Download:
Disable any existing password complexity rules for the default profile.
SQL> @?/rdbms/admin/undopwd.sql
Profile altered.
where the script undopwd.sql undo the default password security settings from Oracle Database 11g
You can run the secconf.sql script to apply the Release 11g default password settings.
A profile is a collection of parameters that sets limits on database resources. If you assign the profile to a user, then that user cannot exceed these limits. You can use profiles to configure database settings such as sessions per user, logging and tracing features, and so on. Profiles can also control user passwords. To find information about the current password settings in the profile, you can query the DBA_PROFILES data dictionary view.
SQL> SELECT RESOURCE_NAME, limit FROM DBA_PROFILES
2 where profile = 'DEFAULT' and resource_type = 'PASSWORD';
RESOURCE_NAME LIMIT
-------------------------------- --------------------------------
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LIFE_TIME UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_FUNCTION NULL
PASSWORD_LOCK_TIME UNLIMITED
PASSWORD_GRACE_TIME UNLIMITED
7 rows selected.
Oracle Application Express must be installed from a writable directory on the file system
Code Syntax:
@script tablespace_apex tablespace_files tablespace_temp images
Where:
A Full development environment provides complete access to the Application Builder environment to develop applications. A Runtime environment enables users to run applications that cannot be modified.
Example for a full development environment
C:\temp\apex_4.0.2\apex>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 9 11:52:34 2011
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> @apexins SYSAUX SYSAUX TEMP /i/
Thank you for installing Oracle Application Express.
Oracle Application Express is installed in the APEX_040000 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)
When Oracle Application Express installs it creates three new database accounts:
If you are upgrading from a previous release, FLOWS_FILES, already exists and APEX_PUBLIC_USER is created if it does not already exist.
C:\temp\apex_4.0.2\apex>sqlplus / as sysdba
SQL> @apxchpwd
Enter a value below for the password for the Application Express ADMIN user.
Enter a password for the ADMIN user []
Session altered.
...changing password for ADMIN
PL/SQL procedure successfully completed.
Commit complete.
After you install Oracle Application Express, you must restart the processes that you stopped before you began the installation, such as listener and other processes.
SQL> ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
User altered.
SQL> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY pwd;
User altered.
In the default profile in Oracle Database 11g, the parameter PASSWORD_LIFE_TIME is set to 180. If you are using Oracle Database 11g with Oracle Application Express, this causes the password for APEX_PUBLIC_USER to expire in 180 days. As a result, your Oracle Application Express instance will become unusable until you change the password.
To prevent this behavior, create another profile in which the PASSWORD_LIFE_TIME parameter is set to unlimited and alter the APEX_PUBLIC_USER account and assign it the new profile.
the Installation Guide and follow instructions to complete installation and configuration steps is in the zip file
Oracle Application Express Listener can be installed:
C:\app\apex_listener>"%ProgramFiles%\Java\jre6\bin\java" -jar apex.war
INFO: Starting: C:\app\apex_listener\apex.war
See: 'java -jar apex.war --help' for full range of configuration options
INFO: Extracting to: C:\Users\gerard\AppData\Local\Temp\apex
Enter the path to the directory containing the APEX static resources
Example: /Users/myuser/apex/images
or press Enter to skip: C:\app\apex\images
INFO: Using classpath: file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/____em
bedded/start.jar:file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/WEB-INF/lib/
apex.jar:file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/WEB-INF/lib/commons-
fileupload-1.2.1.jar:file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/WEB-INF/
lib/je-4.0.103.jar:file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/WEB-INF/li
b/ojdbc6.jar:file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/WEB-INF/lib/ojmi
sc.jar:file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/WEB-INF/lib/poi-3.6-20
091214.jar:file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/WEB-INF/lib/ucp.ja
r:file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/WEB-INF/lib/xdb-11.2.0.jar:
file:/C:/Users/gerard/AppData/Local/Temp/apex/apex/WEB-INF/lib/xmlparserv2-11.2.
0.jar:
INFO: Starting Embedded Web Container in: C:\Users\gerard\AppData\Local\Temp\ape
x
Enter a username for the APEX Listener Administrator [adminlistener]: admin
Enter a password for admin:
Confirm password for admin:
Enter a username for the APEX Listener Manager [managerlistener]: manager
Enter a password for manager:
Confirm password for manager:
9-jun-2011 14:01:13 ____bootstrap.Deployer deploy
INFO: Will deploy application path=C:\Users\gerard\AppData\Local\Temp\apex\apex\
WEB-INF\web.xml
9-jun-2011 14:01:14 ____bootstrap.Deployer deploy
INFO: deployed application path=C:\Users\gerard\AppData\Local\Temp\apex\apex\WEB
-INF\web.xml
Using config file: C:\Users\gerard\AppData\Local\Temp\apex\apex-config.xml
APEX Listener version : 1.1.2.131.15.23
APEX Listener server info: Grizzly/1.9.18-o
9-jun-2011 14:01:15 com.sun.grizzly.Controller logVersion
INFO: Starting Grizzly Framework 1.9.18-o - Thu Jun 09 14:01:15 CEST 2011
INFO: Please complete configuration at: http://localhost:8080/apex/listenerConfigure
Database connection not yet configured
Password: pwd
Example:
"%ProgramFiles%\Java\jre6\bin\java" -Dapex.home=C:\temp\apex -Dapex.images=C:\app\apex\images -Dapex.port=8080 -Dapex.erase -jar apex.war
Specifying the options above produces the following results:
To display a full list of available commands, execute the following command:
java –jar apex.war --help
By default, the ability to interact with network services is disabled in Oracle Database 11g release 1 or 2.
Therefore, if you are running Oracle Application Express with Oracle Database 11g release 1 or 2, you must use the new DBMS_NETWORK_ACL_ADMIN package to grant connect privileges to any host for the APEX_040000 database user. Failing to grant these privileges results in issues with:
See the section 3.3.7 Enable Network Services in Oracle Database 11g to find the scripts to run.
The following example demonstrates how to grant connect privileges to any host for the APEX_040000 database user. This example assumes you connected to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role.
DECLARE
ACL_PATH VARCHAR2(4000);
ACL_ID RAW(16);
BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_040000
-- the "connect" privilege if APEX_040000 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
-- Before checking the privilege, ensure that the ACL is valid
-- (for example, does not contain stale references to dropped users).
-- If it does, the following exception will be raised:
--
-- ORA-44416: Invalid ACL: Unresolved principal 'APEX_040000'
-- ORA-06512: at "XDB.DBMS_XDBZ", line ...
--
SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
FROM XDB.XDB$ACL A, PATH_VIEW P
WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
EQUALS_PATH(P.RES, ACL_PATH) = 1;
DBMS_XDBZ.ValidateACL(ACL_ID);
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040000',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_040000', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'APEX_040000', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;
C:\app\apex_listener>java -jar apex.war
Exception in thread "main" java.lang.NoClassDefFoundError: ûjar
Caused by: java.lang.ClassNotFoundException: ûjar
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: ÔÇôjar. Program will exit.
Solution:
C:\app\apex_listener>"%ProgramFiles%\Java\jre6\bin\java" -jar apex.war