MartinNYC

Problem connecting to external database using GEL

Discussion created by MartinNYC on Oct 12, 2010
Latest reply on Oct 12, 2010 by Chris_Hackett
I'm having a hard time connecting to an external Oracle database. Can anyone point out a solution?

In NSA, I added an external database with an id of "CDW". I checked the properties.xml file on the server to make sure the correct information was captured, it was. When I run the following GEL script within a process, I get an error.

<gel:script

xmlns:jelly="jelly:core"

xmlns:sql="jelly:sql"

xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary">



<!-- CONNECTION STRING TO EXTERNAL DB -->

<gel:setDataSource dbId="CDW" />




<!-- SAMPLE QUERY -->

<sql:query var="sampleQuery">

SELECT * FROM SAMPLE.TABLE

</sql:query>
</gel:script>

I get a lengthly BMP-0704 error:

BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:9:34: <gel:setDataSource> No database element found with id CDW at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:671) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:259) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at com.niku.union.gel.GELScript.run(GELScript.java:80) at com.niku.union.gel.GELController.invoke(GELController.java:20) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727) at java.lang.Thread.run(Thread.java:595) Caused by: com.niku.union.config.ConfigurationException: No database element found with id CDW at com.niku.union.config.ConfigurationManager.getDatabase(ConfigurationManager.java:1352) at com.niku.union.gel.tags.SetDataSourceTag.doTag(SetDataSourceTag.java:43) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) ... 9 more Root cause com.niku.union.config.ConfigurationException: No database element found with id CDW at com.niku.union.config.ConfigurationManager.getDatabase(ConfigurationManager.java:1352) at com.niku.union.gel.tags.SetDataSourceTag.doTag(SetDataSourceTag.java:43) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at com.niku.union.gel.GELScript.run(GELScript.java:80) at com.niku.union.gel.GELController.invoke(GELController.java:20) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727) at java.lang.Thread.run(Thread.java:595)

Outcomes