Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TDM & GetMapProperty returning object rather than string....

Hi,

 

I am trying to use a simple Java function to parse a string to an integer for a FixedLoop in TDM, however when doing so an error is thrown,posting only last bit of the stack trace below.

 

GetMapProperty is supposed to return a string, however based on the below, is this correct? How can i get this to work? I have attached a screenshot of my map also.

 

Thanks

 

: Error - The transformation code (XQuery/XSLT) failed to compile. (201)
Exception: net.sf.saxon.trans.XPathException: Required item type of first argument of java_lang_Integer0683p000009MAB6.pngarseInt() is xs:string; supplied value has item type java:java.lang.Object
at net.sf.saxon.expr.TypeChecker.staticTypeCheck(TypeChecker.java:303)
at net.sf.saxon.functions.ExtensionFunctionCall.typeCheck(ExtensionFunctionCall.java:113)
at net.sf.saxon.expr.ExpressionVisitor.typeCheck(ExpressionVisitor.java:181)
at net.sf.saxon.expr.LetExpression.typeCheck(LetExpression.java:96)
at net.sf.saxon.expr.ExpressionVisitor.typeCheck(ExpressionVisitor.java:181)
at net.sf.saxon.expr.RangeExpression.typeCheck(RangeExpression.java:39)
at net.sf.saxon.expr.ExpressionVisitor.typeCheck(ExpressionVisitor.java:181)
at net.sf.saxon.expr.ForExpression.typeCheck(ForExpression.java:96)
at net.sf.saxon.expr.ExpressionVisitor.typeCheck(ExpressionVisitor.java:181)
at net.sf.saxon.query.XQueryFunction.compile(XQueryFunction.java:365)
at net.sf.saxon.query.XQueryFunctionLibrary.fixupGlobalFunctions(XQueryFunctionLibrary.java:198)
at net.sf.saxon.query.QueryModule.fixupGlobalFunctions(QueryModule.java:1033)
at net.sf.saxon.instruct.Executable.fixupQueryModules(Executable.java:625)
at net.sf.saxon.query.QueryParser.makeXQueryExpression(QueryParser.java:107)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:343)
at com.oaklandsw.transform.runtime.xquery.saxon9.Saxon9AdaptorImpl.compile(Saxon9AdaptorImpl.java:395)
at com.oaklandsw.transform.runtime.xquery.XQueryAdaptorImpl.compile(XQueryAdaptorImpl.java:66)
at com.oaklandsw.transform.runtime.xquery.XQueryAdaptorImpl.compile(XQueryAdaptorImpl.java:93)
at com.oaklandsw.transform.runtime.StandardMapRuntimeImpl.compile(StandardMapRuntimeImpl.java:162)
at com.oaklandsw.transform.runtime.StandardMapRuntimeImpl.runSubclass(StandardMapRuntimeImpl.java:232)
at com.oaklandsw.transform.runtime.MapRuntimeImpl$1.run(MapRuntimeImpl.java:402)
at com.oaklandsw.transform.runtime.RuntimeEngineImpl.runSansEditor(RuntimeEngineImpl.java:1149)
at com.oaklandsw.transform.runtime.MapRuntimeImpl.runMap(MapRuntimeImpl.java:393)
at com.oaklandsw.transform.runtime.MapOrStructRuntimeImpl.run(MapOrStructRuntimeImpl.java:805)
at mdm_transformation_update.jo_tdm_sap_idoc_test_0_1.jo_TDM_SAP_IDoc_Test.tFileInputXML_1Process(jo_TDM_SAP_IDoc_Test.java:2329)
at mdm_transformation_update.jo_tdm_sap_idoc_test_0_1.jo_TDM_SAP_IDoc_Test.runJobInTOS(jo_TDM_SAP_IDoc_Test.java:2908)
at mdm_transformation_update.jo_tdm_sap_idoc_test_0_1.jo_TDM_SAP_IDoc_Test.main(jo_TDM_SAP_IDoc_Test.java:2726)


at mdm_transformation_update.jo_tdm_sap_idoc_test_0_1.jo_TDM_SAP_IDoc_Test.tFileInputXML_1Process(jo_TDM_SAP_IDoc_Test.java:2338)
at mdm_transformation_update.jo_tdm_sap_idoc_test_0_1.jo_TDM_SAP_IDoc_Test.runJobInTOS(jo_TDM_SAP_IDoc_Test.java:2908)
at mdm_transformation_update.jo_tdm_sap_idoc_test_0_1.jo_TDM_SAP_IDoc_Test.main(jo_TDM_SAP_IDoc_Test.java:2726)

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

Could you try with this syntax ?

 

Eric0683p000009Lxej.png

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi,

 

Could you try with this syntax ?

 

Eric0683p000009Lxej.png

Anonymous
Not applicable
Author

That is the syntax I am using:

 

0683p000009LxRK.jpg

Anonymous
Not applicable
Author

No, remove your java call.

 

Eric

Anonymous
Not applicable
Author

Actually, sorry I am not using the same syntax 0683p000009MACn.png - I have just tested your suggestion (without the Java function) and I am not getting an error in the map anymore! Looks like the value is being cast automatically.

 

Cheers