ServiceNow attachments in Camel - apache-camel

How to download or upload attachments to servicenow from camel connector. The project is setup with camel-servicenow (v2.21.0.fuse-000077-redhat-1) in maven. Creating, retrieve and updating of tickets is working fine, however, not able to download any attachments using Attachment resource.

Download :
url = "https4://"
+ instance
+ ".service-now.com/api/now/v1/attachment?sysparm_query="
+ "table_name="
+ table
+ "%5Etable_sys_id="
+ sysId
+ "&authenticationPreemptive=true&authUsername="
+ username
+ "&authPassword="
+ password
+ "&authMethod=Basic";
In route definition :
from("direct:servicenowAttachmentDownload").setHeader(Exchange.HTTP_METHOD, constant("GET")).recipientList().simple("${header.url}")
Upload :
url = "https4://"
+ instance
+ ".service-now.com/api/now/attachment/file?table_name="
+ table
+ "&table_sys_id="
+ sysId
+ "&file_name="
+ attachmentName
+ "&authenticationPreemptive=true&authUsername="
+ username
+ "&authPassword="
+ password
+ "&authMethod=Basic";
In route definition :
from("direct:servicenowAttachmentUpload").process(new Processor() {
public void process(Exchange exchange) throws Exception {
MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create();
multipartEntityBuilder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
multipartEntityBuilder.setContentType(ContentType.MULTIPART_FORM_DATA);
String filename = (String) exchange.getIn().getHeader(Exchange.FILE_NAME);
String filePath = (String) exchange.getIn().getHeader("filePath");
String attachmentName = (String) exchange.getIn().getHeader("attachmentName");
File file = new File(filePath);
multipartEntityBuilder.addPart("upload",
new FileBody(file, ContentType.MULTIPART_FORM_DATA, attachmentName));
exchange.getIn().setBody(multipartEntityBuilder.build());
}
}).removeHeaders("CamelHttp*").setHeader(Exchange.HTTP_METHOD, constant("POST")).recipientList()
.simple("${header.url}")

Related

Can't restore a flink job that uses Table API and Kafka connector with savepoint

I canceled a flink job with a savepoint, then tried to restore the job with the savepoint (just using the same jar file) but it said it cannot map savepoint state. I was just using the same jar file so I think the execution plan should be the same? Why would it have a new operator id if I didn't change the code? I wonder if it's possible to restore from savepoint for a job using Kafka connector & Table API.
Related errors:
used by: java.util.concurrent.CompletionException: java.lang.IllegalStateException: Failed to rollback to checkpoint/savepoint file:/root/flink-savepoints/savepoint-5f285c-c2749410db07. Cannot map checkpoint/savepoint state for operator dd5fc1f28f42d777f818e2e8ea18c331 to the new program, because the operator is not available in the new program. If you want to allow to skip this, you can set the --allowNonRestoredState option on the CLI.
used by: java.lang.IllegalStateException: Failed to rollback to checkpoint/savepoint file:/root/flink-savepoints/savepoint-5f285c-c2749410db07. Cannot map checkpoint/savepoint state for operator dd5fc1f28f42d777f818e2e8ea18c331 to the new program, because the operator is not available in the new program. If you want to allow to skip this, you can set the --allowNonRestoredState option on the CLI.
My Code:
public final class FlinkJob {
public static void main(String[] args) {
final String JOB_NAME = "FlinkJob";
final EnvironmentSettings settings = EnvironmentSettings.inStreamingMode();
final TableEnvironment tEnv = TableEnvironment.create(settings);
tEnv.getConfig().set("pipeline.name", JOB_NAME);
tEnv.getConfig().setLocalTimeZone(ZoneId.of("UTC"));
tEnv.executeSql("CREATE TEMPORARY TABLE ApiLog (" +
" `_timestamp` TIMESTAMP(3) METADATA FROM 'timestamp' VIRTUAL," +
" `_partition` INT METADATA FROM 'partition' VIRTUAL," +
" `_offset` BIGINT METADATA FROM 'offset' VIRTUAL," +
" `Data` STRING," +
" `Action` STRING," +
" `ProduceDateTime` TIMESTAMP_LTZ(6)," +
" `OffSet` INT" +
") WITH (" +
" 'connector' = 'kafka'," +
" 'topic' = 'api.log'," +
" 'properties.group.id' = 'flink'," +
" 'properties.bootstrap.servers' = '<mykafkahost...>'," +
" 'format' = 'json'," +
" 'json.timestamp-format.standard' = 'ISO-8601'" +
")");
tEnv.executeSql("CREATE TABLE print_table (" +
" `_timestamp` TIMESTAMP(3)," +
" `_partition` INT," +
" `_offset` BIGINT," +
" `Data` STRING," +
" `Action` STRING," +
" `ProduceDateTime` TIMESTAMP(6)," +
" `OffSet` INT" +
") WITH ('connector' = 'print')");
tEnv.executeSql("INSERT INTO print_table" +
" SELECT * FROM ApiLog");
}
}

Apache Flink: Cannot resolve field in select clause

I'm beginning to try Apache Flink and I'm trying to aggregate some values ingested from a kafka topic. Here's the code I'm using:
public class EnvironmentMeasuresJob {
public static void main(String[] args) {
EnvironmentSettings settings = EnvironmentSettings
.newInstance()
.inStreamingMode()
.build();
final TableEnvironment tEnv = TableEnvironment.create(settings);
tEnv.executeSql("CREATE TABLE EnvironmentMeasures (" +
"`timestamp` TIMESTAMP(3) METADATA FROM 'timestamp'," +
"`area` STRING," +
"`sensor` STRING," +
"`co` DECIMAL(5, 2)," +
"`pm1` DECIMAL(5, 2)," +
"`pm25` DECIMAL(5, 2)," +
"`pm10` DECIMAL(5, 2)," +
"`temperature` DECIMAL(5, 2)," +
"`pressure` DECIMAL(5, 2)," +
"`humidity` DECIMAL(5, 2)," +
"WATERMARK FOR `timestamp` AS `timestamp` - INTERVAL '5' SECOND" +
") WITH (" +
"'connector' = 'kafka'," +
"'topic' = 'seneca.environmentmeasures.raw'," +
"'properties.bootstrap.servers' = 'localhost:9092'," +
"'properties.group.id' = 'env-measures-job'," +
"'scan.startup.mode' = 'earliest-offset'," +
"'format' = 'json'," +
"'json.fail-on-missing-field' = 'false'," +
"'json.ignore-parse-errors' = 'false'" +
")");
Table environmentMeasures = tEnv.from("EnvironmentMeasures");
Table aggregatedEnvironmentMeasures = environmentMeasures
.window(Slide.over(lit(20).seconds())
.every(lit(10).seconds())
.on($("timestamp"))
.as("w"))
.groupBy($("sensor"), $("w"))
.select(
$("w").end().as("timestamp"),
$("area"),
$("sensor"),
$("co").avg().as("averageCO"),
$("pm1").avg().as("averagePM1"),
$("pm25").avg().as("averagePM25"),
$("pm10").avg().as("averagePM10"),
$("temperature").avg().as("averageTemperature"),
$("pressure").avg().as("averagePressure"),
$("humidity").avg().as("averageHumidity")
);
}
}
But when I try to execute the code I get the following exception:
Exception in thread "main" org.apache.flink.table.api.ValidationException: Cannot resolve field [area], input field list:[sensor, EXPR$1, EXPR$2, EXPR$3, EXPR$4, EXPR$5, EXPR$6, EXPR$7, EXPR$0].
If I remove "area" from the select everything works. Any idea on how this happens? Am I missing something?
Thanks
euks
I think you need to either group by the area or compute some aggregation over the areas included in the given sensor and window.

ApplicationSettingsBase.Save: Unable to save config to file

What could cause ApplicationSettingsBase.Save to fail with the error "Unable to save config to file "?
if (Settings.Default.CallUpgrade)
{
Settings.Default.Upgrade();
Settings.Default.CallUpgrade = false;
Settings.Default.Save();
}
Exception Type: System.Configuration.ConfigurationErrorsException
Exception Message: Konfiguration konnte nicht in Datei "C:\Users\u00001\AppData\Roaming\CompanyName\ApplicationName.ex_StrongName_4vozv12n21s5wt5tg4h44jakrs6m65xy\3.0.0.1\user.config" gespeichert werden.
Stack Trace:
bei System.Configuration.Internal.WriteFileContext.ReplaceFile(String Source, String Target)
bei System.Configuration.Internal.WriteFileContext.Complete(String filename, Boolean success)
bei System.Configuration.Internal.InternalConfigHost.StaticWriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions)
bei System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions)
bei System.Configuration.Internal.DelegatingConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions)
bei System.Configuration.ClientSettingsStore.ClientSettingsConfigurationHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
bei System.Configuration.UpdateConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
bei System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
bei System.Configuration.Configuration.SaveAsImpl(String filename, ConfigurationSaveMode saveMode, Boolean forceSaveAll)
bei System.Configuration.ClientSettingsStore.WriteSettings(String sectionName, Boolean isRoaming, IDictionary newSettings)
In addition to user.config, the folder contains another file named a2rx2s4u.newcfg.
The user running the application has full control on the folder.
The application is run on a Windows 2019 Server with Citrix XenApp.
I've logged the activity of the app with Sysinternals Process Monitor. As far as I understand, the application tries to rename a2rx2s4u.newcfg to user.config replacing the existing user.config, and that seems to fail:
Operation: IRP_MJ_SET_INFORMATION
Result: 0xC0000369
Path: C:\Users\u00001\AppData\Roaming\CompanyName\ApplicationName.ex_StrongName_4vozv12n21s5wt5tg4h44jakrs6m65xy\3.0.0.1\a2rx2s4u.newcfg
Type: SetRenameInformationFile
ReplaceIfExists: True
FileName: C:\Users\u00001\AppData\Roaming\CompanyName\ApplicationName.ex_StrongName_4vozv12n21s5wt5tg4h44jakrs6m65xy\3.0.0.1\user.config
Stack trace from Process Explorer:
"Frame","Module","Location","Address","Path"
"0","FLTMGR.SYS","FLTMGR.SYS + 0x555d","0xfffff8058039555d","C:\Windows\System32\drivers\FLTMGR.SYS"
"1","FLTMGR.SYS","FLTMGR.SYS + 0x50bc","0xfffff805803950bc","C:\Windows\System32\drivers\FLTMGR.SYS"
"2","FLTMGR.SYS","FLTMGR.SYS + 0x4c28","0xfffff80580394c28","C:\Windows\System32\drivers\FLTMGR.SYS"
"3","FLTMGR.SYS","FLTMGR.SYS + 0x4a1e","0xfffff80580394a1e","C:\Windows\System32\drivers\FLTMGR.SYS"
"4","ntoskrnl.exe","ntoskrnl.exe + 0x38109","0xfffff8016c0db109","C:\Windows\system32\ntoskrnl.exe"
"5","ntoskrnl.exe","ntoskrnl.exe + 0x10b343","0xfffff8016c1ae343","C:\Windows\system32\ntoskrnl.exe"
"6","ntoskrnl.exe","ntoskrnl.exe + 0x11a4ac","0xfffff8016c1bd4ac","C:\Windows\system32\ntoskrnl.exe"
"7","ntoskrnl.exe","ntoskrnl.exe + 0x1c8605","0xfffff8016c26b605","C:\Windows\system32\ntoskrnl.exe"
"8","ntdll.dll","ntdll.dll + 0x9fc44","0x7ffb5408fc44","C:\Windows\System32\ntdll.dll"
"9","wow64.dll","wow64.dll + 0x14a35","0x7ffb53ca4a35","C:\Windows\System32\wow64.dll"
"10","wow64.dll","wow64.dll + 0xa507","0x7ffb53c9a507","C:\Windows\System32\wow64.dll"
"11","wow64.dll","wow64.dll + 0x7783","0x7ffb53c97783","C:\Windows\System32\wow64.dll"
"12","wow64cpu.dll","wow64cpu.dll + 0x1783","0x775f1783","C:\Windows\System32\wow64cpu.dll"
"13","wow64cpu.dll","wow64cpu.dll + 0x1199","0x775f1199","C:\Windows\System32\wow64cpu.dll"
"14","wow64.dll","wow64.dll + 0xcfda","0x7ffb53c9cfda","C:\Windows\System32\wow64.dll"
"15","wow64.dll","wow64.dll + 0x17dfd","0x7ffb53ca7dfd","C:\Windows\System32\wow64.dll"
"16","wow64win.dll","wow64win.dll + 0x2e0f","0x7ffb53ee2e0f","C:\Windows\System32\wow64win.dll"
"17","ntdll.dll","ntdll.dll + 0xa34b4","0x7ffb540934b4","C:\Windows\System32\ntdll.dll"
"18","ntoskrnl.exe","ntoskrnl.exe + 0x672ae5","0xfffff8016c715ae5","C:\Windows\system32\ntoskrnl.exe"
"19","win32kfull.sys","win32kfull.sys + 0x65ff7","0xfffff4df95065ff7","C:\Windows\System32\win32kfull.sys"
"20","win32kfull.sys","win32kfull.sys + 0x65d20","0xfffff4df95065d20","C:\Windows\System32\win32kfull.sys"
"21","win32kfull.sys","win32kfull.sys + 0x65796","0xfffff4df95065796","C:\Windows\System32\win32kfull.sys"
"22","win32kfull.sys","win32kfull.sys + 0x652dc","0xfffff4df950652dc","C:\Windows\System32\win32kfull.sys"
"23","win32kfull.sys","win32kfull.sys + 0xa033e","0xfffff4df950a033e","C:\Windows\System32\win32kfull.sys"
"24","win32kfull.sys","win32kfull.sys + 0x5a972","0xfffff4df9505a972","C:\Windows\System32\win32kfull.sys"
"25","win32kfull.sys","win32kfull.sys + 0x5a020","0xfffff4df9505a020","C:\Windows\System32\win32kfull.sys"
"26","win32kfull.sys","win32kfull.sys + 0xec27c","0xfffff4df950ec27c","C:\Windows\System32\win32kfull.sys"
"27","win32kfull.sys","win32kfull.sys + 0xce961","0xfffff4df950ce961","C:\Windows\System32\win32kfull.sys"
"28","ntoskrnl.exe","ntoskrnl.exe + 0x1c8605","0xfffff8016c26b605","C:\Windows\system32\ntoskrnl.exe"
"29","wow64win.dll","wow64win.dll + 0xf5b4","0x7ffb53eef5b4","C:\Windows\System32\wow64win.dll"
"30","wow64win.dll","wow64win.dll + 0x36d2","0x7ffb53ee36d2","C:\Windows\System32\wow64win.dll"
"31","wow64win.dll","wow64win.dll + 0x19fe","0x7ffb53ee19fe","C:\Windows\System32\wow64win.dll"
"32","wow64.dll","wow64.dll + 0x7783","0x7ffb53c97783","C:\Windows\System32\wow64.dll"
"33","wow64cpu.dll","wow64cpu.dll + 0x1783","0x775f1783","C:\Windows\System32\wow64cpu.dll"
"34","wow64cpu.dll","wow64cpu.dll + 0x1199","0x775f1199","C:\Windows\System32\wow64cpu.dll"
"35","wow64.dll","wow64.dll + 0xcfda","0x7ffb53c9cfda","C:\Windows\System32\wow64.dll"
"36","wow64.dll","wow64.dll + 0xcea0","0x7ffb53c9cea0","C:\Windows\System32\wow64.dll"
"37","ntdll.dll","ntdll.dll + 0xd5c7d","0x7ffb540c5c7d","C:\Windows\System32\ntdll.dll"
"38","ntdll.dll","ntdll.dll + 0xc38b9","0x7ffb540b38b9","C:\Windows\System32\ntdll.dll"
"39","ntdll.dll","ntdll.dll + 0x756c3","0x7ffb540656c3","C:\Windows\System32\ntdll.dll"
"40","ntdll.dll","ntdll.dll + 0x7566e","0x7ffb5406566e","C:\Windows\System32\ntdll.dll"
"41","ntdll.dll","ntdll.dll + 0x7090c","0x7767090c","C:\Windows\SysWOW64\ntdll.dll"
"42","KernelBase.dll","KernelBase.dll + 0x121517","0x76341517","C:\Windows\SysWOW64\KernelBase.dll"
"43","KernelBase.dll","KernelBase.dll + 0x121338","0x76341338","C:\Windows\SysWOW64\KernelBase.dll"
"44","Sfrhook.dll","Sfrhook.dll + 0x2ae7","0x730a2ae7","C:\Program Files (x86)\Citrix\System32\Sfrhook.dll"
"45","System.Configuration.ni.dll","System.Configuration.ni.dll + 0xa427d","0x6d92427d","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\727d61c30dcf1fe944a3c6110c244de8\System.Configuration.ni.dll"
"46","System.Configuration.ni.dll","System.Configuration.ni.dll + 0xc4c31","0x6d944c31","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\727d61c30dcf1fe944a3c6110c244de8\System.Configuration.ni.dll"
"47","System.Configuration.ni.dll","System.Configuration.ni.dll + 0xc4bbd","0x6d944bbd","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\727d61c30dcf1fe944a3c6110c244de8\System.Configuration.ni.dll"
"48","System.Configuration.ni.dll","System.Configuration.ni.dll + 0xc49c3","0x6d9449c3","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\727d61c30dcf1fe944a3c6110c244de8\System.Configuration.ni.dll"
"49","System.Configuration.ni.dll","System.Configuration.ni.dll + 0xc42c2","0x6d9442c2","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\727d61c30dcf1fe944a3c6110c244de8\System.Configuration.ni.dll"
"50","System.Configuration.ni.dll","System.Configuration.ni.dll + 0xc4334","0x6d944334","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\727d61c30dcf1fe944a3c6110c244de8\System.Configuration.ni.dll"
"51","System.ni.dll","System.ni.dll + 0x75e36e","0x705ee36e","C:\Windows\assembly\NativeImages_v4.0.30319_32\System\9d718786e2ea160f395d8ee3d2488791\System.ni.dll"
"52","System.Configuration.ni.dll","System.Configuration.ni.dll + 0xc225c","0x6d94225c","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\727d61c30dcf1fe944a3c6110c244de8\System.Configuration.ni.dll"
"53","System.Configuration.ni.dll","System.Configuration.ni.dll + 0xb6d07","0x6d936d07","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\727d61c30dcf1fe944a3c6110c244de8\System.Configuration.ni.dll"
"54","System.Configuration.ni.dll","System.Configuration.ni.dll + 0xab5cd","0x6d92b5cd","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\727d61c30dcf1fe944a3c6110c244de8\System.Configuration.ni.dll"
"55","System.ni.dll","System.ni.dll + 0x6423f0","0x704d23f0","C:\Windows\assembly\NativeImages_v4.0.30319_32\System\9d718786e2ea160f395d8ee3d2488791\System.ni.dll"
"56","System.ni.dll","System.ni.dll + 0x643fcf","0x704d3fcf","C:\Windows\assembly\NativeImages_v4.0.30319_32\System\9d718786e2ea160f395d8ee3d2488791\System.ni.dll"
"57","<unknown>","0xccf4cde","0xccf4cde",""
"58","System.ni.dll","System.ni.dll + 0x646425","0x704d6425","C:\Windows\assembly\NativeImages_v4.0.30319_32\System\9d718786e2ea160f395d8ee3d2488791\System.ni.dll"
"59","System.ni.dll","System.ni.dll + 0x64624f","0x704d624f","C:\Windows\assembly\NativeImages_v4.0.30319_32\System\9d718786e2ea160f395d8ee3d2488791\System.ni.dll"
"60","System.ni.dll","System.ni.dll + 0x641636","0x704d1636","C:\Windows\assembly\NativeImages_v4.0.30319_32\System\9d718786e2ea160f395d8ee3d2488791\System.ni.dll"
"61","<unknown>","0x9e7637a","0x9e7637a",""
"62","<unknown>","0x9e75ff5","0x9e75ff5",""
"63","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x8b8b0c","0x60988b0c","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"64","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x8bcc03","0x6098cc03","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"65","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0xc43fe4","0x60d13fe4","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"66","<unknown>","0xa4b0385","0xa4b0385",""
"67","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1c2ff3","0x60292ff3","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"68","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1c2f85","0x60292f85","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"69","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1c28c0","0x602928c0","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"70","<unknown>","0x32dd446","0x32dd446",""
"71","user32.dll","user32.dll + 0x45cab","0x77495cab","C:\Windows\SysWOW64\user32.dll"
"72","user32.dll","user32.dll + 0x367bc","0x774867bc","C:\Windows\SysWOW64\user32.dll"
"73","user32.dll","user32.dll + 0x3635a","0x7748635a","C:\Windows\SysWOW64\user32.dll"
"74","user32.dll","user32.dll + 0x4312f","0x7749312f","C:\Windows\SysWOW64\user32.dll"
"75","ntdll.dll","ntdll.dll + 0x72aed","0x77672aed","C:\Windows\SysWOW64\ntdll.dll"
"76","user32.dll","user32.dll + 0x37b5f","0x77487b5f","C:\Windows\SysWOW64\user32.dll"
"77","uxtheme.dll","uxtheme.dll + 0x32dca","0x74342dca","C:\Windows\SysWOW64\uxtheme.dll"
"78","uxtheme.dll","uxtheme.dll + 0x32418","0x74342418","C:\Windows\SysWOW64\uxtheme.dll"
"79","user32.dll","user32.dll + 0x37dd3","0x77487dd3","C:\Windows\SysWOW64\user32.dll"
"80","user32.dll","user32.dll + 0x45cab","0x77495cab","C:\Windows\SysWOW64\user32.dll"
"81","user32.dll","user32.dll + 0x367bc","0x774867bc","C:\Windows\SysWOW64\user32.dll"
"82","user32.dll","user32.dll + 0x35d0f","0x77485d0f","C:\Windows\SysWOW64\user32.dll"
"83","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1c35d7","0x602935d7","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"84","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1cca34","0x6029ca34","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"85","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0xc4180c","0x60d1180c","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"86","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1cc9c1","0x6029c9c1","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"87","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1cdae3","0x6029dae3","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"88","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x8bd542","0x6098d542","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"89","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0xc43ea9","0x60d13ea9","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"90","<unknown>","0xa4b0385","0xa4b0385",""
"91","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1c2ff3","0x60292ff3","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"92","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1c2f85","0x60292f85","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"93","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1c28c0","0x602928c0","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"94","<unknown>","0x32dd446","0x32dd446",""
"95","user32.dll","user32.dll + 0x45cab","0x77495cab","C:\Windows\SysWOW64\user32.dll"
"96","user32.dll","user32.dll + 0x367bc","0x774867bc","C:\Windows\SysWOW64\user32.dll"
"97","user32.dll","user32.dll + 0x358fb","0x774858fb","C:\Windows\SysWOW64\user32.dll"
"98","user32.dll","user32.dll + 0x356d0","0x774856d0","C:\Windows\SysWOW64\user32.dll"
"99","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x225f1d","0x602f5f1d","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"100","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1d34e3","0x602a34e3","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"101","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1d30d1","0x602a30d1","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"102","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x1d2f23","0x602a2f23","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"103","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x893c13","0x60963c13","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"104","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x8bbf5d","0x6098bf5d","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"105","System.Windows.Forms.ni.dll","System.Windows.Forms.ni.dll + 0x8bbc0d","0x6098bc0d","C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\bf4d479ac30cbf95afe4c0d4de1fc37b\System.Windows.Forms.ni.dll"
"106","<unknown>","0x9f6225b","0x9f6225b",""
"107","<unknown>","0x9d89434","0x9d89434",""
"108","<unknown>","0x822b0f7","0x822b0f7",""
"109","<unknown>","0x3411f66","0x3411f66",""
"110","clr.dll","clr.dll + 0xf036","0x7200f036","C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
"111","clr.dll","clr.dll + 0x122da","0x720122da","C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
"112","clr.dll","clr.dll + 0x1859b","0x7201859b","C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
"113","clr.dll","clr.dll + 0x1bb11b","0x721bb11b","C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
"114","clr.dll","clr.dll + 0x1bb7fa","0x721bb7fa","C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
"115","clr.dll","clr.dll + 0x1bb727","0x721bb727","C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
"116","clr.dll","clr.dll + 0x1bb8a8","0x721bb8a8","C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
"117","clr.dll","clr.dll + 0x1bb9ce","0x721bb9ce","C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
"118","clr.dll","clr.dll + 0x1b7305","0x721b7305","C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll"
"119","mscoreei.dll","mscoreei.dll + 0xfa84","0x7294fa84","C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll"
"120","mscoree.dll","mscoree.dll + 0xe80e","0x74bee80e","C:\Windows\SysWOW64\mscoree.dll"
"121","mscoree.dll","mscoree.dll + 0x143f8","0x74bf43f8","C:\Windows\SysWOW64\mscoree.dll"
"122","ntdll.dll","ntdll.dll + 0x666ed","0x776666ed","C:\Windows\SysWOW64\ntdll.dll"
"123","ntdll.dll","ntdll.dll + 0x666bd","0x776666bd","C:\Windows\SysWOW64\ntdll.dll"
Unfortunately, I don't have a 32-bit Windows at hand, and as the application is x86, Process Explorer cannot resolve symbols.
It might be interesting that the stack trace contains "Sfrhook.dll" which is the "Citrix Special Folder Hook DLL". I think this DLL implements Special Folder Redirection in Citrix.
According to the Windows Error Codes reference, the error code 0xC0000369 means STATUS_INVALID_DEVICE_OBJECT_PARAMETER:
The device object parameter is either not a valid device object or is not attached to the volume that is specified by the file name.
I do not understand this - the source and the target of the rename is in the same directory.
How to further narrow down this problem?
[EDIT1]
The user profile seems to reside in an FSLogix profile container:
https://learn.microsoft.com/en-us/fslogix/configure-profile-container-tutorial
When using Profile Container, both applications and users see the profile as if it's located on the local drive.
[EDIT2]
We now have another customer which experiences the same problem.
This time: No Citrix, but "Windows 10 Enterprise multi-session" - also uses FSLogix Profile Containers.
https://learn.microsoft.com/en-us/azure/virtual-desktop/windows-10-multisession-faq
We have found that in server 2019 it required the UAC virtualization setting needed to be disabled for user level writes. Using Process Monitor, we found that when the error occurred, it wrote to a UAC event log. For legacy applications this issue occurs when the user.config file is being copied from the "user.newcfg" file that is just a temporary file the the .NET code creates.

Jmeter - How to loop data based on the 'jar' file

I want to create scenario where i want use data from jar file into Jmeter Loop logic.
My jar looks like:
public String Australia()
{
String a = "{"
+ "\"location\": {"
+ "\"lat\": -33.8669710,"
+ "\"lng\": 151.1958750"
+ "},"
+ "\"accuracy\": 50,"
+ "\"name\": \"Google Shoes!\","
+ "\"phone_number\": \"(02) 9374 4000\","
+ "\"address\": \"48 Pirrama Road, Pyrmont, NSW 2009, Australia\","
+ "\"types\": [\"shoe_store\"],"
+ "\"website\": \"http://www.google.com.au/\","
+ "\"language\": \"en-AU\""
+
"}";
return a;
}
public String canada()
{
String c = "{"
+ "\"location\": {"
+ "\"lat\": -33.8669710,"
+ "\"lng\": 151.1958750"
+ "},"
+ "\"accuracy\": 50,"
+ "\"name\": \"Google Shoes!\","
+ "\"phone_number\": \"(02) 9374 4000\","
+ "\"address\": \"48 Pirrama Road, Pyrmont, NSW 2009, Canada\","
+ "\"types\": [\"shoe_store\"],"
+ "\"website\": \"http://www.google.com.ca/\","
+ "\"language\": \"en-CA\""
+
"}";
return c;
}
1) with above data i want to 'feed' Jmeter call as described on the bellow picture
2) every time i add new country at the jar file, loop be increased accordingly.
Some thought how this could be done, what should i use as variable and how i can tell the loop to increase?
Add JSR223 PreProcessor as a child of the 002_2_send payment request
Put the following code into "Script" area:
def testData = new com.example.TestData()
def methods = testData.class.getDeclaredMethods()
def payload = org.apache.commons.lang.reflect.MethodUtils.invokeExactMethod(testData, methods[vars.get('__jm__Loop Controller__idx') as int].getName())
sampler.addNonEncodedArgument('',payload,'')
sampler.setPostBodyRaw(true)
Define "Loop Count" in the Loop Controller using __groovy() function like:
${__groovy(com.example.TestData.getDeclaredMethods().size(),)}
Change com.example to your own package name and TestData to your class name
Once you drop the new version of .jar to JMeter Classpath you will need to restart JMeter to pick up the changes
That's it, each iteration of the Loop Controller the JSR223 PreProcessor will execute the next function in your class and update the request body with the returned data:
References:
Java Reflection API
Apache Groovy - Why and How You Should Use It

XMPP implementation in silverlight authentication returns failure

I am trying to implement Xmpp protocol in silverlight and trying to connect to Facebook, here I am getting everything correct until <challenge .. > obtained from server.
I am using X Facebook platform authentication.
I have done this with following code:
byte[] ch = Convert.FromBase64String(message.challenge);
string challenge = System.Text.Encoding.UTF8.GetString(ch, 0, ch.Length);
string response = "";
long callId = DateTime.UtcNow.Ticks;
MD5 md = new MD5();
String signature1 = "api_key=203366556348506"
+ "call_id=" + callId
+ "method=auth.xmpp_login"
+ param[2]
+ "session_key=" + messageClient.SessionKey
+ "v=1.0"
+ messageClient.AppSecret;
md.Value = signature1;
response = "method=auth.xmpp_login&api_key=203366556348506&session_key=bc6d6e00462cc2bb73a824bd.4-100001565408667&call_id=" + callId + "&sig=c47d741cb8f18c4e78b990f48e2f63aa&v=1.0&" + param[2];
message.Request = "<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" + Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(response)) + "</response>";
this.messageClient.SendMessageAsync(message);
But I am getting following message from server:
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>
Please let me know where I am going wrong.
Try following code:
String signature1 = "api_key=" + messageClient.ApiKey
+ "call_id=" + callId
+ "method=auth.xmpp_login"
+ param[2]
+ "session_key=" + messageClient.SessionKey
+ "v=1.0"
+ messageClient.AppSecret;
md.Value = signature1;
response = "method=auth.xmpp_login&api_key=" + messageClient.ApiKey + "&session_key=" + messageClient.SessionKey + "&call_id=" + callId + "&sig=" + md.FingerPrint.ToLower() + "&v=1.0&" + param[2];
I have changed response string to the one above.
This has returned success for me. Hope this will help you.

Resources