Installing Oracle Mapviewer

After i installed Oracle 11g DB R2 i started loading the spatial demo data into the database.

It simply includes the following steps:

  1. Download the sources for Oracle Fusion Middleware MapViewer
  2. Load the dump file into the database

After that i installed an OC4J container and deployed the mapviewer application in the following steps:

  1. I downloaded the latest OC4J container
  2. Unziped the oc4j_extended_101350.zip file into installation directory
  3. Created a startup script for the container
  4. # define ORACLE_HOME for oc4j
    export ORACLE_HOME=/opt/oc4j_extended_101350
    
    # define JAVA_HOME for oc4j
    export JAVA_HOME=/usr/java/jdk1.6.0_18
    
    cd $ORACLE_HOME/bin
    # run oc4j shell with start parameter
    ./oc4j -start
    
  5. Created a shutdown script for the container
  6. 
    # define ORACLE_HOME for oc4j
    export ORACLE_HOME=/opt/oc4j_extended_101350
    
    # define JAVA_HOME for oc4j
    export JAVA_HOME=/usr/java/jdk1.6.0_18
    
    cd $ORACLE_HOME/bin
    # run oc4j shell with start shutdown option and parameters port and password
    ./oc4j -shutdown -port 23791 -password welcome1
    

    you can find your rmi port number in the config file rmi.xml located in
    following direcotry: $ORACLE_HOME/j2ee/home/config

  7. run the startup script and deployed the mapviewer.ear using the webinterface
  8. After installation i changed log level of mapviewer and defined a datasource by editing the following lines in the mapViewerConfig.xml file located in $ORACLE_HOME/j2ee/home/applications/mapviewer/web/WEB-INF/conf/
  9.   <!-- Note: You must precede the jdbc_password value with a '!' (exclamation point), so that when MapViewer starts the next time, it will encrypt and replace the clear text password.
      -->
    <map_data_source name="mvdemo"
                     jdbc_host="localhost"
                     jdbc_sid="orcl"
                     jdbc_port="1521"
                     jdbc_user="mvdemo"
                     jdbc_password="!mvdemo"
                     jdbc_mode="thin"
                     number_of_mappers="3"
                     allow_jdbc_theme_based_foi="false"
    />
    

Now i can login to mapviewer and test the default map request.

  1. go to mapviewer url: http://[machine-name]:[portnumber]/mapviewer/
  2. click on tab request
  3. Define the map request and submit the request
  4. <?xml version="1.0" standalone="yes"?>
    <map_request
                 title="Oracle LBS MAP"
                 basemap="demo_map"
                 datasource = "mvdemo"
                 width="640"
                 height="480"
                 bgcolor="#a6cae0"
                 antialiase="false"
                 format="PNG_STREAM">
      <center size="0.15">
         <geoFeature render_style="m.star"
                           radius="1600,4800"
                            label="A Place"
                       text_style="t.Street Name" >
             <geometricProperty typeName="center">
                 <Point srsName="SDO:8307">
                     <coordinates>-122.2615, 37.5266</coordinates>
                 </Point>
             </geometricProperty>
         </geoFeature>
      </center>
    </map_request>
    
  5. If everything is configured correctly you will the with the request above the following image

When you don’t get the above image check the request is if your coordinates are correctly and if that’s so check the mapviewer log file to identify the problem.

Popularity: 10% [?]

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

No Responses to “Installing Oracle Mapviewer”

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>