MapViewer Permanent DataSource??
I Configure the mapViewerConfig.xml file like this:
<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="true"
/>
but promote error like this:
"The specified data source does not exist"
Noties: dynamic data source can be configed succeed;
someone help me ??
Hello. Sorry for my english/ I am from Russia.
Please suggest me.
I try to create datasource by admin request, but receive that error:
<oms_error>Access denied for this operation!</oms_error>
What does it mean?
Similar Messages
-
MapViewer add datasource by admin request - problem
Hello. Sorry for my english. I am from Russia.
Please suggest me.
I try to create datasource by admin request, but receive that error:
<oms_error>Access denied for this operation!</oms_error>
What does it mean?
that is request
<?xml version="1.0" standalone="yes"?>
<non_map_request>
<add_data_source
name="myds"
jdbc_host="mycomp1"
jdbc_port="1521"
jdbc_sid="orcl"
jdbc_user="user1"
jdbc_password="!123qwe"
jdbc_mode="thin"
number_of_mappers="3" />
</non_map_request>If you are using MApViewer 10g (e.g. 10.1.3) this has to be done from the Admin pages once you've logged in as an oc4jadmin.
To do this programmaticaly see LJ's post elsewhere in this forum on how to do this in Java. That was for clearing the map cache but the same logic applies here.
Re: How can I refresh the map cache for Oracle Maps ?
Jayant -
[Help] Cannot create datasource in Mapviewer
Hello. When I deploy MapViewer in OC4J standalone and log as oc4jadmin, i cannot create datasource for it. I edited mapViewerConfig.xml like this:
<map_data_source name="kuba"
jdbc_host="localhost"
jdbc_sid="orcl"
jdbc_port="1521"
jdbc_user="kuba"
jdbc_password="!BazaOracle1"
jdbc_mode="thin"
number_of_mappers="3"
allow_jdbc_theme_based_foi="true"
/>
After saving and restarting MapViewer, in datasource table there's no items. Any idea, what's wrong? Here's the log:
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig destroy
FINER: destroying MapperConfig: connection manager, mapper pool and janitor t
ad.
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperPool destroyAll
WARNING: destroying ALL mapmaker instances.
2010-12-02 12:05:19 oracle.lbs.mapserver.oms destroyMV
WARNING: Oracle MapViewer shut down.
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig readVersion
INFO: MapViewer server version: Ver11_B091229
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadConfigFile
INFO: using default config file: D:\app\Kubix\product\11.2.0\dbhome_1\j2ee\ho
applications\Map Viewer\web\WEB-INF\conf\mapViewerConfig.xml
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig checkSecuritySetti
WARNING: dcsf:true
2010-12-02 12:05:19 oracle.lbs.mapserver.core.Dimmer startElement
FINEST: found a datasource: kuba
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig scrambleConfigFile
INFO: Passwords in the config file has been encrypted.
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadConfigFile
FINER: Loading configuration file: D:\app\Kubix\product\11.2.0\dbhome_1\j2ee\
e\applications\Map Viewer\web\WEB-INF\conf\mapViewerConfig.xml
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperPool destroyAll
WARNING: destroying ALL mapmaker instances.
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig checkSecuritySetti
WARNING: dcsf:true
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig setLoggingOptions
INFO: Setting logging options for MapViewer
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig setLoggingOptions
INFO: setting logging level to finest
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadMapViewerConfi
FINEST:
Allowed IPs:
Excluded IPs:
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig registerNSDataProv
rs
FINEST: Non-Spatial Data Provider registered: defaultNSDP
2010-12-02 12:05:19 oracle.sdovis.SDataProviderMgr registerProvider
WARNING: Spatial Provider shapefileSDP is already registered.
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig registerSDataProvi
s
FINEST: Spatial Data Provider registered: shapefileSDP
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadMapViewerConfi
FINEST: Data source kuba will get web user name from: J2EE_USER
2010-12-02 12:05:19 oracle.sdovis.ds.NativeOracleDataSource <init>
SEVERE: Connection Cache with this Cache Name already exists
java.sql.SQLException: Connection Cache with this Cache Name already exists
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.j
:138)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.j
:175)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.j
:240)
at oracle.jdbc.pool.OracleConnectionCacheManager.createCache(OracleCo
ctionCacheManager.java:188)
at oracle.jdbc.pool.OracleDataSource.cacheInitialize(OracleDataSource
va:301)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.j
:284)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.j
:179)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.j
:159)
at oracle.sdovis.ds.NativeOracleDataSource.<init>(NativeOracleDataSou
.java:233)
at oracle.sdovis.ds.DSManager.registerOracleJdbcDS(DSManager.java:122
at oracle.lbs.mapserver.core.MapperConfig.createMappers(MapperConfig.
a:797)
at oracle.lbs.mapserver.core.MapperConfig.loadMapViewerConfig(MapperC
ig.java:1572)
at oracle.lbs.mapserver.core.MapperConfig.loadConfigFile(MapperConfig
va:609)
at oracle.lbs.mapserver.core.MapperConfig.<init>(MapperConfig.java:36
at oracle.lbs.mapserver.MapServerImpl.<init>(MapServerImpl.java:131)
at oracle.lbs.mapserver.MapServerImpl.<init>(MapServerImpl.java:115)
at oracle.lbs.mapserver.oms$ColdStart.run(oms.java:300)
at java.lang.Thread.run(Thread.java:662)
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig createMappers
SEVERE: Error creating NativeOracleDataSource.
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadMapViewerConfi
WARNING: MAPVIEWER-00011: Error creating a map data source.(kuba)
2010-12-02 12:05:19 oracle.lbs.mapserver.core.MapperConfig loadConfigFile
INFO: Map Recycling thread started.
2010-12-02 12:05:19 oracle.lbs.mapserver.oms$ColdStart run
INFO: *** Oracle MapViewer started. ***
2010-12-02 12:05:20 oracle.lbs.mapcache.MapCacheServer restart
INFO: Map cache server is restarted!
2010-12-02 12:05:20 oracle.lbs.foi.FOIImageRecycleThread run
FINE: FOI image recycle thread interrupted.
2010-12-02 12:05:20 oracle.lbs.foi.FOIImageRecycleThread run
FINE: FOI image recyle thread terminated.
2010-12-02 12:05:20 oracle.lbs.foi.FOIServer init
INFO: *** Oracle Feature of Interest (FOI) Server started. ***
2010-12-02 12:05:20 oracle.lbs.foi.FOIImageRecycleThread run
FINE: FOI image recycle thread interrupted.
2010-12-02 12:05:20 oracle.lbs.foi.FOIImageRecycleThread run
FINE: FOI image recyle thread terminated.
10/12/02 12:05:20 Message:MAPVIEWER-00019: Specified data source does not exist.
Thu Dec 02 12:05:20 CET 2010
Severity: 0
Description:
10/12/02 12:05:20 Message:MAPVIEWER-00019: Specified data source does not exist.
Thu Dec 02 12:05:20 CET 2010
Severity: 0
Description:
10/12/02 12:05:21 Message:MAPVIEWER-00019: Specified data source does not exist.
Thu Dec 02 12:05:21 CET 2010
Severity: 0
Description:Does restarting oc4j make any difference?
-
Hi all,
is it possible to configure a mapviewer jdbc datasource with failover cluster?
Something like this:
oracle:thin:@(DESCRIPTION=
(LOAD_BALANCE=on)
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=host1)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=service_name)))
A sample based on MVDEMO datasource would be helpful.For completion of this thread:
This can be done by the use of a container defined data source that can be looked up by Mapivewer through JNDI as already discribed in chapter 7.1 of mapviewer documentation. -
How to use MapViewer API?
Hi,
I have a problem that is acturally regarded to java programming. I want to use MapViewer JavaBean-Based API. I did the preparing work described in Mapviewer doc §4.2.
I saved the demo jsp page "mapclient.jsp" in my own application folder (under oc4j\j2ee\home\default-web-app). The other jsp pages written by myself can be displayed. But this mapclient.jsp can not be retrieved. "HTTP 500 internal server error The page cannot be displayed." It seems that I don't have J2EE container that contains the MapViewer service.
I also changed the codes of mapclient.jsp. I use
import oracle.spatial.mapclient.MapViewer;
MapViewer mv = new MapViewer("http://localhost ...");
It does not work, either. "The page cannot be displayed."
I don't know how to invoke the MapViewer service. I use oc4j standalone. I don't know how to get the error message, either.
I hope somebody can give me some suggestions. Thanks in advance.Hi,
about the addDataSource using the Java API, for now you have to disable the security
in order to add the data source using the MapViewer client API.
You can do that editing the MapViewer config file:
<mv_security enforce_sec_role="false" />
Assuming that you have added your data source, and you have rendered some map,
you can get the attribute information using the "identify" methods of the
MapViewer client API.
1) To identify one individual geometry:
String [][] result = mapviewer.identify(dataSource,table_name,columns,
geometry_column,srid, x, y);
where: "columns" contains the table attribute names that
you want to retrieve
x,y represents the device coordinate.
2) To identify geometries inside a rectangle:
String [][]result = mapviewer.identify(dataSource,table_name,columns,
geometry_column,srid, xlowleft,ylowleft,
xupright,yupright,false);
where the rectangle coordinates are defined by xlowleft,ylowleft,
xuprigth, and yuprigth values in device unit.
3) The resulted String array contains on the first row the attribute
names, and on the remaining rows the attribute values for each geometry.
int nlin = result.length; // return the number of lines
int col = result[0].length; // number of columns
To get the attribute names:
// attribute names
Object []tableattrs = new Object[ncol];
for(int j=0;j<ncol;j++)
tableattrs[j] = result[0][j];
To get the attribute values:
Object [][]tablevalues = new Object[nlin-1][];
for(int lin=1;lin<nlin;lin++)
tablevalues[lin-1] = new Object[ncol];
for(int col=0;col<ncol;col++)
tablevalues[lin-1][col] = result[lin][col];
Regards. -
CollectionBucketStyle in Mapviewer
Hello
Has something changed in building CollectionBucketStyle in Mapviewer?
We are using Mapviewer 904 and CollectionBucketStyle works fine in this version, however when we migrated to Mapviewer version 101202, our code doesn't work.
Any suggestions, where to start to search reason to this?
Regards Matti IsoviitaHi Matti,
It should not be a problem. Lets perform the following test. You will need the STATES table from MapViewer demo data set.
1) Execute the following commands in SQLPlus (they create a data to simulate your case).
create table testcb
value VARCHAR2(20),
geom sdo_geometry
insert into user_sdo_geom_metadata
select 'TESTCB','GEOM', diminfo, srid
from user_sdo_geom_metadata where table_name = 'STATES';
insert into testcb
select '#6F8DC1', geom from states where state_abrv = 'ME';
insert into testcb
select '#94B4DD', geom from states where state_abrv = 'NH';
create index testcb_idx on testcb(geom) indextype is mdsys.spatial_index;
commit;2) Now start MapViewer, add datasource 'mvdemo' and execute the following request on MapViewer's web page. You note that this request uses a couple of color styles, and a collection bucket style with values similar to what you have.
<?xml version="1.0" standalone="yes"?>
<map_request
title="Oracle LBS MAP"
datasource = "mvdemo"
width="640"
height="480"
bgcolor="#a6cae0"
antialiase="false"
format="PNG_STREAM">
<themes>
<theme name="theme1">
<jdbc_query
datasource="mvdemo"
jdbc_srid="8265"
spatial_column="geom"
render_style="stakesCollStyle"
>SELECT geom,value from testcb</jdbc_query>
</theme>
</themes>
<styles>
<style name="stakes_color1">
<svg width="1in" height="1in" >
<g class="color" style="stroke:red;stroke-opacity:100;fill:blue;fill-opacity:100" >
<rect width="50" height="50"/>
</g>
</svg>
</style>
<style name="stakes_color2">
<svg width="1in" height="1in" >
<g class="color" style="stroke:red;stroke-opacity:100;fill:red;fill-opacity:100" >
<rect width="50" height="50"/>
</g>
</svg>
</style>
<style name="stakesCollStyle">
<AdvancedStyle>
<BucketStyle>
<Buckets>
<CollectionBucket seq="0" label="stakes_color1" style="stakes_color1">#6F8DC1</CollectionBucket>
<CollectionBucket seq="1" label="stakes_color2" style="stakes_color2">#94B4DD</CollectionBucket>
</Buckets>
</BucketStyle>
</AdvancedStyle>
</style>
</styles>
</map_request>If the above request works (it should), then lets verify the request that your application is sending to MapViewer. To do that, set the logging level to finest on the configuration file and execute the request. Post the log results that includes the request and the information that follows it.
Thanks.
Joao -
I am using MapViewer 10g to create a JSP map, using JSP Tags as in the TagMap example. All works well, however, in building the page in question, beside creating and printing the map, I also use a within_distance query to print out a list of values. Now, on the map, I would like to be able to draw or add a dynamic theme which would be a semi-transparent raster circle, with a varying radius (dependent on the within_distance size) at the center of the map (X,Y). Any help would be greatly appreciated.
there is a bug in the addJDBCTheme tag where the asis attribute is ignored; normally if you set asis="true" then it should work (no spatial filter will be applied to your dynamic theme since it has no spatial index anyway). But somehow the asis attribute is ignored by the taglib.
The work around is to use the client api itself, as show below:
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ordim/mvtaglib.tld" prefix="mapviewer"%>
<P>Testing a point</P>
<P>
<mapviewer:init datasource="mvdemo"
url="http://localhost:8888/mapviewer/omserver"
id="mvhandle" />
<mapviewer:importBaseMap name="demo_map" />
<%
mvhandle.addJDBCTheme("mvdemo", "centerPoint",
"SELECT mdsys.sdo_geometry(2001, null, mdsys.sdo_point_type(-83, 39, null), null, null) geom FROM dual",
"geom", null, "M.CIRCLE", null, null, true); %>
<mapviewer:setParam centerX="-83" centerY="39" size="2" />
<mapviewer:run />
showing the map: <p>
<img src = "<mapviewer:getMapURL />" align=left />
</P> -
Access to non spatial tables in oracle mapviewer/ oracle maps V2
Hello,
We want to have access to non spatial oracle tables (for value list creation etc), existing in oracle mapviewer spatial datasource (ex datasource: MVDEMO/ nospatial table: Employees).
We have allready created the datasource MVDEMO and we want to avoid the creation of an external datasource to the same oracle user.
Thxs,
BillThanks. Your answer was very helpful. It pointed me in the right direction. I wanted to be able to generate a table, below the map, which listed all the points (and their associated data) shown on the map. The simplified code I used is shown below. The function is called using an event listener (map.addListener(OM.event.MapEvent.LAYER_ADDED, createTable) which fires after the pointlayer is added to the map.
function createTable(evt) {
var tableRecords = pointLayer.getAllFeatures();
var tableRecordsAttr = pointLayer.getAttributeNames();
divElem = document.createElement('div');
tableElem = document.createElement('table');
tbodyElem = document.createElement('tbody');
rowElem = document.createElement('tr');
// create the table headings
for (var i = 0; i < tableRecordsAttr.length; i++) {
colElem = document.createElement('th');
colElem.appendChild(document.createTextNode(tableRecordsAttr[i]));
rowElem.appendChild(colElem);
tbodyElem.appendChild(rowElem);
// populate each row of the table with data
for (var i = 0; i < tableRecords.length; i++) {
rowElem = document.createElement('tr');
for (var j = 0; j < tableRecordsAttr.length; j++) {
colElem = document.createElement('td');
colElem.appendChild(document.createTextNode(tableRecords[i].getAttributes()[tableRecordsAttr[j]]));
rowElem.appendChild(colElem);
tbodyElem.appendChild(rowElem);
tableElem.appendChild(tbodyElem);
divElem.appendChild(tableElem);
document.getElementsByTagName('body')[0].appendChild(divElem); -
MapViewer Demo Returns Blank Maps
I am installing the MapViewer for the first time. I imported mvdemo.dmp after creating the mvdemo user with:
SQL> grant connect, resource to mvdemo identified by mvdemo;
Then import from command line with:
imp mvdemo/mvdemo file=mvdemo.dmp full=y ignore=y
no errors
Then executing sql as mvdemo with :
SQL> @mvdemo.sql
The mapviewer runs the demo and connect to the db as it should. There are base maps, themes, styles etc viewable from the submits.
The image returned however is just a blue tile.
Any ideas where I missed a step?
ThanksHere is the console output
E:\j2sdk1.4.2_10\bin\javaw.exe -jar E:\JDeveloper1012\j2ee\home\admin.jar ormi://150.125.27.238:23891 admin **** -updateConfig
05/12/08 19:02:55 ApplicationServer: appName = bc4j
05/12/08 19:02:55 ApplicationServer: appName = current-workspace-app
Ready message received from Oc4jNotifier.
05/12/08 19:02:55 Auto-deploying file:/E:/JDeveloper1012/jdev/mywork/WebMap/ViewController/public_html/ (New server version detected)...
Embedded OC4J startup time: 1512 ms.
Target URL -- http://150.125.27.238:8988/WebMap-ViewController-context-root/webmap.jsp
Dec 8, 2005 7:02:57 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Dec 8, 2005 7:02:57 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Dec 8, 2005 7:02:57 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='view.ApplicationResources', returnNull=true
05/12/08 19:02:57 created a new MapViewer handle.
from the embedded oc4j in jdeveloper. The is the Map Image generated in the browser is just a Blue tile with the title, no base map. The JSP is below:
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/spatial/mvtaglib.tld" prefix="mapviewer"%>
<%@ page contentType="text/html;charset=windows-1252"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>untitled</title>
</head>
<body>
<DIV align="center">
<P>My Web Map</P>
<P>
<mapviewer:init url="http://vciwnorclmt.cipcpub.local/mapviewer/omserver" datasource="mvdemo" id="mvHandle"/>
</P>
</DIV>
<mapviewer:setParam antialiasing="true" basemap="demo_map" centerX="-122.4" centerY="37.8" height="450" size="10" title="My Web Map" width="600"/>
<mapviewer:run/>
<DIV align="center">
<img src="<mapviewer:getMapURL />"/>
</DIV>
</body>
</html> -
Jdbc openProxyConnection and MapViewer (or any packaged EAR)
Hi,
I'm cross-posting this from the "Oracle Spatial" forum to here, as the question actually applies to any packaged EAR where we don't have access to the source code.
Our requirement is to authenticate against an LDAP server, and then bring up MapViewer to access data on the Oracle DB. Once in the DB, we want to know (and record) who the real user is (i.e. charlie_brown), even though MapViewer connects via the data_source in mapViewerConfig.xml (i.e. gis_middletier).
The additional complication is the use of connection pooling in the middle-tier, which uses a generic account upon which the connection is made.
So... in a nutshell, is there a way to plug into MapViewer something like "conn.openProxyConnection" in the JDBC connection? If not, how are people passing in the authenticated user name through MapViewer generic datasource user, such that the authorizations are appropriate for the authenticated user (not the connection pool user and not the MapViewer data_source).
TIA,
GaryHi, it is recommended that you deploy MapViewer to an OC4J instance external to JDeveloper. MapViewer is not a small application and it may become memory intensive depending on the complexity of your map layers, as such it is better running in its own J2EE container. The embedded OC4J should only be used to run your JSP/ADF pages under development/testing. Also, deploying MapViewer to the embedded OC4J does not in any way simplify development, it may actually complicate things as the embedded OC4J is constantly being started/stopped, unlike a standalone OC4J which once started stays up unaffected by your JDeveloper activities.
thanks
LJ -
MapViewer JDeveloper embedded OC4J installation error
Hi,
I downloaded all latest mapviewer.ear and latest OC4J.
Followed MapviewerUG installation instructions
After starting OC4J
using the url http://localhost:8888/mapviewer/
works well and the demos like jview also works well
using the url http://localhost:8888/mapviewer/omserver
however, generates the following error
<?xml version="1.0" encoding="UTF-8" ?>
<oms_error>Message:[oms] empty or null xml map request string. Sat Apr 02 14:40:14 IST 2005 Severity: 0 Description: at oracle.lbs.mapserver.oms.getXMLDocument(oms.java:852) at oracle.lbs.mapserver.oms.doPost(oms.java:302) at oracle.lbs.mapserver.oms.doGet(oms.java:234) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534)</oms_error>
I also downloaded the latest JDeveloper 10G and JDeveloper extensions and follwed the instructions in the How To Document
How To Build Dynamic Maps Using JDeveloper 10g and Oracle Application Server MapViewer
An Oracle JDeveloper How To Document
Justin Lokitz
October 2004
I have no compilation errors but I am not able to view the density map. I am getting the Internal Server Error 500 instead.
Can anyone please guide me through this.
Thomas JosephHi Joao
Thanks for tip on the log file.
I have the data loaded.
Evrything works fine when I use Mapviewer with OC4J and try the jview demo.
I am however not able to get the example 'How to build Dynamic Maps' running using JDeveloper using the embeded OC4J server.
The jsp source is as follows
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/spatial/mvtaglib.tld" prefix="mapviewer"%>
<%@ page contentType="text/html;charset=windows-1252"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>untitled</title>
</head>
<body>
<DIV align="center">
<P>MapViewer WebMap</P>
<P>
<mapviewer:init url="http://localhost:8888/mapviewer/omserver" datasource="mvdemo" id="mvHandle"/>
</P>
</DIV>
<DIV align="center">
<mapviewer:setParam antialiasing="true" basemap="density_map" centerX="-122.4" centerY="37.8" height="450" size="10" title="MyWebMap" width="600"/>
<mapviewer:run/>
</DIV>
<img src="<mapviewer:getMapURL />"/>
</body>
</html>
There are no comilation errors
When I run the code I get 500 Internal Server Error.
The Application2-oc4j-app.log generated is as follows
05/04/05 20:04:11 Started
05/04/05 20:05:14 Application2-ViewController-webapp: JDevOJSP: init
05/04/05 20:05:14 Application2-ViewController-webapp: action: init
05/04/05 20:05:16 Application2-ViewController-webapp: 9.0.4.0.0 Started
05/04/05 20:05:28 Application2-ViewController-webapp: Servlet error
javax.servlet.jsp.JspException: Connection refused: connect
at oracle.lbs.mapclient.taglib.MapViewerRunTag.doStartTag(MapViewerRunTag.java:123)
at webmap.jspService(webmap.jsp:17)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
Please put me on the track. I am not able to figure out what is going wrong.
Regards
Thomas Joseph -
Hi,
Our requirement is to authenticate against an LDAP server, and then bring up MapViewer to access data on the Oracle DB. Once in the DB, we want to know (and record) who the real user is (i.e. charlie_brown), even though MapViewer connects via the data_source in mapViewerConfig.xml (i.e. gis_middletier).
The additional complication is the use of connection pooling in the middle-tier, which uses a generic account upon which the connection is made.
So... in a nutshell, is there a way to plug into MapViewer something like "conn.openProxyConnection" in the JDBC connection? If not, how are people passing in the authenticated user name through MapViewer generic datasource user, such that the authorizations are appropriate for the authenticated user (not the connection pool user and not the MapViewer data_source).
TIA,
GaryHi,
Currently there is no built-in support for db FGAC in MapViewer. We are however planning to add such feature at the data source and also theme level. Basically MapViewer will pass the LDAP or enterprise user's name and maybe also his role to the db (via application context) where access control can be implemented.
please send email to me (lj dot qian at oracle) directly if you would like to discuss a bit further on this. we are basically gathering requirments atm.
thanks -
Am attempting to understanding the inner workings of MapView specifically with topology for the purposes of building/editing .jsp applications. When I look at the source for the demo topology.jsp, I can see the mapRequest construct which includes the query - select topoColumn from featureTable. The rest of the mapRequest has information on the topology name, datasource, SRID, etc. When a map request is executed, the session log reveals a complex query that includes a number of joins with the topology tables (node, face, edge, feature). Where is the intelligence/code that tells Oracle/MapViewer to make that complex join?
topology.jsp with slight modifications to labels and map size but not the map request.
Default settings:
Map Viewer URL: http://m42b:8888/mapviewer/omserver
DataSource: mvdemo
Title: <blank>
Topology Name: tiger2005
Map Center X Coord: -71.0
Map Center Y Corod: 42.0
Map Size: 35.0
Show Mode: Debug
Feature Table: counties_topo
Topology Column: feature
Render Style: c.counties
Label Column: feature
Label Style: t.city_name
Spatial Reference ID (SRID): 8307
Test #1: The above settings produce the correct map
Test #2: Changed Show Mode to "Features"; java.sql.SQLException:ORA-00918: column ambiguously
defined error, did not specify which column, map not displayed
Test #3: Added the following code at line 154 of topology.jsp
String query = "select " + topoColumn;
if(labelColumn != null && labelColumn.length() > 0 &&
labelStyle != null && labelStyle.length() > 0)
query += "," + labelColumn;
query += " from " + featureTable + " where state_name = 'New Hampshire'";
Changed Show Mode to "Debug"; the entire map was returned, not the subset for New Hampshire
Test #4: Added " where state_name = 'New Hampshire'"; to line 113; changed Show Mode to
"Features"; returned the same error message as test #2, map not displayed.
SQL> select feature from counties_topo where state_name = 'New Hampshire';
FEATURE(TG_TYPE, TG_ID, TG_LAYER_ID, TOPOLOGY_ID)
SDO_TOPO_GEOMETRY(3, 1605, 1, 10)
SDO_TOPO_GEOMETRY(3, 1606, 1, 10)
SDO_TOPO_GEOMETRY(3, 1607, 1, 10)
SDO_TOPO_GEOMETRY(3, 1608, 1, 10)
SDO_TOPO_GEOMETRY(3, 1634, 1, 10)
SDO_TOPO_GEOMETRY(3, 1635, 1, 10)
SDO_TOPO_GEOMETRY(3, 1636, 1, 10)
SDO_TOPO_GEOMETRY(3, 1637, 1, 10)
SDO_TOPO_GEOMETRY(3, 1652, 1, 10)
SDO_TOPO_GEOMETRY(3, 1653, 1, 10)
10 rows selected.
SQL> select * from user_sdo_topo_metadata where table_name = 'COUNTIES_TOPO';
OWNER TOPOLOGY TOPOLOGY_ID TOLERANCE
SRID TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME TG_LAYER_ID TG_LAYER_T TG_LAYER_LEVEL
CHILD_LAYER_ID NODE_SEQUENCE EDGE_SEQUENCE
FACE_SEQUENCE TG_SEQUENCE DIGITS_RIGHT_OF_DECIMAL
MVDEMO TIGER2005 10 .05
8307 MVDEMO
COUNTIES_TOPO
FEATURE 1 POLYGON 0
TIGER2005_NODE_S TIGER2005_EDGE_S
TIGER2005_FACE_S TIGER2005_TG_S 16 -
How to use SEARCH-API provided by portal30 default schema
I want information about the search api provided by the
default portal30 schema.
How can i use that for my specific requirement.
i want to manipulate it's search limits
is it possible ???
Can i customize the specification provided in this apiHi,
about the addDataSource using the Java API, for now you have to disable the security
in order to add the data source using the MapViewer client API.
You can do that editing the MapViewer config file:
<mv_security enforce_sec_role="false" />
Assuming that you have added your data source, and you have rendered some map,
you can get the attribute information using the "identify" methods of the
MapViewer client API.
1) To identify one individual geometry:
String [][] result = mapviewer.identify(dataSource,table_name,columns,
geometry_column,srid, x, y);
where: "columns" contains the table attribute names that
you want to retrieve
x,y represents the device coordinate.
2) To identify geometries inside a rectangle:
String [][]result = mapviewer.identify(dataSource,table_name,columns,
geometry_column,srid, xlowleft,ylowleft,
xupright,yupright,false);
where the rectangle coordinates are defined by xlowleft,ylowleft,
xuprigth, and yuprigth values in device unit.
3) The resulted String array contains on the first row the attribute
names, and on the remaining rows the attribute values for each geometry.
int nlin = result.length; // return the number of lines
int col = result[0].length; // number of columns
To get the attribute names:
// attribute names
Object []tableattrs = new Object[ncol];
for(int j=0;j<ncol;j++)
tableattrs[j] = result[0][j];
To get the attribute values:
Object [][]tablevalues = new Object[nlin-1][];
for(int lin=1;lin<nlin;lin++)
tablevalues[lin-1] = new Object[ncol];
for(int col=0;col<ncol;col++)
tablevalues[lin-1][col] = result[lin][col];
Regards. -
I would like to embed my legend within my map request. I can display the legend on my page within a Table Row, but I would prefer it located inthe Southwest corner of my map image. Can this be done? I have seen it in XML done this way.
Here is my legend code as well as my map display code.
Thanks!
<tr><td><mv:makeLegend id="myLegend">
<legend bgstyle="fill:#ffffff;stroke:#ff0000" profile="SMALL" position="SOUTHWEST">
<column>
<entry text="Map Legend:" is_title="true" />
<entry style="M.GREEN" text="No Outages Reported" />
<entry style="M.RED" text="Outage Reported" />
<entry style="M.AMBER" text="Degraded Status Reported" />
</column>
</legend>
</mv:makeLegend>
<IMG SRC="<%=myLegend%>"></td></tr>
<tr align="center">
<td valign="top" align="center">
<input type="image"
border="1"
src="<mv:getMapURL />"
name="userClick"
alt="Click on the map for selected action">
</td></tr>Hi,
you can't use the makeLegend tag to embed it on map, but you can add an API method on your jsp code to add the legend. This is an example:
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/spatial/mvtaglib.tld" prefix="mapviewer"%>
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import="oracle.lbs.mapclient.MapViewer" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>untitled</title>
</head>
<body title="MapViewer WebMap">
<DIV align="center">
<mapviewer:init url="http://stadb35.us.oracle.com:8888/mapviewer/omserver" datasource="mvdemo" id="mvHandle"/>
<mapviewer:setParam basemap="density_map" width="600" height="450" antialiasing="true" title="My Web Map" centerX="-122.4" centerY="37.8" size="10"/>
<%
MapViewer mv = (MapViewer) session.getAttribute("mvHandle");
mv.setMapLegend("<legend bgstyle=\"fill:#ffffff;stroke:#ff0000\" " +
"profile=\"MEDIUM\" position=\"SOUTHWEST\">\n" +
"<column>\n" +
"<entry text=\"Map Legend:\" is_title=\"true\" />\n " +
"<entry style=\"V.COUNTY_POP_DENSITY\" tab=\"1\"/>\n " +
"</column>\n " +
"</legend>");
%>
<mapviewer:run/>
</DIV>
<img src="<mapviewer:getMapURL />"/>
</body>
</html>
Maybe you are looking for
-
hello, I run windows 7 home premium edition x64 on my machine HP Pavilion dv6-6b20ee ... when I try to install Apple 's iTunes this error always popup and refuse to complete the installation... I had several times to contact crosoft Team and Apple Te
-
SAP Business Objects installaton on Windows 2008 R2 Server
Hi Experts, I need to Business Objects on 64-bit SQL Server 2008 R2 Enterprise Edition on x64 systems - Windows Server 2008 R2 Enterprise Edition. Can any guide me with the steps regarding the installation? Regards, Jesal
-
Ugly e-mail from friend; 25X copies!
My bud is miffed because when I send out an email from my iPhone, she gets it 25 times! Some with attachment, some without, some messages partially complete, some fully there. Trust me, I push the send button ONCE, not 25 times. This has happened on
-
How do I customize my signature in iCloud mail?
How can I customize my signature in iCloud mail?
-
Multiple content databases and Project Sites
Hi, I am in the process of migrating our Project 2007 PWA + Project Workspaces data to Project 2010. Our PWA site and the Project Workspaces are in a single content DB (2007) and I am trying to work out what I should do when I migrate it. Our conte