Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when reading policy cost by period query #87

Open
klau506 opened this issue May 16, 2024 · 0 comments
Open

Error when reading policy cost by period query #87

klau506 opened this issue May 16, 2024 · 0 comments

Comments

@klau506
Copy link

klau506 commented May 16, 2024

Hey!

I'm getting an error when running the query policy cost by period. In the Model Interface it runs correctly, but in the R session, I obtain the following error, either using the runQuery or addSingleQuery function:

About to perform query: collection()/scenario
Trying to complete xpath
java.lang.ArrayIndexOutOfBoundsException: 0
	at ModelInterface.ModelGUI2.queries.CostCurveQueryBuilder.getCompleteXPath(CostCurveQueryBuilder.java:232)
	at ModelInterface.ModelGUI2.queries.QueryGenerator.getCompleteXPath(QueryGenerator.java:811)
	at ModelInterface.ModelGUI2.xmldb.QueryGeneratorQueryBinding.bindToQuery(QueryGeneratorQueryBinding.java:42)
	at ModelInterface.ModelGUI2.xmldb.XMLDB.createQuery(XMLDB.java:285)
	at ModelInterface.ModelGUI2.xmldb.XMLDB.createQuery(XMLDB.java:278)
	at ModelInterface.ModelGUI2.xmldb.XMLDB.createQuery(XMLDB.java:275)
	at ModelInterface.ModelGUI2.xmldb.RunMIQuery.runMIQuery(RunMIQuery.java:122)
	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.basex.query.func.java.StaticJavaCall.eval(StaticJavaCall.java:75)
	at org.basex.query.func.java.JavaCall.value(JavaCall.java:69)
	at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
	at org.basex.query.scope.MainModule.iter(MainModule.java:97)
	at org.basex.query.QueryContext.iter(QueryContext.java:331)
	at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
	at org.basex.core.cmd.AQuery.query(AQuery.java:107)
	at org.basex.core.cmd.XQuery.run(XQuery.java:22)
	at org.basex.core.Command.run(Command.java:257)
	at org.basex.core.Command.execute(Command.java:93)
	at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
	at org.basex.api.client.Session.execute(Session.java:36)
	at org.basex.core.CLI.execute(CLI.java:92)
	at org.basex.BaseX.<init>(BaseX.java:107)
	at org.basex.BaseX.main(BaseX.java:43)
Stopped at C:/Users/CLAUDI~1.ROD/AppData/Local/Temp/3/RtmpI1chq0/file90484b4f4765, 1/87:
[basex:error] java.lang.ArrayIndexOutOfBoundsException: 0
Rows: 0 Columns: 0

The query I'm reading is extracted from the Main_queries.xml file:

   <aQuery>
      <all-regions />
      <costCurveQuery title="policy cost by period">
         <axis1 name="region">Curve</axis1>
         <axis2 name="Year">DataPoint</axis2>
         <xPath buildList="true" dataName="Cost" group="false" sumAll="false">PointSet/DataPoint/y/text()</xPath>
         <comments />
      </costCurveQuery>   
   </aQuery>

This happens regardless of whether the query is empty or not.

Thank you so much,
Clàudia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant