Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » XPath expression returned no result
XPath expression returned no result [message #11909] Tue, 17 April 2007 05:09 Go to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

I'm getting the following exception but the code still goes ahead and
generates ok.

Any clues on how to stop it.

org.eclipse.jet.taglib.JET2TagException: XPath expression returned no result
at org.eclipse.jet.internal.taglib.control.GetTag.doAction(GetT ag.java:62)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
at
org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:850)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
at
org.eclipse.jet.compiled._jet_1314createStringDecisionRuleAc tion_0.generate(_jet_1314createStringDecisionRuleAction_0.ja va:647)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
at
org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
at
org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:850)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
at
org.eclipse.jet.compiled._jet_131initialiseDecisionNode_0.ge nerate(_jet_131initialiseDecisionNode_0.java:515)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
at
org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
at
org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:850)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
at
org.eclipse.jet.compiled._jet_13createInitialiseRules_0.gene rate(_jet_13createInitialiseRules_0.java:138)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
at
org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
at
org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:850)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
at
org.eclipse.jet.compiled._jet_1createRuleConductorClass_0.ge nerate(_jet_1createRuleConductorClass_0.java:206)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
at
org.eclipse.jet.internal.taglib.java.AbstractJavaFileTag.doA ction(AbstractJavaFileTag.java:95)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
at
org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:850)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
at org.eclipse.jet.compiled._jet_main.generate(_jet_main.java:7 7)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
at org.eclipse.jet.JET2Platform$4.run(JET2Platform.java:430)
at
org.eclipse.jet.internal.runtime.JETBundleManager.run(JETBun dleManager.java:336)
at org.eclipse.jet.JET2Platform.runTransform(JET2Platform.java: 398)
at org.eclipse.jet.JET2Platform.runTransformOnObject(JET2Platfo rm.java:501)
at
visualrating.diagram.custom.actions.RuleConductorGenerateCod eAction.run(RuleConductorGenerateCodeAction.java:82)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:253)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:443)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3490)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3104)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2264)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 03)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:452)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:101)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:146)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:354)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 476)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416)
at org.eclipse.equinox.launcher.Main.run(Main.java:1124)
at org.eclipse.equinox.launcher.Main.main(Main.java:1099)
Re: XPath expression returned no result [message #12914 is a reply to message #11909] Tue, 17 April 2007 05:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Below is one of the templates I get this exception with:-
<%-- add initialiseRules() override to setup rules --%>

@Override

public void initialiseRules() {

super.initialiseRules();


startNode = "<c:get
select="$conductorType/startNode/whereNextConnection/@whereNextNode "/>";


<java:import> com.ibridge.businessrulesmodel.testFrameworkModel.RuleAction </java:import>
aNewAction;

<c:iterate select="$conductorType/rules" var="node" >

<c:setVariable select="uppercaseFirst($node/@tag)" var="upperNodeTag"/>

<c:choose>

<c:when test="$node/self::DecisionNode">

<c:include template="templates/1-3-1-initialiseDecisionNode.jet"/>

</c:when>

<c:when test="$node/self::ActionNode">

<c:include template="templates/1-3-2-initialiseActionNode.jet"/>

</c:when>

</c:choose>

</c:iterate>

}



"Stu" <evaandoli@dodo.com.au> wrote in message
news:f01kpm$uop$1@build.eclipse.org...
> I'm getting the following exception but the code still goes ahead and
> generates ok.
>
> Any clues on how to stop it.
>
> org.eclipse.jet.taglib.JET2TagException: XPath expression returned no
> result
> at org.eclipse.jet.internal.taglib.control.GetTag.doAction(GetT ag.java:62)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
> at
> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
> at
> org.eclipse.jet.compiled._jet_1314createStringDecisionRuleAc tion_0.generate(_jet_1314createStringDecisionRuleAction_0.ja va:647)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
> at
> org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
> at
> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
> at
> org.eclipse.jet.compiled._jet_131initialiseDecisionNode_0.ge nerate(_jet_131initialiseDecisionNode_0.java:515)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
> at
> org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
> at
> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
> at
> org.eclipse.jet.compiled._jet_13createInitialiseRules_0.gene rate(_jet_13createInitialiseRules_0.java:138)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
> at
> org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
> at
> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
> at
> org.eclipse.jet.compiled._jet_1createRuleConductorClass_0.ge nerate(_jet_1createRuleConductorClass_0.java:206)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
> at
> org.eclipse.jet.internal.taglib.java.AbstractJavaFileTag.doA ction(AbstractJavaFileTag.java:95)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
> at
> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
> at org.eclipse.jet.compiled._jet_main.generate(_jet_main.java:7 7)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
> at org.eclipse.jet.JET2Platform$4.run(JET2Platform.java:430)
> at
> org.eclipse.jet.internal.runtime.JETBundleManager.run(JETBun dleManager.java:336)
> at org.eclipse.jet.JET2Platform.runTransform(JET2Platform.java: 398)
> at
> org.eclipse.jet.JET2Platform.runTransformOnObject(JET2Platfo rm.java:501)
> at
> visualrating.diagram.custom.actions.RuleConductorGenerateCod eAction.run(RuleConductorGenerateCodeAction.java:82)
> at
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:253)
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
> at
> org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:443)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3490)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3104)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2264)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 03)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:452)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:101)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:146)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:354)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:169)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 476)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1124)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1099)
>
>
Re: XPath expression returned no result [message #13030 is a reply to message #12914] Wed, 18 April 2007 13:34 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Stu:

It looks like the c:get tag:

startNode = "<c:get
select="$conductorType/startNode/whereNextConnection/@whereNextNode "/>";

is getting no result from the XPath expression:
$conductorType/startNode/whereNextConnection/@whereNextNode

If you take a look at the output created by the template, you should see
code like:

startNode = "";

I'm guessing this is not what you want. You have to options

1) figure out what's wrong, if anything, with the XPath expression
2) add a default attribute the the <c:get> tag to specify a value to use in
the case where the XPath expression returns no result.

Paul

"Stu" <evaandoli@dodo.com.au> wrote in message
news:f01n9r$aeu$1@build.eclipse.org...
> Below is one of the templates I get this exception with:-
> <%-- add initialiseRules() override to setup rules --%>
>
> @Override
>
> public void initialiseRules() {
>
> super.initialiseRules();
>
>
> startNode = "<c:get
> select="$conductorType/startNode/whereNextConnection/@whereNextNode "/>";
>
>
> <java:import> com.ibridge.businessrulesmodel.testFrameworkModel.RuleAction </java:import>
> aNewAction;
>
> <c:iterate select="$conductorType/rules" var="node" >
>
> <c:setVariable select="uppercaseFirst($node/@tag)" var="upperNodeTag"/>
>
> <c:choose>
>
> <c:when test="$node/self::DecisionNode">
>
> <c:include template="templates/1-3-1-initialiseDecisionNode.jet"/>
>
> </c:when>
>
> <c:when test="$node/self::ActionNode">
>
> <c:include template="templates/1-3-2-initialiseActionNode.jet"/>
>
> </c:when>
>
> </c:choose>
>
> </c:iterate>
>
> }
>
>
>
> "Stu" <evaandoli@dodo.com.au> wrote in message
> news:f01kpm$uop$1@build.eclipse.org...
>> I'm getting the following exception but the code still goes ahead and
>> generates ok.
>>
>> Any clues on how to stop it.
>>
>> org.eclipse.jet.taglib.JET2TagException: XPath expression returned no
>> result
>> at
>> org.eclipse.jet.internal.taglib.control.GetTag.doAction(GetT ag.java:62)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>> at
>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>> at
>> org.eclipse.jet.compiled._jet_1314createStringDecisionRuleAc tion_0.generate(_jet_1314createStringDecisionRuleAction_0.ja va:647)
>> at
>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>> at
>> org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>> at
>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>> at
>> org.eclipse.jet.compiled._jet_131initialiseDecisionNode_0.ge nerate(_jet_131initialiseDecisionNode_0.java:515)
>> at
>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>> at
>> org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>> at
>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>> at
>> org.eclipse.jet.compiled._jet_13createInitialiseRules_0.gene rate(_jet_13createInitialiseRules_0.java:138)
>> at
>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>> at
>> org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>> at
>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>> at
>> org.eclipse.jet.compiled._jet_1createRuleConductorClass_0.ge nerate(_jet_1createRuleConductorClass_0.java:206)
>> at
>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>> at
>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
>> at
>> org.eclipse.jet.internal.taglib.java.AbstractJavaFileTag.doA ction(AbstractJavaFileTag.java:95)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>> at
>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>> at
>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>> at org.eclipse.jet.compiled._jet_main.generate(_jet_main.java:7 7)
>> at
>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>> at
>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
>> at org.eclipse.jet.JET2Platform$4.run(JET2Platform.java:430)
>> at
>> org.eclipse.jet.internal.runtime.JETBundleManager.run(JETBun dleManager.java:336)
>> at org.eclipse.jet.JET2Platform.runTransform(JET2Platform.java: 398)
>> at
>> org.eclipse.jet.JET2Platform.runTransformOnObject(JET2Platfo rm.java:501)
>> at
>> visualrating.diagram.custom.actions.RuleConductorGenerateCod eAction.run(RuleConductorGenerateCodeAction.java:82)
>> at
>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:253)
>> at
>> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
>> at
>> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
>> at
>> org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:443)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3490)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3104)
>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2264)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228)
>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 03)
>> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:452)
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>> at
>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:101)
>> at
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:146)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:354)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:169)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 476)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1124)
>> at org.eclipse.equinox.launcher.Main.main(Main.java:1099)
>>
>>
>
>
Re: XPath expression returned no result [message #13117 is a reply to message #13030] Wed, 18 April 2007 23:20 Go to previous message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Ok I worked this one out and thanks for the hits Paul.

Basics are:-
1) Work then running JET directly in eclipse (using the XML data file)
2) Didnt work then running JET from plugin (using in memory resource).

Problem is referenced object without containment need there Jet paths
changed for the above two situations.

So as I tested with 1) but wanted to deploy with 2) I need to change
non-contained object reference to return the id I wanted.

Eg.

whereNextConnection >> whereNextNode
in the direct eclipse version I just needed to do
$whereNextConnection/@whereNextNode

for the plugin version I had to do:-
$whereNextConnection/whereNextNode/@id

Hope that maybe helps someone else :-)

Maybe best to run JET from the plugin everytime rather than use the direct
Eclipse call - I found a few differences (like addElement - far enough with
this one).

Stu


"Paul Elder" <pelder@ca.ibm.com> wrote in message
news:f056q6$d5p$1@build.eclipse.org...
> Stu:
>
> It looks like the c:get tag:
>
> startNode = "<c:get
> select="$conductorType/startNode/whereNextConnection/@whereNextNode "/>";
>
> is getting no result from the XPath expression:
> $conductorType/startNode/whereNextConnection/@whereNextNode
>
> If you take a look at the output created by the template, you should see
> code like:
>
> startNode = "";
>
> I'm guessing this is not what you want. You have to options
>
> 1) figure out what's wrong, if anything, with the XPath expression
> 2) add a default attribute the the <c:get> tag to specify a value to use
> in the case where the XPath expression returns no result.
>
> Paul
>
> "Stu" <evaandoli@dodo.com.au> wrote in message
> news:f01n9r$aeu$1@build.eclipse.org...
>> Below is one of the templates I get this exception with:-
>> <%-- add initialiseRules() override to setup rules --%>
>>
>> @Override
>>
>> public void initialiseRules() {
>>
>> super.initialiseRules();
>>
>>
>> startNode = "<c:get
>> select="$conductorType/startNode/whereNextConnection/@whereNextNode "/>";
>>
>>
>> <java:import> com.ibridge.businessrulesmodel.testFrameworkModel.RuleAction </java:import>
>> aNewAction;
>>
>> <c:iterate select="$conductorType/rules" var="node" >
>>
>> <c:setVariable select="uppercaseFirst($node/@tag)" var="upperNodeTag"/>
>>
>> <c:choose>
>>
>> <c:when test="$node/self::DecisionNode">
>>
>> <c:include template="templates/1-3-1-initialiseDecisionNode.jet"/>
>>
>> </c:when>
>>
>> <c:when test="$node/self::ActionNode">
>>
>> <c:include template="templates/1-3-2-initialiseActionNode.jet"/>
>>
>> </c:when>
>>
>> </c:choose>
>>
>> </c:iterate>
>>
>> }
>>
>>
>>
>> "Stu" <evaandoli@dodo.com.au> wrote in message
>> news:f01kpm$uop$1@build.eclipse.org...
>>> I'm getting the following exception but the code still goes ahead and
>>> generates ok.
>>>
>>> Any clues on how to stop it.
>>>
>>> org.eclipse.jet.taglib.JET2TagException: XPath expression returned no
>>> result
>>> at
>>> org.eclipse.jet.internal.taglib.control.GetTag.doAction(GetT ag.java:62)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>>> at
>>> org.eclipse.jet.compiled._jet_1314createStringDecisionRuleAc tion_0.generate(_jet_1314createStringDecisionRuleAction_0.ja va:647)
>>> at
>>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>>> at
>>> org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>>> at
>>> org.eclipse.jet.compiled._jet_131initialiseDecisionNode_0.ge nerate(_jet_131initialiseDecisionNode_0.java:515)
>>> at
>>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>>> at
>>> org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>>> at
>>> org.eclipse.jet.compiled._jet_13createInitialiseRules_0.gene rate(_jet_13createInitialiseRules_0.java:138)
>>> at
>>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>>> at
>>> org.eclipse.jet.internal.taglib.control.IncludeTag.doAction( IncludeTag.java:79)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>>> at
>>> org.eclipse.jet.compiled._jet_1createRuleConductorClass_0.ge nerate(_jet_1createRuleConductorClass_0.java:206)
>>> at
>>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>>> at
>>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
>>> at
>>> org.eclipse.jet.internal.taglib.java.AbstractJavaFileTag.doA ction(AbstractJavaFileTag.java:95)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:50)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:73)
>>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>>> at org.eclipse.core.runtime.Platform.run(Platform.java:850)
>>> at
>>> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:44)
>>> at org.eclipse.jet.compiled._jet_main.generate(_jet_main.java:7 7)
>>> at
>>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
>>> at
>>> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
>>> at org.eclipse.jet.JET2Platform$4.run(JET2Platform.java:430)
>>> at
>>> org.eclipse.jet.internal.runtime.JETBundleManager.run(JETBun dleManager.java:336)
>>> at org.eclipse.jet.JET2Platform.runTransform(JET2Platform.java: 398)
>>> at
>>> org.eclipse.jet.JET2Platform.runTransformOnObject(JET2Platfo rm.java:501)
>>> at
>>> visualrating.diagram.custom.actions.RuleConductorGenerateCod eAction.run(RuleConductorGenerateCodeAction.java:82)
>>> at
>>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:253)
>>> at
>>> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
>>> at
>>> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
>>> at
>>> org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:443)
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
>>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3490)
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3104)
>>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2264)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228)
>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 03)
>>> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457)
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:452)
>>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>> at
>>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:101)
>>> at
>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:146)
>>> at
>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>>> at
>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:354)
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:169)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 476)
>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416)
>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1124)
>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1099)
>>>
>>>
>>
>>
>
>
Previous Topic:Could not load JET template loader
Next Topic:jets transformation
Goto Forum:
  


Current Time: Tue Nov 25 21:24:53 GMT 2014

Powered by FUDForum. Page generated in 0.02257 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software