web stats
executeCachedQuery issue - oracle - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-27-2012, 11:46 AM
asharaf asharaf is offline
Mirth Newb
 
Join Date: Feb 2012
Posts: 12
asharaf is on a distinguished road
Default executeCachedQuery issue - oracle

hi there

I am trying to retrieve nextvalue from an oracle sequence.

but its failing at executecachedquery method. any pointers/suggestions highly appreciated.

thanks in adavance

code snippet below
-------------------

var sql = "select my_sequence.nextval as VAL from dual";

var result = dbConn.executeCachedQuery(sql);

result.next();

var nextVal= result.getInt(1);

logger.info("next value is->"+nextVal);


error message below
--------------------

DETAILS: TypeError: Cannot find function executeCachedQuery in object oracle.jdbc.driver.T4CConnection@8f20f5.
at com.mirth.connect.server.mule.transformers.JavaScr iptTransformer.evaluateScript(JavaScriptTransforme r.java:398)
at com.mirth.connect.server.mule.transformers.JavaScr iptTransformer.transform(JavaScriptTransformer.jav a:296)
at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:61)
at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:79)
at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:487)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:266)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:225)
at com.mirth.connect.connectors.vm.VMMessageReceiver. getMessages(VMMessageReceiver.java:221)
at org.mule.providers.TransactedPollingMessageReceive r.poll(TransactedPollingMessageReceiver.java:108)
at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:97)
at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1061)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :575)
at java.lang.Thread.run(Thread.java:662)
Reply With Quote
  #2  
Old 03-27-2012, 12:27 PM
asharaf asharaf is offline
Mirth Newb
 
Join Date: Feb 2012
Posts: 12
asharaf is on a distinguished road
Default

never mind.. tried a different method and it worked. thanks !!.

var sql = "select my_sequence.nextval as VAL from dual";
var stmt = dbConn.createStatement();
var result = stmt.executeQuery(sql);
result.next();
var nextVal= result.getInt(1);
logger.info("next value is->"+nextVal);
Reply With Quote
Reply

Tags
connect, executecachedquery, jdbc, mirth, oracle

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation