Cannot perform dml operation inside a query
I have created a function which does some dml opration.
when I use it in a through a transformation operator, and execute the map,
it throws the following error:
cannot perform dml operation inside a query
how to handle this?
Hi,
if you want to execute the dml within a mapping, use the pre or post mapping procress operator. Or use a sql*plus activity in the process flow.
Regards,
Carsten.
Similar Messages
-
"cannot perform a DML operation inside a query" error when using table func
hello please help me
i created follow table function when i use it by "select * from table(customerRequest_list);"
command i receive this error "cannot perform a DML operation inside a query"
can you solve this problem?
CREATE OR REPLACE FUNCTION customerRequest_list(
p_sendingDate varchar2:=NULL,
p_requestNumber varchar2:=NULL,
p_branchCode varchar2:=NULL,
p_bankCode varchar2:=NULL,
p_numberOfchekbook varchar2:=NULL,
p_customerAccountNumber varchar2:=NULL,
p_customerName varchar2:=NULL,
p_checkbookCode varchar2:=NULL,
p_sendingBranchCode varchar2:=NULL,
p_branchRequestNumber varchar2:=NULL
RETURN customerRequest_nt
PIPELINED
IS
ob customerRequest_object:=customerRequest_object(
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
condition varchar2(2000 char):=' WHERE 1=1 ';
TYPE rectype IS RECORD(
requestNumber VARCHAR2(32 char),
branchRequestNumber VARCHAR2(32 char),
branchCode VARCHAR2(50 char),
bankCode VARCHAR2(50 char),
sendingDate VARCHAR2(32 char),
customerAccountNumber VARCHAR2(50 char),
customerName VARCHAR2(200 char),
checkbookCode VARCHAR2(50 char),
numberOfchekbook NUMBER(2),
sendingBranchCode VARCHAR2(50 char),
numberOfIssued NUMBER(2)
rec rectype;
dDate date;
sDate varchar2(25 char);
TYPE curtype IS REF CURSOR; --RETURN customerRequest%rowtype;
cur curtype;
my_branchRequestNumber VARCHAR2(32 char);
my_branchCode VARCHAR2(50 char);
my_bankCode VARCHAR2(50 char);
my_sendingDate date;
my_customerAccountNumber VARCHAR2(50 char);
my_checkbookCode VARCHAR2(50 char);
my_sendingBranchCode VARCHAR2(50 char);
BEGIN
IF NOT (regexp_like(p_sendingDate,'^[[:digit:]]{4}/[[:digit:]]{2}/[[:digit:]]{2}$')
OR regexp_like(p_sendingDate,'^[[:digit:]]{4}/[[:digit:]]{2}/[[:digit:]]{2}[[:space:]]{1}[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}$')) THEN
RAISE_APPLICATION_ERROR(-20000,cbdpkg.get_e_m(-1,5));
ELSIF (p_sendingDate IS NOT NULL) THEN
dDate:=TO_DATE(p_sendingDate,'YYYY/MM/DD hh24:mi:ss','nls_calendar=persian');
dDate:=trunc(dDate);
sDate:=TO_CHAR(dDate,'YYYY/MM/DD hh24:mi:ss');
condition:=condition|| ' AND ' || 'sendingDate='||'TO_DATE('''||sDate||''',''YYYY/MM/DD hh24:mi:ss'''||')';
END IF;
IF (p_requestNumber IS NOT NULL) AND (cbdpkg.isspace(p_requestNumber)=0) THEN
condition:=condition|| ' AND ' || ' requestNumber='||p_requestNumber;
END IF;
IF (p_bankCode IS NOT NULL) AND (cbdpkg.isspace(p_bankCode)=0) THEN
condition:=condition|| ' AND ' || ' bankCode='''||p_bankCode||'''';
END IF;
IF (p_branchCode IS NOT NULL) AND (cbdpkg.isspace(p_branchCode)=0) THEN
condition:=condition|| ' AND ' || ' branchCode='''||p_branchCode||'''';
END IF;
IF (p_numberOfchekbook IS NOT NULL) AND (cbdpkg.isspace(p_numberOfchekbook)=0) THEN
condition:=condition|| ' AND ' || ' numberOfchekbook='''||p_numberOfchekbook||'''';
END IF;
IF (p_customerAccountNumber IS NOT NULL) AND (cbdpkg.isspace(p_customerAccountNumber)=0) THEN
condition:=condition|| ' AND ' || ' customerAccountNumber='''||p_customerAccountNumber||'''';
END IF;
IF (p_customerName IS NOT NULL) AND (cbdpkg.isspace(p_customerName)=0) THEN
condition:=condition|| ' AND ' || ' customerName like '''||'%'||p_customerName||'%'||'''';
END IF;
IF (p_checkbookCode IS NOT NULL) AND (cbdpkg.isspace(p_checkbookCode)=0) THEN
condition:=condition|| ' AND ' || ' checkbookCode='''||p_checkbookCode||'''';
END IF;
IF (p_sendingBranchCode IS NOT NULL) AND (cbdpkg.isspace(p_sendingBranchCode)=0) THEN
condition:=condition|| ' AND ' || ' sendingBranchCode='''||p_sendingBranchCode||'''';
END IF;
IF (p_branchRequestNumber IS NOT NULL) AND (cbdpkg.isspace(p_branchRequestNumber)=0) THEN
condition:=condition|| ' AND ' || ' branchRequestNumber='''||p_branchRequestNumber||'''';
END IF;
dbms_output.put_line(condition);
OPEN cur FOR 'SELECT branchRequestNumber,
branchCode,
bankCode,
sendingDate,
customerAccountNumber ,
checkbookCode ,
sendingBranchCode
FROM customerRequest '|| condition ;
LOOP
FETCH cur INTO my_branchRequestNumber,
my_branchCode,
my_bankCode,
my_sendingDate,
my_customerAccountNumber ,
my_checkbookCode ,
my_sendingBranchCode;
EXIT WHEN (cur%NOTFOUND) OR (cur%NOTFOUND IS NULL);
BEGIN
SELECT requestNumber,
branchRequestNumber,
branchCode,
bankCode,
TO_CHAR(sendingDate,'yyyy/mm/dd','nls_calendar=persian'),
customerAccountNumber ,
customerName,
checkbookCode ,
numberOfchekbook ,
sendingBranchCode ,
numberOfIssued INTO rec FROM customerRequest FOR UPDATE NOWAIT;
--problem point is this
EXCEPTION
when no_data_found then
null;
END ;
ob.requestNumber:=rec.requestNumber ;
ob.branchRequestNumber:=rec.branchRequestNumber ;
ob.branchCode:=rec.branchCode ;
ob.bankCode:=rec.bankCode ;
ob.sendingDate :=rec.sendingDate;
ob.customerAccountNumber:=rec.customerAccountNumber ;
ob.customerName :=rec.customerName;
ob.checkbookCode :=rec.checkbookCode;
ob.numberOfchekbook:=rec.numberOfchekbook ;
ob.sendingBranchCode:=rec.sendingBranchCode ;
ob.numberOfIssued:=rec.numberOfIssued ;
PIPE ROW(ob);
IF (cur%ROWCOUNT>500) THEN
CLOSE cur;
RAISE_APPLICATION_ERROR(-20000,cbdpkg.get_e_m(-1,4));
EXIT;
END IF;
END LOOP;
CLOSE cur;
RETURN;
END;Now what exactly would be the point of putting a SELECT FOR UPDATE in an autonomous transaction?
I think OP should start by considering why he has a function with an undesirable side effect in the first place. -
ORA-14551: cannot perform a DML operation inside a query
I have a Java method which is deployed as a Oracle function.
This Java method parses a huge XML & populates this data
into a set of database tables.
I have to call this Oracle function in a unix shell script using sqlplus.
Value returned by this function will be used by the shell script to decide
what to do next.
I am calling the Oracle Java function as follows in the shell script:
echo "SELECT XML_TABLES.RUN_XML_LOADER('$P1','$P2','$P3','$P4') FROM DUAL;\n" | sqlplus $DB_USER > $LOG
This gives error - "ORA-14551: cannot perform a DML operation inside a query".
If I have to add a AUTONOMOUS_TRANSACTION pragma to this Java function,
where to I add it considering, that the definition of the function is in a Java class.
Can we do it in call spec?
create or replace package XML_TABLES is
function RUN_XML_LOADER(xmlFile IN VARCHAR2,
xmlType IN VARCHAR2,
outputDir IN VARCHAR2,
logFileDir IN VARCHAR2) RETURN VARCHAR2 AS
LANGUAGE JAVA NAME 'XmlLoader.run
(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
return java.lang.String';
end XML_TABLES;
If not is there any other way to acheive this?
Thanks in advance.
Sunitha.If I have to add a AUTONOMOUS_TRANSACTION pragma to this Java function,You'd have to write a PL/SQL function that calls the JSP. But I would caution you about using that pragma. It does introduce tremendous complexity into processing.
As I see it you only need a function to return the result code so why not use a procedure with an OUT parameter?
Cheers, APC
Of course Yoann's suggestion of using an anonymous block would work too.
Message was edited by:
APC -
Getting error SQL Error : ORA-14551: cannot perform a DML operation inside a query
Hi gurus ,
Your help is greatly appreciated ..
I am doing some changes in the fucntion for an existing package .Introducing the new below check , am updating one of the tables based on a if condition ..
IF numALLOWED_COUNT >= numLAST_COUNT_ADDED+1 THEN
blnGDS_Allowed :=True;
varSTMT := 'UPDATE PROD.TMS_PROCESS_COUNTER ';
varSTMT := varSTMT ||' SET last_count_added = last_count_added+1';
varSTMT := varSTMT ||' WHERE process_name = ''DAILY_GDS_COUNT''';
varSTMT := varSTMT ||' AND COUNTER_IND = ''750FD130''';
PROC_LOG('Update Tms_Process_counter varSTMT --' || varSTMT);
IF INSERT_BATCH(99,varSTMT) > 0 THEN
NULL;
END IF;
Function for insert_batch :
UNCTION INSERT_BATCH(numTABLE_ID IN NUMBER, varSQL_STATEMENT IN VARCHAR2) RETURN NUMBER IS
varINSERT_BATCH_STMT VARCHAR2(32767) := NULL;
varADD_REC_TYPE BATCH_TABLES.ADD_REC_TYPE%TYPE;
BEGIN
PROC_LOG( 'INSIDE INSERT_BATCH IRC : ' || varSQL_STATEMENT ); --IRC 9/20 UC
INSERT INTO BATCH_STATEMENT(QUEUE_ID,TABLE_ID,STATEMENT,QUEUE_SEQUENCE_ID)
VALUES (numQUEUE_ID,numTABLE_ID,varSQL_STATEMENT,1);
RETURN 1;
EXCEPTION WHEN OTHERS THEN
PROC_LOG('Failed in INSERT_BATCH');
PROC_LOG('SQL Error : ' || SUBSTR(SQLERRM,1,1000));
RETURN -1;
END INSERT_BATCH;
desc PROD.BATCH_STATEMENT
QUEUE_ID NUMBER(15) NOT NULL
TABLE_ID NUMBER(2) NOT NULL
STATEMENT VARCHAR2(4000 BYTE) NOT NULL
QUEUE_SEQUENCE_ID NUMBER(5) NOT NULL
Some how when its calling the insert_batch , its giving me the error in the logs as below:
04:01:41 - Update Tms_Process_counter varSTMT --UPDATE PROD.TMS_PROCESS_COUNTER SET last_count_added = last_count_added+1 WHERE process_name = 'DAILY_GDS_COUNT' AND COUNTER_IND = '750FD130'
04:01:41 - INSIDE INSERT_BATCH IRC : UPDATE PROD.TMS_PROCESS_COUNTER SET last_count_added = last_count_added+1 WHERE process_name = 'DAILY_GDS_COUNT' AND COUNTER_IND = '750FD130'
04:01:41 - Failed in INSERT_BATCH
04:01:41 - SQL Error : ORA-14551: cannot perform a DML operation inside a querySome how when its calling the insert_batch , its giving me the error in the logs as below:
04:01:41 - SQL Error : ORA-14551: cannot perform a DML operation inside a query
Yes - and the exception is telling you EXACTLY what the problem is. You have a query
IF INSERT_BATCH(99,varSTMT) > 0 THEN
And you are performing a DML operation inside that query:
INSERT INTO BATCH_STATEMENT(QUEUE_ID,TABLE_ID,STATEMENT,QUEUE_SEQUENCE_ID)
VALUES (numQUEUE_ID,numTABLE_ID,varSQL_STATEMENT,1);
Like the exception says: you can't do that.
You need to call the function using PL/SQL and capture the return value into a variable. Then test that variable:
myVar := INSERT_BATCH(99,varSTMT);
if myVar > 0 THEN -
Probelm regarding function ( can not perform dml openration inside a query
hi all,
i have created on function which is used for delete rows and insert new rows ( records) but when i run i got
ora-14551 -can not perform a DML operation inside a query
0ra-06512 - fn_brok_upfdate_dtltbl , line no 21
this error
following are my code please help me
CREATE OR REPLACE FUNCTION Fn_Brok_Update_Dtltbl
(fnBROK_TYPE VARCHAR2,fnSLAB_ID VARCHAR2, fnINV_TYPE_CODE VARCHAR2)
RETURN NUMBER
AS
fnCOUNT PLS_INTEGER;
fnTBLNAME VARCHAR2(40);
fnTMPINV_TYPE_CODE VARCHAR2(1000);
fnTMPINVCODE VARCHAR2(50);
fnMYQUERY VARCHAR2(4000);
BEGIN
IF UPPER(fnBROK_TYPE) = 'UPFRONT' THEN
fnTBLNAME :='UPFRONT_RECD_DTL';
END IF ;
IF fnSLAB_ID IS NOT NULL AND fnINV_TYPE_CODE IS NOT NULL THEN
fnTMPINV_TYPE_CODE := fnINV_TYPE_CODE ;
fnMYQUERY := 'SELECT COUNT(*) FROM '||fnTBLNAME||' WHERE SLAB_ID = '''||fnSLAB_ID||'''' ;
EXECUTE IMMEDIATE fnMYQUERY INTO fnCOUNT ;
IF fnCOUNT > 0 THEN
DELETE FROM UPFRONT_RECD_DTL WHERE slab_id = fnslab_id ;
END IF ;
WHILE fnTMPINV_TYPE_CODE IS NOT NULL
LOOP
SELECT CASE WHEN INSTR(fnTMPINV_TYPE_CODE,',')= 0 THEN fnTMPINV_TYPE_CODE
ELSE Strsplit(fnTMPINV_TYPE_CODE,1,INSTR(fnTMPINV_TYPE_CODE,',') - 1 ) END INTO fnTMPINVCODE FROM DUAL ;
fnMYQUERY := 'INSERT INTO '||fnTBLNAME||'(SLAB_ID, INV_TYPE_CODE)
VALUES ('''||fnSLAB_ID||''','||fnTMPINVCODE||') ' ;
EXECUTE IMMEDIATE fnMYQUERY ;
SELECT CASE WHEN INSTR(fnTMPINV_TYPE_CODE,',')= 0 THEN NULL
ELSE Strsplit(fnTMPINV_TYPE_CODE,INSTR(fnTMPINV_TYPE_CODE,',')+ 1 , LENGTH(fnTMPINV_TYPE_CODE)) END
INTO fnTMPINV_TYPE_CODE FROM DUAL ;
END LOOP ;
fnCOUNT := 1 ;
RETURN fnCOUNT ;
END IF ;
END ;
[\pre]How did you call this function ? from SQL Statement ? Then No way .. . .
ORA-14551: cannot perform a DML operation inside a query
Cause: DML operation like insert, update, delete or select-for-update cannot be performed inside a query or under a PDML slave.
Action: Ensure that the offending DML operation is not performed or use an autonomous transaction to perform the DML operation within the query or PDML slave -
Why we cannot perform DML operations against complex views directly.
hi
can any tell me why we cannot perform DML operations against complex views directly.Hi,
It is not easy to perform DML operations on complex views which involve more than one table as said by vissu. The reason being you may not know which columns to be updated/inserted/deleted on the base tables of the views. If it is a simple view containing a single table it is as simple as performing actions on the table.
For further details visit this
http://www.orafaq.com/wiki/View
cheers
VT -
Cannot perform a DML operation inside a query
Dear all,
I have implemented the "Online Discussion Forum" of Steve Muench (Building Oracle XML Applications,ISBN:1-56592-691-9), and am trying to extend it by logging the queries and timing information inside the ForumSearch.Hits function (http://examples.oreilly.com/orxmlapp/orxmlapp_examples.zip).
That function is called as follow
SELECT ForumSearch.Hits(...) as HITS from DUAL
However, I am getting the ORA-14551.
That function opens a cursor and performs a select count() on a dynamic SQL, closes the cursor and returns the number of hits found.
The way i tried to extend it was to simply add the following line after the_cursor was closed.
insert into LOGGING values(the_count,response);
However, unfortunately I get the fatal error message
ORA-14551
I do understand that one shall not do an INSERT while doing a SELECT on the same table, however in this case I am doing a INSERT on another table ...
Puzzling enough, if I try to launch a DBMS_JOB for doing that insert I get a ORA-14551 as well.
I thought that by launching the DBMS_JOB I was going to uncouple the 2 events ...
Advice is appreciated.
LucaAs you discovered, Oracle will not allow you to directly manipulate the database within a select statement. Since the call to dbms_job actually inserts a row in a table, you just moved the DML to a different table. What you need to do is create a seperate procedure to do the logging, and call that in your function. Something like:
CREATE PROCEDURE logger (p_count IN NUMBER, p_reponse IN VARCHAR2) IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO logging VALUES (p_count, p_response);
COMMIT;
END;then, your function would look something like:
CREATE FUNCTION counter RETURN NUMBER IS
l_count NUMBER;
l_response VARCHAR2(10);
BEGIN
SELECT COUNT(*) INTO l_rval
FROM t;
logger(l_count,l_reponse);
RETURN l_count;
END;TTFN
John -
Cannot perform DML inside a query
Hi,
I have a Function and I am trying to execute an "Insert" statement into the Function. It gives me an error saying that-
ERROR:
ORA-14551: cannot perform a DML operation inside a query
ORA-06512: at "SCOTT.POP3", line 243
I then tried adding : PRAGMA AUTONOMOUS_TRANSACTION to the Function and then it gives me an error saying-
ERROR:
ORA-06519: active autonomous transaction detected and rolled back
ORA-06512: at "SCOTT.POP3", line 245
My code snippet is as follows :
CREATE OR REPLACE FUNCTION pop3 (
username VARCHAR2,
PASSWORD VARCHAR2,
msgnum NUMBER
RETURN tstrings PIPELINED
IS
--PRAGMA AUTONOMOUS_TRANSACTION;
pop3_server CONSTANT VARCHAR2 (100) := 'pop.secureserver.net';
pop3_port CONSTANT NUMBER := 110;
pop3_ok CONSTANT VARCHAR2 (10) := '+OK';
e_pop3_error EXCEPTION;
socket UTL_TCP.connection;
line VARCHAR2 (30000);
line2 VARCHAR2 (30000);
BYTES INTEGER;
msg_from varchar2(4000) := '';
msg_to varchar2(4000) := '';
msg_date varchar2(4000) := '';
msg_sub varchar2(4000) := '';
msg_body clob := NULL;
hyphen_checker number := 0;
msg_body_flag number := 0;
crlf varchar2(2) := chr(13) || chr(10);
-- send a POP3 command
-- (we expect each command to respond with a +OK)
FUNCTION writetopop (command VARCHAR2)
RETURN VARCHAR2
IS
len INTEGER;
resp VARCHAR2 (30000);
BEGIN
len := UTL_TCP.write_line (socket, command);
UTL_TCP.FLUSH (socket);
-- using a hack to check the popd response
len := UTL_TCP.read_line (socket, resp);
IF SUBSTR (resp, 1, 3) != pop3_ok
THEN
RAISE e_pop3_error;
END IF;
RETURN (resp);
END;
BEGIN
DBMS_LOB.CREATETEMPORARY(msg_body,true);
PIPE ROW ('pop3:' || pop3_server || ' port:' || pop3_port);
-- Just to make sure there are no previously opened connections
UTL_TCP.close_all_connections;
-- open a socket connection to the POP3 server
socket :=
UTL_TCP.open_connection (remote_host => pop3_server,
remote_port => pop3_port,
--tx_timeout => POP3_TIMEOUT,
CHARSET => 'US7ASCII'
-- read the server banner/response from the pop3 daemon
PIPE ROW (UTL_TCP.get_line (socket));
-- authenticate with the POP3 server using the USER and PASS commands
LOOP
EXIT WHEN LENGTH (line) = 1 AND line = '.';
END LOOP;
INSERT INTO email (em_issue, em_date, em_from, em_to, em_subject, em_body)
VALUES(seq_issue.nextval, msg_date, msg_from, msg_to, msg_sub, msg_body);
DBMS_LOB.freetemporary(msg_body);
msg_from := '';
msg_to := '';
msg_date := '';
msg_sub := '';
msg_body := NULL;
-- close connection
PIPE ROW ('QUIT');
PIPE ROW (writetopop ('QUIT'));
UTL_TCP.close_connection (socket);
EXCEPTION
WHEN e_pop3_error
THEN
PIPE ROW ('There are no mails !');
END;
Message was edited by:
Monk
Message was edited by:
MonkSee Note:313597.1 on MetaLink
-
Cannot perform export operation
I am trying to export a table (Oracle 8.1.6, iAS 1.0.2) , but I get the following error:
Could not find the preference storage for temporary directory. Cannot perform export operation. Contact the administrator. (WWV-17101)
When I try to export an application and I 'Click here to download the export script file (2618 bytes). ', the browser shows a url of http://schmidm-zx/pls/portal30/docs/313.sql, however, this file doesn't exist anywhere on the machine.
What is going on?
nullMartin,
Export/Import of Tables is different from other exports(application/component/database objects)
All the other exports generate a sql script however export of table generates a dump file.
For import of components you need to run sql script from sql plus, however for import of table you need to run Oracle Imp utility.
For export of table alone, you need to specify the temporary directory with sufficient privileges in global settings.
For ex in unix machines it can be /var/tmp and for NT machines it can be c:\temp directories. -
Cannot perform this operation stopping my editing dead.
I'm running an Imac mid 2011, 2.8ghz I7 with 24gb of ram. All my media is externally stored. I installed FCPX 10.1.1. on top of a clean installation of Mavericks.
My problem: Just after I build a compound clip with a solid backqround and one title over the top, I invariably get this message popping up..."Cannot perform this operation: The application detected an error that prevents changed from being saved. To avoid losing your work, quit FCP"....then the program disappears.
I've been reading that this could be coming from updated projects and events so I created a new library for my latest job but the problem persists. Has anyone else encountered this? Seems like yet another bug to me.Hi dpcam1,
I agree - a bug ...I have had that error randomly recently. Hopefully the dumps that apple gets may yield a fix down the track :/
Bam -
Problem in Performing DML Operations
Hi,
I am performing DML operations(add,edit,delete) on some table 'X'.
Question:
After i perform a create operation for the first time, it works fine.
Now if i tried to perform second consequitive create operation all the fields have first create operations data.
How will i clear the data in this field.
Same thing is happening for update operation also.
This is same even when i use cancel operation followed by create operation.
How shall i resolve this UI issue.
Thanks,
MithunretainAM - If true, all the cached application modules will be retained. If false, all the cached application modules will be released. Developers must use this parameter to control the release behavior of the cached appplication modules. This method will ignore any retainAM=true or retainAM=false as a URL parameter or as part of parameters.
You should not set retainAM to false in all the cases that can cause performance issue as the AM cache has to be recreated for every navigation. But in your case, it's acceptable.
Best scenarios for retainAM = true
1. When you open a page in update mode from List page.
2. When you want the current values to be retained, after any navigation.
3. When you add bradcrumb, it is recommended to use reatainAM to true.
Best scenarios for retainAM = false
1. When you don't want to retain the AM cache since everytime it should be created. or you want to release manually.
2. Your current case.
3. To reset the form values. But this should be the last option.
Basically, reatainAM parameter is used to tell the OA Caching Framework to retain the current AM cache when the new AM cache gets created by navigating to new page.
Please set the thread to answered if your issue is solved. -
Your system is low on disk space and elements organizer cannot perform this operation
your system is low on disk space and elements organizer cannot perform this operation is the error message i keep getting. i have emptied my recycle bin and got rid of some software that i don't use and im still getting the error. Any Suggestions?
As you might be aware, when you apply auto-fix, a new file (of almost equal size) is created on HDD. This issue might arise if you don't have sufficient hard disk space on the drive which contains the source image. Do you have enough storage space available on your HDD?
~Andromeda -
I have a WPF application in .NET 4.5. The latest version of the map control (version 1.0.1.0) is causing an issue if it is used within a datatemplate. This does not happen with the previous version I was using from Nuget (version 1.0.0.0). As
an aside, what happened to the Nuget package? Anyways, it is easy to reproduce the issue:
MainWindow.xaml:
<Window x:Class="MicrosoftMapError.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"
Content="{Binding ViewModel,
RelativeSource={RelativeSource Self}}">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Views/MapView.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
</Window>
MainWindow.cs:
using MicrosoftMapError.ViewModels;
using System.Windows;
namespace MicrosoftMapError
public partial class MainWindow : Window
public MainWindow()
InitializeComponent();
this.ViewModel = new MapViewModel();
public object ViewModel
get { return (object)GetValue(ViewModelProperty); }
set { SetValue(ViewModelProperty, value); }
public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(
"ViewModel",
typeof(object),
typeof(MainWindow));
MapView.xaml:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpf="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF"
xmlns:viewModels="clr-namespace:MicrosoftMapError.ViewModels">
<DataTemplate DataType="{x:Type viewModels:MapViewModel}">
<Grid>
<wpf:Map />
</Grid>
</DataTemplate>
</ResourceDictionary>
The MapViewModel class is just an empty class, there is nothing to show there.
And this is the stack trace for the exceptions.
Outer exception: XamlParseException - The invocation of the constructor on type 'Microsoft.Maps.MapControl.WPF.Map' that matches the specified binding constraints threw an exception.
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
at System.Windows.FrameworkElement.ApplyTemplate()
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Window.MeasureOverrideHelper(Size constraint)
at System.Windows.Window.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
at System.Windows.Window.CreateSourceWindowDuringShow()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at MicrosoftMapError.App.Main() in d:\SoftwareDevelopment\Working\MicrosoftMapError\MicrosoftMapError\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Inner exception: InvalidOperationException - Cannot perform this operation while dispatcher processing is suspended.
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at System.Windows.Threading.Dispatcher.Invoke(Delegate method, Object[] args)
at Microsoft.Maps.MapControl.WPF.Core.MapConfigurationFromWeb.ConfigLoaded(String requestKey, Dictionary`2 sections)
at Microsoft.Maps.MapControl.WPF.Core.MapConfigurationFromWeb.GetConfigurationSection(String version, String sectionName, String culture, MapConfigurationCallback callback, Boolean reExecuteCallback, Object userState)
at Microsoft.Maps.MapControl.WPF.Core.MapConfiguration.GetSection(String version, String sectionName, String culture, String key, MapConfigurationCallback callback, Boolean reExecuteCallback, Object userState)
at Microsoft.Maps.MapControl.WPF.Core.MapConfiguration.GetSection(String version, String sectionName, String culture, String key, MapConfigurationCallback callback, Boolean reExecuteCallback)
at Microsoft.Maps.MapControl.WPF.Map..ctor()Are dev team has looked into this and I believe they have found the issue. They are working on putting together a new release. Also, Microsoft never officially released a Nuget package, someone just took some old buggy libraries and posted them on Nuget
without asking Microsoft. We are planning to make an official Nuget package.
http://rbrundritt.wordpress.com -
Xgrid is not available, watcher cannot perform Xgrid operations
Hi
I have this erro on Xgrid Admin:
pcastserverd [69982] Xgrid is not available, watcher cannot perform Xgrid operations
I have a 2 xgrid agents controller, but only one works, they are both xserver.
The jobs aren't working with the second controller.
Could you help me please!Hi dgremy,
Have you resolved the issue yet?
Mind let me know your solution if you did?
Thanks in advance. -
Cannot perform scripting operations on lists
Hi,
I'm having trouble performing scripting operations on lists, the only variables I can retrieve from lists are the values @HasLeadSelection, @LeadSelectedIndex and @RowCount. I cannot perform any methods on lists, I have gone through the Complete Help document and have also tried to use Resolve to attempt to access list rows but that doesn't seem to working either. Any help would be greatly appreciated!
Thanks
Alexander LudwigHi Alessandro & Alexander,
I just tried it and yes we can change the colour trough scripting as well.
Something like below in the Calculation Rule of the property Background Colour would do the job.
result = 'STANDARD' // This is a fallback value in case the if condition below is not satisfied.
if( $currentrow.xxx == 'xx' ) // Here xxx should be the element within the table
result = 'BADVALUE_DARK' // This is one of the value from above screenshot.
end
Check this other thread for more details:http://scn.sap.com/thread/3528872
And yeah the code completion is having serious issues. It shows the attributes which do not belong under is sometimes.
Binding to another attribute and setting it trough ABSL might decrease the performance as there would be a roundtrip required in this case to change the value if this field is not shown on UI and is only used to decide the colour.
Regards
Vinod
Maybe you are looking for
-
When I try to delete a file data store, ODI throws below error: 'This object is referenced by another object. View details for more information. You may also see where this object is used in the hierarchy'. On click of details, I get the below messag
-
Best method for passing data between nested components
I have a fairly good sized Flex application (if it was stuffed all into one file--which it used to be--it would be about 3-4k lines of code). I have since started breaking it up into components and abstracting logic to make it easier to write, manage
-
Error during import certificate into sapwebdispatcher
HI experts: I have a problem importing a certificate in a web dispatcher. The error is the next: import_own_cert: Installation of certificate failed ERROR in ssf_install_CA_response: (1280/0x0500) No certficate with your public k ey found Iu00B4m try
-
My goal is to get all incoming mail in the Inbox - and all deleted mail in the Trash...All mail seems to be redundant and causes duplication and confusion.
-
Session Pooling for CRMoD - Web services.
Hi, We have a Java application which fetches the Contact Data on the basis of the Phone Number in CRMoD, using web services. (it happens on a hyperlink click). Before fetching the contact data, we establish the session between our app and CRMoD using