saxon: problem reusing XsltTransformer object - saxon

Using Saxon-B, I'm trying to follow the javadoc and serially reuse an XsltTransformer object.
I'm thwarted by:
Error
XTDE1490: Cannot write more than one result document to the same URI, or write to a URI
that has been read: file:/Users/benson/x/btweb/web_2_0/sites/us/errors/404/404.xml.prepared
2011-03-22 11:06:23,830 [main] ERROR btweb.compiler.CompileSite - Site compilation terminated with error.
btweb.compiler.CompilerException: Error running transform Cannot write more than one result document to the same URI, or write to a URI that has been read: file:/Users/benson/x/btweb/web_2_0/sites/us/errors/404/404.xml.prepared

It's probably Saxon-B bug. You can find more information here. According to this site "Fixed in 8.9.0.4".

Related

Issues with connecting Twilio Flex Digital Channels to Google Dialogflow CX

I have been following the blog post here and I've made it to testing the function on my local environment. I've copy and pasted everything form the blog into my text editor. Nothing in my code is original - but I cannot get it to work! When I try to run it in my local environment, I get this error:
const b = bindings[key].toString();
^
TypeError: Cannot read properties of undefined (reading 'toString')
at PathTemplate.render (/Users/dialogflow-cx/node_modules/google-gax/build/src/pathTemplate.js:114:37)
at SessionsClient.projectLocationAgentSessionPath (/Users/dialogflow-cx/node_modules/#google-cloud/dialogflow-cx/build/src/v3/sessions_client.js:1237:75)
at exports.handler (/Users/Waterfield/dialogflow-cx/functions/dialogflow-detect-intent.protected.js:21:25)
at process.<anonymous> (/Users/dialogflow-cx/node_modules/#twilio/runtime-handler/dist/dev-runtime/internal/functionRunner.js:74:9)
at process.emit (node:events:390:28)
at emit (node:internal/child_process:917:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
I don't know where to go from here! Help!
Here your TypeError is "cannot read properties of undefined", that means at least one of your passed arguments is undefined.
As we go through your return error, second line directs to the "projectLocationAgentSessionPath" and this section refers to the "Setup the detectIntentRequest" in the blog .
session: client.projectLocationAgentSessionPath(
context.DIALOGFLOW_CX_PROJECT_ID,
context.DIALOGFLOW_CX_LOCATION,
context.DIALOGFLOW_CX_AGENT_ID,
event.dialogflow_session_id
)
The above error means at least on of the objects that relates to projectId, location, agentId, SessionId is returning undefined.
To resolve the error you have to check whether you are passing correct environment variables the same as .env files or not?
Within the error, we can see that there is a reference to the code you are working on:
at exports.handler (/Users/Waterfield/dialogflow-cx/functions/dialogflow-detect-intent.protected.js:21:25)
This refers to this line:
client.projectLocationAgentSessionPath(
context.DIALOGFLOW_CX_PROJECT_ID,
context.DIALOGFLOW_CX_LOCATION,
context.DIALOGFLOW_CX_AGENT_ID,
event.dialogflow_session_id
)
Following the code through the dialogflow library and then the Google API extensions library shows that ultimately the code is running through the keys of the object that relate to the project, location, agent and session which map to the 4 arguments above. And at least one of them is returning undefined.
Have you added the correct environment variables to your .env file? Are you passing a dialogflow_session_id when you make a request to test this endpoint?

SSIS Truncation in Flat file source

I am new to SSIS, I am importing a flat file data into SQL Server. It throws error while importing data in the flat file source task.
[Flat File Source [60]] Error: Data conversion failed. The data conversion for column "DCN_NAME" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
[Flat File Source [60]] Error: The "Flat File Source.Outputs[Flat File Source Output].Columns[DCN_NAME]" failed because truncation occurred, and the truncation row disposition on "Flat File Source.Outputs[Flat File Source Output].Columns[DCN_NAME]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Flat File Source returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
How to solve this issue. I don't have problem in destination.Is it possible to change the source field length?
I changed the source length in source connection manager. It works fine now.
You have not provided enough information to answer your question. Here is what I can gleam from what you have provided.
Your SSIS package is read a flat file and it assumes DCN_Name is data DT_STR
(type char). Confirm the origin and the destination have the same data type. If they do not, use a [Data Conversion] function which is found on the left side on the screen under Data Flow.
Be mindful that while SQL uses varchar and nvarchar, SSIS uses DT_WSTR and DT_STR. It can get confusing. In the link below you will find a SSIS to SQL Data Type Conversion
enter link description here
The errors generated by SSIS are counter intuitive.
The solution was use a data conversion because the source and destination were different data types.

How to handle exception like download failed or invalid URL link or internet failure using TDownLoadURL?

I have an VCL app containing an object TDownloadUrl (VCL.ExtActns) used to download applications, my question is how to handle any kind of exception that restrict to download [for example:- like download failed or invalid URL link or internet failure or url not reachable or internet not available] using TDownLoadURL?.
Thanks in advance
TDownloadURL only defines 2 error messages, which are both declared in the Vcl.Consts unit:
SUrlMonDllMissing, which is raised when the Win32 URLDownloadToFile() function cannot be accessed at runtime.
SErrorDownloadingURL, which is raised when URLDownloadToFile() fails for any reason. Unfortunately, there is no way to differentiate why URLDownloadToFile() fails (although the OnProgress event may provide information about what it was doing just before the failure occurred).
The error messages are resource strings and thus can be localized, so they could potentially be in any language, not just English. And they are raised using the general SysUtils.Exception class itself, not any derived types. However, you can use them for substring matching, at least:
uses
..., Vcl.ExtActns, Vcl.Consts, System.StrUtils;
try
DownloadURL1.Filename := ...;
DownloadURL1.URL := ...;
DownloadURL1.Execute;
except
on E: Exception do
begin
if StartsText(SUrlMonDllMissing, E.Message) then
...
else if StartsText(SErrorDownloadingURL, E.Message) then
...
else
...
end;
end;
If you need more detailed error information, you might try calling URLDownloadToFile() directly, as it returns an HRESULT value. However,
be careful by the following gotcha in the documentation:
URLDownloadToFile returns S_OK even if the file cannot be created and the download is canceled. If the szFileName parameter contains a file path, ensure that the destination directory exists before calling URLDownloadToFile. For best control over the download and its progress, an IBindStatusCallback interface is recommended.
If that does not solve your issue, then you should use a different HTTP client API/library to perform the download, such as the HTTP client in Indy, ICS, Synapse, WinInet/WinHTTP, libCURL, etc.
I've not used this component, but it likely generates different exception types based on the errors it encounters. If that's the case then the article here covers handling multiple exception types:
Delphi Exception handling problem with multiple Exception handling blocks

Converted JNDI name [java:comp/env/cloudenv] not found

I am getting below error message when I deploy application into Tomcat 7.
2016-02-11 11:52:30,200 DEBUG (localhost-startStop-1) [org.springframework.jndi.JndiLocatorDelegate] Converted JNDI name [java:comp/env/cloudenv] not found - trying original name [cloudenv]. javax.naming.NameNotFoundException: Name [cloudenv] is not bound in this Context. Unable to find [cloudenv].
I would like to know from where "cloudenv" is mention in the application. I could not find such string my application. I also could not find "java:comp/env/" string in my application. Please me know what am I missing to understand the above error.
Let me answer my own question!!! It is due to that I am using dynamic variable in application context. It is trying to search from 5 areas:-
[servletConfigInitParams]
[servletContextInitParams]
[jndiProperties]
[systemProperties]
[systemEnvironment]
For jndi, the default search variable is "java:comp/env/" + ${dynamic variable}

Spring-ws and Stripes framework - a bad cocktail?

I'm using Spring 2.5.6, Spring-ws 1.5.9, and Stripes 1.5.6.
I have a working webservice which was implementing using xml parsing etc. I'll not go into details about this, as I don't think this is the problem.
I'm working on a new ws and found this page quite useful: http://jeromebulanadi.wordpress.com/2010/02/25/basic-spring-web-service-tutorial-from-contract-to-security/
...so using the above as example to implement a new ws (the link contains an example with marshalling/unmarshalling of objects instead of doing all the xml yourself).
When connecting to the ws I get this error message (from a webservice template - also in Spring):
org.springframework.ws.client.WebServiceTransportException: Not Found [404]
at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:627)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:551)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:502)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:351)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:345)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:337)
The call originates from my template and I'm calling like this:
GetSignalsByCprRequest request = new GetSignalsByCprRequest();
request.setCpr(new BigInteger(cpr));
GetSignalsByCprResponse response = (GetSignalsByCprResponse) getWebServiceTemplate().marshalSendAndReceive(request);
A larger stack trace is:
21-09-2011 11:16:35 INFO com.mydomain.ws.client.SignalsTemplateImpl - Entering getSignals(..) in SignalsTemplateImpl
--- ENTER TEMPLATE ---
21-09-2011 11:16:35 TRACE net.sourceforge.stripes.controller.StripesFilter - Intercepting request to URL: /salesoverview-ws-war/services
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.StripesFilter - LocalePicker selected locale: da_DK
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.StripesFilter - LocalePicker did not pick a character encoding, using default: UTF-8
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.UrlBindingFactory - No URL binding matches /salesoverview-ws-war/services
21-09-2011 11:16:35 DEBUG net.sourceforge.stripes.controller.UrlBindingFactory - No URL binding matches /salesoverview-ws-war/services
org.springframework.ws.client.WebServiceTransportException: Not Found [404]
at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:627)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:551)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:502)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:351)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:345)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:337)
"--- ENTER TEMPLATE ---" is printed just above the request/response is created. The error happens in GetSignalsByCprResponse response = (GetSignalsByCprResponse) getWebServiceTemplate().marshalSendAndReceive(request);
I'm quite blank - I have no idea as where to go. I have a slight idea that either the soap message doesn't contain the namespace OR that Stripes catches the request - based on the stack trace... Stripes is using DynamicMappingFilter, thus mapping the url-pattern to /* - which might be the problem.
Any ideas or pointers is much appreciated!
Seems that your Stripes servlet is handling URL’s you want to be handled by the Spring-ws servlet that will handle your web service requests. You might want to check your <url-pattern> in your web.xml.

Resources