Jdbc theme query problems
Hi all,
I'm integrating Oracle Maps (10) in BISE, I've used Navtweq maps with my spatial data and I've created some maps, themes etc.
Now I'm trying to create some more complex JDBC themes.
Everything works fine if I use simple query, but I'm not able to create a theme whit more complex queries
for example I have 3 tables
m_admin_area2 (with geometric infos)
tab_supporto1 (a table with all the sales per day and region)
I want to know all the regions where my sales are incremented by 10% in a specified arch of time
this is the query :
select m_admin_area2.geometry, A.corrente, B.precedente, ((A.corrente-B.precedente)*100/B.precedente) INCREMENT
FROM
m_admin_area2,
Select m_admin_area2.feature_name, m_admin_area2.carto_id, sum
(tab_supporto1.tot) as corrente
from tab_supporto1, m_admin_area2
where m_admin_area2.carto_id = tab_supporto1.carto_id
and tab_supporto1.data_ordine <= 20071231
and tab_supporto1.data_ordine > 20061231
group by m_admin_area2.carto_id, m_admin_area2.feature_name) A ,
(Select m_admin_area2.feature_name, m_admin_area2.carto_id, sum
(tab_supporto1.tot) as precedente
from tab_supporto1, m_admin_area2
where m_admin_area2.carto_id = tab_supporto1.carto_id
and tab_supporto1.data_ordine <= 20061231
and tab_supporto1.data_ordine > 20051231
group by m_admin_area2.carto_id, m_admin_area2.feature_name ) B
WHERE m_admin_area2.carto_id = A.carto_id AND m_admin_area2.carto_id = B.carto_id
AND ((A.corrente-B.precedente)*100/B.precedente)>10The error returned is:
Cannot process the following response from FOI server:
<?xml version="1.0" encoding="UTF-8" ?> <oms_error> [Foi Server] foi process error.:Origine dati di mappa [oms] non trovata (map data source not found).</oms_error>
Thanks,
Luca
Message was edited by:
LukeBk
Could the error be similar to this:
JDBC query error
Hope this helps,
Dan Abugov (NAVTEQ)
Similar Messages
-
Problem Joining JDBC theme to XML NSDP file
I've created a basic map of Germany with different layers for regions etc. I've then added a dynamic JDBC theme using the following code
var baseQuery= "select geometry, name from world_sample.world_city_metropolis where iso_country_code = 'DEU'";
var theme = "<themes><theme name='MY_JDBC_THEME' >" +
"<jdbc_query spatial_column='geometry' jdbc_srid='8307' " +
"render_style='C.RED' datasource='WORLD_SAMPLE'>" + baseQuery +
"</jdbc_query></theme></themes>" ;
themebasedfoi = new MVThemeBasedFOI('themebasedfoi2',theme);
themebasedfoi.setBringToTopOnMouseOver(true);
mapview.addThemeBasedFOI(themebasedfoi);
I've then tried to bind this theme to a small XML source using this code
function setupNsdp(themebasedfoi)
var nsdpInfo = new MVNSDP("defaultNSDP");
nsdpInfo.setTheme("MY_JDBC_THEME");
nsdpInfo.setKeyColumn("name");
var xml_data = "<nsdp_xml>"+
"<table>"+
"<tr><th>name</th> <th>Revenue (M)</th></tr>"+
"<tr><td>BERLIN</td> <td>120.0</td></tr>"+
"</table>"+
"</nsdp_xml>";
var ps = new Object();
ps["xml"] = xml_data;
nsdpInfo.setParameters(ps);
themebasedfoi.setNSDP(nsdpInfo);
The problem is that when I click on the Berlin FOI on the map I get a pop up box that contains only the name of the city and not the Revenue Column which was defined in the XML sample.
I think that the setNSDP method must be failing but I'm not sure how to debug this. I've read many different tutorials and I'm sure that I ahve followed them correctly but if anyone could provide any info that may help me debug or fix this problem then that would be much appreciated
Thanks
DavidI just upgraded to Mapviewer 11 preview and it has fixed this issue.
-
[HELP] Error: "JDBC theme based FOI support is disabled for the given data"
Hi all,
I have already set up MapViewer version 10.1.3.3 on BISE1 10g OC4J server. I am current using JDK 1.6. I create a mvdemo/mvdemo user for demo data.
The MapViewer demo is running fine with some demo without CHART. But give this error with some maps that have CHART like: "Dynamic theme, BI data and Pie chart style", "Dynamic theme and dynamic Bar chart style". The error is:
----------ERROR------------
Cannot process the FOI response from MapViewer server. Server message is: <?xml version=\"1.0\" encoding=\"UTF-8\" ?> <oms_error> MAPVIEWER-06009: Error processing an FOI request.\nRoot cause:FOIServlet:MAPVIEWER-06016: JDBC theme based FOI support is disabled for the given data source. [mvdemo]</oms_error>.
----------END ERROR------
I searched many threads on this forum, some point me to have this allow_jdbc_theme_based_foi="true" in mapViewerConfig.xml and restart MapViewer.
<map_data_source name="mvdemo"
jdbc_host="localhost"
jdbc_sid="bise1db"
jdbc_port="1521"
jdbc_user="mvdemo"
jdbc_password="mvdemo"
jdbc_mode="thin"
number_of_mappers="3"
allow_jdbc_theme_based_foi="true"
/>
Error Images: [http://i264.photobucket.com/albums/ii176/necrombi/misc/jdbcerror.png|http://i264.photobucket.com/albums/ii176/necrombi/misc/jdbcerror.png]
I have this configuration, but no luck. Could anyone show me how to resolve this problem?
Rgds,
Dung NguyenOop, i managed to have this prob resolved!
My prob may come from this I use both scott and mvdemo schema for keeping demo data (import demo data).
Steps i made to resolve my prob are:
1) Undeploy MapViewer from Application Server Control (http://localhost:9704/em in my case)
2) Drop user mvdemo
3) Download mapviewer kit from Oracle Fusion Middleware MapViewer & Map Builder Version 11.1.1.2
4) Deploy MapViewer again
5) Recreate mvdemo and import demo data
6) Run mcsdefinition.sql, mvdemo.sql with mvdemo user (granted dba already)
7) Edit mapViewerConfig.xml
<map_data_source name="mvdemo"
jdbc_host="dungnguyen-pc"
jdbc_sid="bise1db"
jdbc_port="1521"
jdbc_user="mvdemo"
jdbc_password="!mvdemo"
jdbc_mode="thin"
number_of_mappers="3"
allow_jdbc_theme_based_foi="true"
/>
Save & Restart MapViewer
And now, all demos run fine. Hope this helpful for who meet prob like my case. -
Advanced Styles with JDBC Themes
Hi,
I am trying to use the Java API to add a JDBC theme to a map request (no problem we have been doing this for some time). However, I now want to apply a predefined Advanced style to that theme but am struggling to do so. If I predefine a theme and use the predefined advanced style them it works fine. When I user the .addJDBCTheme call with the advanced style as the style parameter it does not work. I am guessing I have to use the setThemeRenderingRules to get this to work but the documentation is not great and I can't find any examples. Has anyone applied an advanced theme to JDBC layers and if so how did you do it, any help much appreciated.
ChrisHi Chris,
when using a predefined theme the attribute column (or columns) to be used by the advanced style are defined on the theme definition.
For dynamic themes, you need to select the attribute on the dynamic SQL expression. On the following example, the column TOTPOP is used for the render style.
<themes>
<theme name="states" >
<jdbc_query
spatial_column="GEOM"
render_style="V.USSTATES TOTPOP"
jdbc_srid="8265"
datasource="mvdemo"
asis="false">select GEOM, TOTPOP from STATES
</jdbc_query>
</theme>
</themes>Joao -
JDBC batch query with insert sometimes hangs on executeBatch
We have the following problem:
Java client sends through JDBC INSERT query using batch,
and sometimes this query hangs.
In V$SESSION ACTIVE session appears, which remains ACTIVE forever.
Also locked object appears in V$LOCKED_OBJECT and open coursor appears.
How to know what happens inside the query? Why it hangs?
This is a thread dump for jdbc thread:
The thread dump is listed below:
"SdrWriterThread-1" prio=5 tid=0x184264c8 nid=0x214 runnable [18f1f000..18f1fd94]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at oracle.net.ns.Packet.receive(Unknown Source)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:718)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:690)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:373)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
- locked <0x10641b80> (a oracle.jdbc.ttc7.TTC7Protocol)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:2883)
- locked <0x100900d0> (a oracle.jdbc.driver.OraclePreparedStatement)
at com.jnetx.xr.persistence.DAO.executeBatch(DAO.java:66)Anton,
Why it hangs?It's waiting for a lock to be released. The default behaviour of Oracle is to wait indefinitely for a lock to be released.
You can see this behaviour if you try to update the same row from tw different "SQL*Plus" sessions, for example (since the default behaviour of "SQL*Plus" is not to automatically commit changes).
In one "SQL*Plus" session, update a row -- but do not commit. In the second session, try to update the same row -- it "hangs". It will remain like this until the first session releases the lock. The simplest way to release the lock is for the first session to execute either a "commit" or "rollback". As soon as you do that, you will see the first session become unstuck.
Of-course, from the [lack of] information you have posted, I cannot tell you what is holding the lock, or why.
Good Luck,
Avi. -
Complex predefined JDBC Theme with stacked styles ?
Is it possible to have a predefined Complex JDBC Theme and use stacked styles ?
complex JDBC themes use the features element of the theme to store a sql statement. I have tried adding other styles but it seems mapviewer only uses the first style rule.
Just want to check if there are workarounds to this or if I'm missing something.
I can always add extra predefined themes but I'm worried about the performance hit of querying the same table multiple times just to get different styles applied to the same data.Predefined themes with full SQL query defined use just one styling rule (the first one).
If you are able to define query conditions for your theme, then you may have a couple of options:
1) define several styling rules, each one with its query condition and styles.
2) define one rule with query condition and an advanced rendering rules. On the advanced rendering
rules section you can define several styles to be applied on your theme data.
Joao -
JDBC SQL Query Transactionality
Hi Experts,
If possible, please can you let me know how the JDBC SQL Query Transactionality works?
For example, in the JDBC communication channel configuration parameters,
if I use "SELECT * FROM orders WHERE new = 'TRUE' " for the select query and;
if I use "UPDATE orders SET new = 'FALSE' WHERE new = 'TRUE' " for the update query;
does the UPDATE query just update the records contained in that particular record set (for a particular polling instance)?
What happens if someone inserts new records into the orders table just before the update query executes? Will the update query update those records too? Or just those records in the record set for a particular polling instance? How does XI/PI distinguish between the records contained in the record set for (for a particular polling instance) and the records inserted just before the update query executes?
Thanks and regards,
Brendonhi,
as far as I remember this works correctly only when you set Transaction Isolation Levels to repeatable_read or serializable
have a look at those levels :
http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/TransactionIsolation.html
so I guess both of them should prevent situations you're talking about
Regards,
Michal Krawczyk -
These resets appear to coincide with a clearing of the cached queries for the DSN from memory, breaking all my sub queries that try to use the initial cached one. I am grasping at straws to discover the reset culprit, the DSN tests always show OK, there is not packet loss at the switch level. If anyone has some suggestions, I am all ears!
The resets are completely random and under no load. My sql 2008 r2 box is set to unlimited connections.
An example of a DSN setup is :
Maintain Connections [x]
String Format [ ]
Max Pooled Statements 100
Timeout 20 Interval 7
Query Timeout 0
Login Timeout 30
CLOB [ ]
BLOB [ ]
Long Text Buffer 64000
Blob Buffer 64000
Validate Connection [ ]
I am running the following :
CF Enterprise 10,0,13,287689
Tomcat 7.0.23.0
Ubuntu 1204 x64
Java VM 20.4-b02
Java 1.6 (Sun Microsystems Inc)
I have seen it suggested to uncheck the maintain connections advanced options but this doesn't seem like a good approach to the problem and will cause more stress on the sql box IMHO.
I have also seen it suggested to enable Validate Connection but documentation on this is a bit sparse...
Here are more examples of the initial reset error and then the subsequent cache related errors :
Database Error Information:
Native Error Code: 0
SQL State: 08S01
Query Error: [Macromedia][SQLServer JDBC Driver]A problem occurred when attempting to contact the server (Server returned: Connection reset). Please ensure that the server parameters passed to the driver are correct and that the server is running. Also ensure that the maximum number of connections have not been exceeded for this server.
Custom Error Code: 08S01
Database Error Information:
Native Error Code: 0
SQL State: n/a
Query Error:
Query Of Queries runtime error.
Table named GlobalDetails was not found in memory. The name is misspelled or the table is not defined.
Custom Error Code: n/a
Thanks in advance to anyone who has a suggestion.Hi, could DBA check MS SQL Server connection logs???
May be server has some limits (for example sessions, memory and e.t.c.) -
JDBC THEME-MAPVIEWER-05517 Request string is too long for Oracle Maps' non-
hi,
if I need a quite complex query to be added to dynamic JDBC theme I get this error:
[MAPVIEWER-05517] Request string is too long for Oracle Maps' non-AJAX remoting.
-why? I am using Oracle Maps JS API so it is AJAX remoting, or not?
-what is the limit of a JDBC theme definition?
regards,
Branohi,
yes, having look at MVMapView.enableXMLHTTP(true) in doc explains a lot...
thanks,
Brano -
Use JDBC to query data for JSP Report
Hi all,
I met a trouble when use JDBC to query data,
it can show data in report builder, but get error when call from url for exxample: http://localhost:8889/reports/TestJDBCReport.jsp
found error message:
javax.servlet.jsp.JspException: rwlib-1: REP-4100: Failed to execute data source. REP-0069: Internal error JDBCPDS-62000:Invalid sign-on parameter P_JDBCPDS
javax.servlet.jsp.JspException: rwlib-1: REP-4100: Failed to execute data source.
REP-0069: Internal error
JDBCPDS-62000:Invalid sign-on parameter P_JDBCPDS
anyone know pls help me
Many thanksAs a general rule, it's a good idea to separate the
presentation (JSP and HTML) from the business rules
(database access). I know you didn't do that on the
AS/400, you had display files and business logic in
the same program (at least, we certainly do in ours),
but it's a good policy to follow in the web world.
That means, don't put your database access code in
the JSP. Other than that, it depends on the data.
If you have simple data (e.g. customer's name and
d address) then a Java bean would suffice. If you
have complex data (e.g. customer's payment history)
then a bean still might suffice. You would use an
"include" if you had some data (static or dynamic)
that you wanted to appear in several different pages
in the same form.Thanks, I figured putting the code in the JSP was not the best way, but I wasn't sure about the other options. -
What, exactly, are 'encoded assets'? Why does removing them resolve problems? How can they be avoided in the first place?
As I understand it, encoding fomats your digital video clips and photos (assets) into Standard DVD mp2 format so that it can be burned to a DVD. If there has been an error in the encoding process, then you remove the old encoded assets and start over. There are numberous reasons why there can be errors in the encoding process.
-
Mapviewer map_request limitations for when using wms and jdbc themes?
Are there limitations to not use either the bounding_themes or the center option when a basemap requests both a jdbc and a wms theme? I would like to have the bounding_theme be the jdbc theme. I can see how this could pose challenges in that there would be a need to retrieve the jdbc theme and calc the mbr before issuing the wms requests w/ the correct bbox. Would be a nice feature though.
woops, sorry LJ -- it works. Do you have suggestions though for dealing w/ case where the jdbc theme returns one point? id like to use something like the border_margin to pad the point out to a box, but seems to always just return just the point. mkaes sense since multiplying 0 by anything is zero. we are planning on writing a servlet that instead uses sdo_buffer then construct the coordinates tag w/ the sdo_aggr_mbr. that should accommodate 1..n points returned.
<bounding_themes border_margin="0.05"> -
Sender JDBC Commn channel problem - Channel is not reading any data.
Hi,
I am referring to the following blog as i have exactly the same problem:
[Blog|Sender JDBC Commn channel problem;
I communication channel monitoring i am getting the following logs -
6/21/10 7:19:07 PM Processing started
6/21/10 7:19:07 PM Retry interval started. Length: 86400.0 seconds
Here in the channel the poling interval is 86400 seconds.
Now according to this blog the solution to my issue is "Check whether anything is locked in "Locking adapter" in VA? If there is then just release the lock and restart the comm channel. Note: In "locking adapter" the name will be something like $XIDBAD.JDBC2XI."
Mine is a PI7.1 system and i am not able to find any thing like this in NWA.
Can some one please help me on this?
Thanks & Regards,
Anshultry;
Goto NWA -> Availability and Performance Management -> Resource Monitoring -> Locks -
Hello APEX people,
I posted my problem here:
Designing LOV Query Problem
What I have is a sequence like this:
CREATE SEQUENCE
DR_SEQ_FIRST_SCHEDULE_GROUP
MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
CACHE 6 ORDER CYCLE ;
What I need would be a SQL query returning all possible values oft my sequence like:
1
2
3
4
5
6
7
I want to use it as a source for a LOV...
The reason why I use the cycling sequence is: My app uses it to cycle scheduling priorities every month to groups identified by this number (1-7).
In the Admin Form, I want to restrict the assignment in a user friendly way - a LOV.
Thanks
JohannHere ist the solution (posted by michales in the PL/SQL forum):
SQL> CREATE SEQUENCE
dr_seq_first_schedule_group
MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
CACHE 6 ORDER CYCLE
Sequence created.
SQL> SELECT LEVEL sn
FROM DUAL
CONNECT BY LEVEL <= (SELECT max_value
FROM user_sequences
WHERE sequence_name = 'DR_SEQ_FIRST_SCHEDULE_GROUP')
SN
1
2
3
4
5
6
7
7 rows selected. -
How to use bounding theme with jdbc theme
Hello
I'm using oracle maps javascript API to locate geometry with jdbc theme based foi, so how to use bounding theme with jdbc theme? Give me help, thanks.Hi,
You can find some information & code samples at this link :-
http://download-west.oracle.com/docs/cd/B19306_01/java.102/b14355/xadistra.htm#g1077100
Regards,
Sandeep
Maybe you are looking for
-
last night while i was sleeping at somone has tried to open my passcode if Iphone 6 plus model A1524. Now i cannot see the passcode screen and it just saysi phone is disable connect to itunes . Then i decided to restore my iphone and i have download
-
Use of tables V_T7MX02 and V_T5PRM
Hello people, can you help me what is the use of tables V_T7MX02 and V_T5PRM because we would like to have special tables for local reasons since in IT0000 we only use global reasons, So can this tables be used for other local reasons for action whic
-
How to add full screen text w/out losing audio. I have premier elements 12
I am creating a language tutorial. Am trying to add full screen text without losing the audio explanation of the text. How do I make this edit and not lose the audio that coincides with the full screen text?
-
I'm disgusted with Verizon right now and want out
I can't believe what Verizon has done to me over the last couple of months. It can't even be legal. I've had Verizon cell phones for 12 years. A couple of months ago, I casually called out of curiosity to see how much it would cost to upgrade my ph
-
Ipod Touch message "itunes can neither read nor write to "my Name" disk.
While syncing my Touch on I- Tunes, everything stopped and the message was "can neither read or write to B-----J-----"s ipod disk. I was on the phone for hours with Apple support, sent the Touch back twice to no avail. Finally found a newly acquired