Connect 3.0, appears to not support excuteQuery() any longer.
I am attempting to process this SQL Statement:
SQL =
"Create table [dbo].[zzz835_20141213211630_M018_4_20140730_33628_000000 835] (ID int IDENTITY(1,1), Segment varchar(2048)); Select isnull(Object_ID,0) as result from sys.tables where name = 'zzz835_20141213211630_M018_4_20140730_33628_00000 0835';
"
This statement runs correctly as the table is created.
This Statement when processed in SQL Server proper executes and returns a column result with a value of 0.
Mirth is throwing this error when processing this SQL Statement with updateCachedQuery.
Not sure what the issue is Mirth with the SQL Statement.
[2014-12-13 21:16:30,095] ERROR (com.mirth.connect.connectors.js.JavaScriptDispatc her:172): Error evaluating JavaScript Writer (JavaScript Writer "WriteToDB" on channel 6dc2dd55-e536-4f4f-a109-097172f2e09f).
com.mirth.connect.server.MirthJavascriptTransforme rException: CHANNEL:
CLMTRK 835 ProcessorCONNECTOR:
WriteToDBSCRIPT SOURCE:
JavaScript WriterSOURCE CODE:
9068: 9069: if ($('thisFileSize')>0) {9070:
sql = 'Create table ' + tempTableName + ' (ID int IDENTITY(1,1), Segment varchar(2048)); ';9071:
sql += "Select isnull(Object_ID,0) as result from sys.tables where name = '" + tablename + "';";9072:
logger.info(sql);9073:
dbConnTargetDB.executeCachedQuery(sql);9074: 9075:
try {9076:
var fis = new Packages.java.io.FileInputStream($('thisFileFullNa me'));9077:
var dis = new Packages.java.io.DataInputStream(fis);LINE NUMBER:
9073DETAILS:
Wrapped com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.
at 211e4703-5460-41e5-9416-8a4e45733849:9073 (doScript)
at 211e4703-5460-41e5-9416-8a4e45733849:9101
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.call(JavaScriptDispatc her.java:163)
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.call(JavaScriptDispatc her.java:102)
at java.util.concurrent.FutureTask.run(FutureTask.jav a:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.
at com.microsoft.sqlserver.jdbc.SQLServerException.ma keFromDriverError(SQLServerException.java:171)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.do ExecuteStatement(SQLServerStatement.java:783)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$St mtExecCmd.doExecute(SQLServerStatement.java:676)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IO Buffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.e xecuteCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.ex ecuteCommand(SQLServerStatement.java:179)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.ex ecuteStatement(SQLServerStatement.java:154)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.ex ecuteQuery(SQLServerStatement.java:611)
at com.mirth.connect.server.userutil.DatabaseConnecti on.executeCachedQuery(DatabaseConnection.java:88)
at sun.reflect.GeneratedMethodAccessor289.invoke(Unkn own Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mozilla.javascript.MemberBox.invoke(MemberBox. java:126)
at org.mozilla.javascript.NativeJavaMethod.call(Nativ eJavaMethod.java:225)
at org.mozilla.javascript.Interpreter.interpretLoop(I nterpreter.java:1473)
at org.mozilla.javascript.Interpreter.interpret(Inter preter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(In terpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:3110)
at org.mozilla.javascript.InterpretedFunction.exec(In terpretedFunction.java:120)
at com.mirth.connect.server.util.javascript.JavaScrip tTask.executeScript(JavaScriptTask.java:49)
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.call(JavaScriptDispatc her.java:128)
... 5 more
I am attempting to process this SQL Statement:
SQL =
"Create table [dbo].[zzz835_20141213211630_M018_4_20140730_33628_000000 835] (ID int IDENTITY(1,1), Segment varchar(2048)); Select isnull(Object_ID,0) as result from sys.tables where name = 'zzz835_20141213211630_M018_4_20140730_33628_00000 0835';
"
This statement runs correctly as the table is created.
This Statement when processed in SQL Server proper executes and returns a column result with a value of 0.
Mirth is throwing this error when processing this SQL Statement with updateCachedQuery.
Not sure what the issue is Mirth with the SQL Statement.
[2014-12-13 21:16:30,095] ERROR (com.mirth.connect.connectors.js.JavaScriptDispatc her:172): Error evaluating JavaScript Writer (JavaScript Writer "WriteToDB" on channel 6dc2dd55-e536-4f4f-a109-097172f2e09f).
com.mirth.connect.server.MirthJavascriptTransforme rException: CHANNEL:
CLMTRK 835 ProcessorCONNECTOR:
WriteToDBSCRIPT SOURCE:
JavaScript WriterSOURCE CODE:
9068: 9069: if ($('thisFileSize')>0) {9070:
sql = 'Create table ' + tempTableName + ' (ID int IDENTITY(1,1), Segment varchar(2048)); ';9071:
sql += "Select isnull(Object_ID,0) as result from sys.tables where name = '" + tablename + "';";9072:
logger.info(sql);9073:
dbConnTargetDB.executeCachedQuery(sql);9074: 9075:
try {9076:
var fis = new Packages.java.io.FileInputStream($('thisFileFullNa me'));9077:
var dis = new Packages.java.io.DataInputStream(fis);LINE NUMBER:
9073DETAILS:
Wrapped com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.
at 211e4703-5460-41e5-9416-8a4e45733849:9073 (doScript)
at 211e4703-5460-41e5-9416-8a4e45733849:9101
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.call(JavaScriptDispatc her.java:163)
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.call(JavaScriptDispatc her.java:102)
at java.util.concurrent.FutureTask.run(FutureTask.jav a:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.
at com.microsoft.sqlserver.jdbc.SQLServerException.ma keFromDriverError(SQLServerException.java:171)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.do ExecuteStatement(SQLServerStatement.java:783)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$St mtExecCmd.doExecute(SQLServerStatement.java:676)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IO Buffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.e xecuteCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.ex ecuteCommand(SQLServerStatement.java:179)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.ex ecuteStatement(SQLServerStatement.java:154)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.ex ecuteQuery(SQLServerStatement.java:611)
at com.mirth.connect.server.userutil.DatabaseConnecti on.executeCachedQuery(DatabaseConnection.java:88)
at sun.reflect.GeneratedMethodAccessor289.invoke(Unkn own Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mozilla.javascript.MemberBox.invoke(MemberBox. java:126)
at org.mozilla.javascript.NativeJavaMethod.call(Nativ eJavaMethod.java:225)
at org.mozilla.javascript.Interpreter.interpretLoop(I nterpreter.java:1473)
at org.mozilla.javascript.Interpreter.interpret(Inter preter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(In terpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:3110)
at org.mozilla.javascript.InterpretedFunction.exec(In terpretedFunction.java:120)
at com.mirth.connect.server.util.javascript.JavaScrip tTask.executeScript(JavaScriptTask.java:49)
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.call(JavaScriptDispatc her.java:128)
... 5 more
updateCachedQuery Mirth Connect 3.0.1.7051
0 commentaires:
Enregistrer un commentaire