Running SQL Scripts Creating MapViewer Array Types, if Necessary

1-16 Oracle Fusion Middleware Users Guide for Oracle MapViewer attempting to connect to these databases. In this case, you can wait at least a few seconds and try the preceding request again. However, if you continue to get this response message, there may be a problem with the deployment. Check for any error messages, either in the OC4J console for a standalone OC4J deployment or in the redirected outputerrors log file of the OC4J instance for a full Oracle Fusion Middleware 10gR3 deployment. The following are common causes of this problem: ■ On a UNIX or Linux operating system, the Java virtual machine JVM was not started with the –Djava.awt.headless=true option, and no DISPLAY environment variable is set. This causes the MapViewer server to fail because the server accesses the Java graphics library, which on UNIX and Linux systems relies on the X11 windowing system. ■ You deployed the mapviewer.ear file to an incompatible version of Oracle Fusion Middleware or standalone OC4J. Note that the MapViewer 10.1.3.1 must be deployed to Application Server 10gR3 or standalone OC4J 10.1.3 or later. It will not work properly with earlier versions of Oracle Application Server or OC4J.

1.4.4.2 Running SQL Scripts

This section describes SQL scripts, one or more of which you must run while connected as the MDSYS user. For each script that you run, you must run it on each target Oracle database from which MapViewer will render spatial data. MapViewer uses a set of system views to store necessary mapping metadata in a target database. A target database is a database with Oracle Spatial or Oracle Locator Release 8.1.6 or later installed and from which you want MapViewer to be able to render maps. MapViewer requires following system views: ■ USER_SDO_MAPS ■ USER_SDO_THEMES ■ USER_SDO_STYLES ■ USER_SDO_CACHED_MAPS The USER_SDO_CACHED_MAPS view is used by the Oracle Maps feature. It stores definitions of map tile cache instances. You must create this view manually by running the following script while connected as the SYS user: MV_HOME webWEB-INFadminmcsdefinition.sql If the target database is release 9.2 or later, the other three views USER_SDO_MAPS, USER_SDO_THEMES, and USER_SDO_STYLES are created and populated automatically. However, if the target database has a release number lower than 9.2, you must manually create and populate these views by running the following scripts while connected as the MDSYS user: MV_HOME webWEB-INFadminmapdefinition.sql MV_HOME webWEB-INFadmindefaultstyles.sql

1.4.4.3 Creating MapViewer Array Types, if Necessary

For each database schema that it connects to, MapViewer checks for the existence of the following SQL array types that support array-type binding variables that might exist in some predefined themes: ■ MV_STRINGLIST ■ MV_NUMBERLIST Introduction to MapViewer 1-17 ■ MV_DATELIST If these types do not exist, MapViewer attempts to create them in the database schema associated with the MapViewer data source. However, if the user associated with that schema does not have sufficient privileges to create new types, a privileged user must create the types by connecting to the data source schema and entering the following statements: CREATE or REPLACE type MV_STRINGLIST as TABLE of VARCHAR21000; CREATE or REPLACE type MV_NUMBERLIST as TABLE of NUMBER; CREATE or REPLACE type MV_DATELIST as TABLE of DATE;

1.5 Administering MapViewer

This section introduces the MapViewer Administration page and some administrative and configuration tasks that you can perform, such as adding new data sources, managing map tile layers used by Oracle Maps, and setting logging levels.

1.5.1 Logging in to the MapViewer Administration Page

After you have verified that MapViewer is running properly, it is suggested that you log in to the MapViewer Administration page. To do this, go first to the MapViewer Welcome page, which is typically http:host:portmapviewer, where host and port should be replaced by the correct value for your installation. Figure 1–10 shows the MapViewer Welcome page Figure 1–10 MapViewer Welcome Page Click the Admin icon at the top right or text link at the bottom. A login prompt is displayed, asking for user name and password for the MapViewer administration page.