ASP-VB Script encoding problem - Microsoft SQL server is not returning error message in page encoding format - sql-server

I have a ASP/VBScript page. I have set the encoding to UTF-8 using the following:
<%# CodePage=65001 %>
The existing Response.write() messages are coming in UTF-8. But when I add a new Response.write() message, IE shows it in Shift JIS encoding. The System Locale setting is Japanese.
New code added:
if err.number <> 0 then
Response.write <Japanese error message>
Response.end
end if
Why are the existing Response.write() shown in UTF-8 and only new one shown in Shift JIS?
To get over this, I added below line at top of page:
Response.Charset="UTF-8"
On adding this, the new Response.write() started coming in UTF-8. But MS SQL Server error messages (like timeout) also were displayed in UTF-8. They are appearing as junk characters. They are shown correctly only in Shift JIS as MS SQL Server is encoding them as Shift JIS.
How can I overcome this problem?

Related

Studio3T unable to connect with mongodb

Putting mongo connection string in studio3T first gave an error that url must be encoded. My username and password had colon and string had other special characters, so I did the Url encoding
But now after pasting the Url encoded string it keeps giving error unable to verify the text records.
Please help

SSIS 2012: Metadata out of sync after add/remove script parameter

We have deployed several changes to SSIS packages successfully, but this particular change gives us an error of
The component metedata is out of sync with the compiled script. Recompile the script using the Script Component Editor.
It runs fine in the debugger on my jump host. What do I do to "recompile the script"? Or is there a deeper problem?
UPDATE 1: This particular script component is more like a destination, and asynchronous. It accepts input rows, and all (or most) of them are consumed within the script (it updates external data via a Web Service), and only the error cases continue through to the output.
I have narrowed down the problem to the absolute minimum change that gives this error: adding another input column (or remove an unused input column). To be precise, after opening the package in Visual Studio 2012 on my jump host, double-click the Perform ETL task to open the Data Flow, then double-click the G9 Web Service Script Component.
I switch to Input Columns - there are 16 ticked/listed - and I untick one that is actually not used in the script. Or I tick (add) another column (which I want to use in the script).
Then I swap back to Script, click on Edit Script, and wait for the VstaProjects window to come up.
I either close this VstaProjects window straight away, or I make an extremely minor change to the script (comment only), then Build > Build ScriptComponent_5aa...acb, then press the floppy (Save) symbol, then exit Vsta.
Then I run in the debugger (press green start arrow) and it runs as expected. I build by right-clicking the project (G9) and selecting Build (this might be redundant after running in debugger).
In Windows (File) Explorer, I navigate to the G9/bin/Development folder, double-click G9.ispac (steps through deploy: Project Development file; my-dev-svr; SSISDB > ACME-SSIS (which gives SSISDB/ACME-SSIS/G9); Deploy!
Problem: When I log into my-dev-svr, drill into Integration Services Catalogs, and run the package, then drill into the Overview Report (for this execution) > View Messages, I see several errors. The most important are
Perform ETL:Error: "G9 Web Service Script Component" failed validation and returned validation status "VS_ISBROKEN".
Perform ETL:Error: The component metedata is out of sync with the compiled script. Recompile the script using the Script Component Editor.
Command Line
I'm not entirely convinced this is related, but here it is: I've copied G9.ispac to my-dev-svr, then logged in there and on the command-line, executed dtexec. Bear in mind that this is the same server where SSIS debugging does not work.
D:\ACME\Deploy\SSIS>dtexec /Project G9.ispac /Package ACMEPortal_ProjectProperties_G9.dtsx
Microsoft (R) SQL Server Execute Package Utility
Version 11.0.6020.0 for 64-bit
Copyright (C) Microsoft Corporation. All rights reserved.
Started: 10:51:21 PM
Warning: 2017-04-17 22:51:21.74
Code: 0xC0016016
Source: SSIS:Property
Description: Failed to decrypt an encrypted XML node. Verify that the project was created by the same user. Project load will attempt to continue without the encrypted information.
End Warning
Warning: 2017-04-17 22:51:21.74
Code: 0x800190FF
Source:
Description: Failed to decrypt sensitive data in project with a user key. You may not be the user who encrypted this project, or you are not using the same machine that was used to save the project. If the sensitive data is a parameter value, the value may be required to run the package on the Integration Services server.
End Warning
Progress: 2017-04-17 22:51:25.61
Source: Get ETL Configuration
Executing query "etl_GetGenericETLConfigForACME".: 100% complete
End Progress
Progress: 2017-04-17 22:51:25.64
Source: Get G9 Web Service Connection Config Details
Executing query "etl_GetG9WSConfigSettings".: 100% complete
End Progress
Progress: 2017-04-17 22:51:25.65
Source: Audit ETL Initiation
Executing query "dbo.etl_AuditInitiation".: 100% complete
End Progress
Warning: 2017-04-17 22:51:25.68
Code: 0x80019002
Source: OnError
Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (6) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
End Warning
Error: 2017-04-17 22:51:25.68
Code: 0xC0010026
Source: Set Propogate Error to False
Description: The task has failed to load. The contact information for this task is "".
End Error
Error: 2017-04-17 22:51:25.71
Code: 0xC0024107
Source: Set Propogate Error to False
Description: There were errors during task validation.
End Error
Error: 2017-04-17 22:51:25.71
Code: 0xC0010026
Source: Set FilenamePart and Error Variables
Description: The task has failed to load. The contact information for this task is "".
End Error
Warning: 2017-04-17 22:51:25.72
Code: 0x80019002
Source: OnError
Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (10) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
End Warning
Error: 2017-04-17 22:51:25.72
Code: 0xC0010026
Source: Set Propogate Error to False
Description: The task has failed to load. The contact information for this task is "".
End Error
Error: 2017-04-17 22:51:25.73
Code: 0xC0024107
Source: Set Propogate Error to False
Description: There were errors during task validation.
End Error
Error: 2017-04-17 22:51:25.73
Code: 0xC0024107
Source: Set FilenamePart and Error Variables
Description: There were errors during task validation.
End Error
Warning: 2017-04-17 22:51:25.74
Code: 0x80019002
Source: ACMEPortal_ProjectProperties_G9
Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (8) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
End Warning
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 10:51:21 PM
Finished: 10:51:25 PM
Elapsed: 4.344 seconds
UPDATE 2: An excerpt from the Script Component.
' Microsoft SQL Server Integration Services user script component
' This is your new script component in Microsoft Visual Basic .NET
' ScriptMain is the entrypoint class for script components
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports ScriptComponentTaskUtility.ACME_ETLDataFlowScriptComponentTasks '-- custom toolkit
Imports ScriptComponentTaskUtility
Imports Microsoft.SqlServer.Dts
Imports System.Windows.Forms
<Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute> _
<CLSCompliant(False)> _
Public Class ScriptMain
Inherits UserComponent
Private _updateLimit As Integer
Private _rowCount As Integer
Public Overrides Sub PreExecute()
MyBase.PreExecute()
'
' Our application code follows
_updateLimit = 2 '-- Intending to replace this hard-coding
_rowCount = 0
End Sub
Public Overrides Sub G9ProjectInput_ProcessInputRow(ByVal Row As G9ProjectInputBuffer)
Try
' We limit the updated records to X per run (X = 2, but want to make configurable).
' Next ETL run will pick up next X
_rowCount += 1
If (_updateLimit > 0 And _rowCount > _updateLimit) Then Exit Sub
Dim taskComponent As G9Project = New G9Project(Me.UserID, Me.Password, Me.Config, Me.WSURL)
Dim readResponse As Project_DoReadResponse
''MessageBox.Show(Me.WSURL)
readResponse = taskComponent.ReadProject(Row.g9ProjectNumber, Row.Planet)
If (readResponse.Errors.Items.Length > 0) Then
CreateErrorRows(Row, readResponse.Errors.Items(0).ShortDescription)
Exit Sub
End If
Dim g9Project As Project = readResponse.Project
'**********************************
'Change the property values here
Try
' Who's in charge? The Manager or Owner?
If Not (Row.acmeInChargeCode_IsNull) Then
g9Project.SelectionCodes(10).Value = Row.acmeInChargeCode.ToString
End If
' ... other fields
Catch ex As Exception
Row.ErrorColumnName = "Web Service Error"
CreateErrorRows(Row, ex.Message)
Exit Sub
End Try
'End of change of property values
'**********************************
Dim updateResponse As ResponseBase
updateResponse = taskComponent.UpdateProject(g9Project)
If (updateResponse.Errors.Items.Length > 0) Then
CreateErrorRows(Row, updateResponse.Errors.Items(0).ShortDescription)
Exit Sub
End If
Catch ex As Exception
CreateErrorRows(Row, ex.Message)
Exit Sub
End Try
End Sub
' #Region ************************ NOTE: Copy & paste following code block *********************
' contains private member variables, etc, including CreateErrorRows()
End Class
It was necessary to record all the details/configuration/code of the Script Component, then to delete it and recreate it afresh. Then join up the flows again (for the input and output).
In this case, the script is a Transformation script, but in moral terms, it is a destination; only error cases come through to the output.
There was a second Script Component that also had to change as part of the same bug fix. Adding extra columns for input triggered the error there as well, so it was also necessary to do the same delete-and-recreate on this. It was also a Transformation script, but this is fully synchronous (every input row come through to output, with some read-write input columns changed, and some other read-only input columns copied/filtered to additional output columns).
It's important to note (prior to the delete-and-recreate), that I could always run it in the Visual Studio 2012 debugger on my jump host, but the "out of sync" error occurred after I had deployed the G9.ispac file to my-dev-svr (and running either via SSMS > Integration Services Catalog > ... package, or by SQL Server Agent > Job Activity Monitor > job).
An additional observation, that after the delete-and-recreate, I can now freely add and delete input columns to the script - the very activity that caused the error prior. After doing the input column changes, it is enough to press Edit Script..., wait for the VstaProjects window to appear, close it immediately, press OK on the Script Transformation Editor dialog, and verify that a red X does not appear.
I guess it's the SSIS equivalent of "Have you turned it off and turned it on again?"
Since you have already work out the script and make sure the script works fine. Then it has a lot chance it has issues in your destination. It seems that you are using the Script component as data source, try to check the Metadata from the output of the source (right click the precedence constraint), check them whether they are matched with the input of destination, more important, if you have made any changes to the source columns, you'd better to delete and create a new destination, sometimes it might cache the columns that no longer exists.

SSRS 2014 invalid namespace

I am trying to set up forms authentication on Reporting Server 2014. So far I was able to get rid of most of the errors but when trying to log in on reportserver/logon.aspx I get the following error:
An error occurred while attempting to get the ReportServer Url. Invalid namespace
I applied the following in web.config:
<add key="ReportServer" value="localhost"/>
<add key="ReportServerInstance" value="RS_SKOREPORTS"/>
The following is from my reportingservices.mof:
#pragma namespace ("\\\\.\\root\\Microsoft\\SqlServer\\ReportServer\\RS_SKOREPORTS\\V12")
I've tried several things like removing the RS_ prefix but the error remains.
EDIT:
Ok, I have come to the point where I know what's wrong by debugging everything, I just don't know how to fix it. My wmiNamespace string is adjusted for report server 2014 as follows: private const string wmiNamespace = #"\\{0}\root\Microsoft\SqlServer\ReportServer\RS_{1}\v12";
The weird thing is that when I debug the login process and put a watch on fullWmiNamespace the value it returns is:
"\\\\localhost\\root\\Microsoft\\SqlServer\\ReportServer\\RS_SKOREPORTS\\v10"
It looks like report server ignores the changes I made in AuthenticationUtilities.cs and just uses the unmodified version.
Fixed by hardcoding the wmiNamespace string. For some reason the FullWmiNamespace string didn't format the string properly..

Can't Execute Query in MSSQL using JDBC in XPages

I am using a JDBC Microsoft SQL driver in an xpage to get data from MS SQL server
The driver is installed using an update site and it is loaded successfully into the OSGI
I have also added a sqlserver.jdbc containing credentials to the webcontent\webinf\jdbc folder in the application
When I try to access the sql tables using #JdbcDbColumn it is working fine
var con=#JdbcGetConnection("sqlserver");
#JdbcDbColumn(con,"PrTr","Descr")
But when I try to execute a query like this
var con=#JdbcGetConnection("sqlserver");
var query="SELECT * FROM PrTr";
var rs=#JdbcExecuteQuery(con,query);
....
I get a stack trace error (on line 3) with lots of error lines, the lines that stand out are these
com.ibm.jscript.InterpretException: Script interpreter error, line=4,
col=8: Error while executing function '#JdbcExecuteQuery'
java.lang.ArrayIndexOutOfBoundsException
I have also tried to connect a view panel to a JDBCQuery data source but then I only get a 500 error wihtout a stacktrace
The SQL server is not on the same windows server as the xpages
in the stacktrace/tracelog there was one line that looked like this
java.security.AccessController.doPrivileged(AccessController.java:362)
But not sure if it is an error or only informational and if it is related to the query. i.e if there is a security problem.
I need help to understand why I can do the #JDBCDbColumn but not the #JDBCExecuteQuery
btw I just checked the SQLLog and do not see any entries related to my queries
Here is the full stacktrace
com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing
JavaScript computed expression
com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:132)
javax.faces.component.UIOutput.getValue(UIOutput.java:159)
com.ibm.xsp.util.FacesUtil.convertValue(FacesUtil.java:1122)
com.ibm.xsp.renderkit.html_basic.OutputTextRenderer.encodeEnd(OutputTextRenderer.java:97)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeEnd(ReadOnlyAdapterRenderer.java:180)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:1005)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:858)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853)
com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1317)
com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255)
com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:651)
com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:321)
com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:336)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:270)
com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:261)
com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157)
com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335)
com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853)
com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)
com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:350)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:306)
com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
com.ibm.jscript.InterpretException: Script interpreter error, line=3,
col=10: Error while executing function '#JdbcExecuteQuery'
com.ibm.xsp.extlib.javascript.JdbcFunctions$NotesFunction.call(JdbcFunctions.java:389)
com.ibm.jscript.types.FBSObject.call(FBSObject.java:161)
com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:197)
com.ibm.jscript.ASTTree.ASTVariableDecl.interpret(ASTVariableDecl.java:82)
com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119)
com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139)
com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435)
com.ibm.jscript.JSExpression.access$1(JSExpression.java:424)
com.ibm.jscript.JSExpression$2.run(JSExpression.java:414)
java.security.AccessController.doPrivileged(AccessController.java:362)
com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410)
com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251)
com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234)
com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:222)
com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:194)
com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:78)
javax.faces.component.UIOutput.getValue(UIOutput.java:159)
com.ibm.xsp.util.FacesUtil.convertValue(FacesUtil.java:1122)
com.ibm.xsp.renderkit.html_basic.OutputTextRenderer.encodeEnd(OutputTextRenderer.java:97)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeEnd(ReadOnlyAdapterRenderer.java:180)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:1005)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:858)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853)
com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1317)
com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255)
com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:651)
com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:321)
com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:336)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:270)
com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:261)
com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157)
com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335)
com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853)
com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)
com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:350)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:306)
com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 2
com.ibm.jscript.types.FBSValueVector.get(FBSValueVector.java:76)
com.ibm.xsp.extlib.javascript.JdbcFunctions$NotesFunction.call(JdbcFunctions.java:267)
com.ibm.jscript.types.FBSObject.call(FBSObject.java:161)
com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:197)
com.ibm.jscript.ASTTree.ASTVariableDecl.interpret(ASTVariableDecl.java:82)
com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119)
com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139)
com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435)
com.ibm.jscript.JSExpression.access$1(JSExpression.java:424)
com.ibm.jscript.JSExpression$2.run(JSExpression.java:414)
java.security.AccessController.doPrivileged(AccessController.java:362)
com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410)
com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251)
com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234)
com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:222)
com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:194)
com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:78)
javax.faces.component.UIOutput.getValue(UIOutput.java:159)
com.ibm.xsp.util.FacesUtil.convertValue(FacesUtil.java:1122)
com.ibm.xsp.renderkit.html_basic.OutputTextRenderer.encodeEnd(OutputTextRenderer.java:97)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeEnd(ReadOnlyAdapterRenderer.java:180)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:1005)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:858)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:853)
com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1317)
com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255)
com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:651)
com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:321)
com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:336)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:270)
com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:261)
com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157)
com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335)
com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853)
com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)
com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:350)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:306)
com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
I came across this problem some time ago with column names being upper cased for a method in Extension Library code -> How to get XPages and JSON to not put variable names in Uppercase
I'm not sure if it's the same problem, but may be worth investigating.
To find out if it's a security issue you could allow all permissions to Java. Create a java.pol file in the jvm/lib/ext/ folder, and add this:
grant {
permission java.security.AllPermission;
};
(don't forget to restart the server when you're done)
I've done custom JDBC connections by including the correct driver Jar file to the database and I needed to do this to get it work.

SMTPSenderRefused when sending mail from GAE dev_appserver on gmail

Here are my email related dev_appserver options:
--smtp_host=smtp.gmail.com --smtp_port=25 --smtp_user=me#mydomain.com --smtp_password="password"
Now, this still doesn't work and every time Google release a new dev_appserver I have to edit api/mail_stub.py to get things to work locally as per this S/O answer.
However, even this workaround has now stopped working. I get the following exception:
SMTPSenderRefused: (555, '5.5.2 Syntax error. mw9sm14633203wib.0 - gsmtp', <email.header.Header instance at 0x10c9c9248>)
Does anyone smarter than me know how to fix it?
UPDATE
I was able to get email to send on dev_appserver by using email addresses (eg. for sender and recipient) in their 'plain' format of a simple string (name#domain.com) rather than using the angle bracket style (Name <name#domain.com>). This is not a problem in production: recipients and sender email addresses can use angle brackets in the mail.send_mail call. I raised a ticket about this divergent behaviour between dev_appserver and production: https://code.google.com/p/googleappengine/issues/detail?id=10211&thanks=10211&ts=1383140754
Looks like it's because the 'sender' is now stored as a "email.header.Header" instance in the dev server instead of a string (since SDK 1.8.3 I think).
From my testing, when a 'From' string like "Name " is passed into smtplib.SMTP.sendmail, it parses the string to find the part within angle brackets, if any, to use as the SMTP sender, giving "". However, if this parameter is an "email.header.Header", then is just converts to string and uses it without further parsing, giving ">", thus causing the problem we're seeing.
Here's the patch I just posted on the issue tracker to google/appengine/api/mail_stub.py to convert this parameter back to a string (works for me):
--- google/appengine/api/mail_stub-orig.py 2014-12-12 20:04:53.612070031 +0000
+++ google/appengine/api/mail_stub.py 2014-12-12 20:05:07.532294605 +0000
## -215,7 +215,7 ##
tos = [mime_message[to] for to in ['To', 'Cc', 'Bcc'] if mime_message[to]]
- smtp.sendmail(mime_message['From'], tos, mime_message.as_string())
+ smtp.sendmail(str(mime_message['From']), tos, mime_message.as_string())
finally:
smtp.quit()
Another alternative is to patch the SMTP server that you use for testing the app engine mail functionality in your dev environment (instead of patching mail_stub.py).
For example, I'm using subethasmtp Wiser and was able to work around this issue by patching org.subethamail.smtp.util.EmailUtils.extractEmailAddress to accept nested angle brackets (details posted here).

Resources