<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Integer Context Variable causing generate error in tMongoDBConnection in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Integer-Context-Variable-causing-generate-error-in/m-p/2324720#M94391</link>
    <description>Hello, 
&lt;BR /&gt;I am using an integer context variable to specify the connect port to a MongoDB database, which is different for DEV and PROD and other environments. This is in the tMongoDBConnection 
&lt;BR /&gt;However, whenever I define the context variable for PORT in the component section, I get a generate failed message like below: 
&lt;BR /&gt;Execution failed : Failed to generate code. 
&lt;BR /&gt;[org.eclipse.emf.codegen.jet.JETException: InvocationTargetException in .... 
&lt;BR /&gt;The following is captured in the logs... 
&lt;BR /&gt;Caused by: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException 
&lt;BR /&gt; at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:475) 
&lt;BR /&gt; at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:447) 
&lt;BR /&gt; at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:438) 
&lt;BR /&gt; at org.talend.designer.codegen.proxy.JetProxy.generate(JetProxy.java:54) 
&lt;BR /&gt; at org.talend.designer.codegen.CodeGenerator.generateComponentCode(CodeGenerator.java:928) 
&lt;BR /&gt; ... 44 more 
&lt;BR /&gt;Caused by: java.lang.reflect.InvocationTargetException 
&lt;BR /&gt; at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) 
&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
&lt;BR /&gt; at java.lang.reflect.Method.invoke(Unknown Source) 
&lt;BR /&gt; at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:467) 
&lt;BR /&gt; ... 48 more 
&lt;BR /&gt;Caused by: java.lang.NumberFormatException: For input string: "context.target_port" 
&lt;BR /&gt; at java.lang.NumberFormatException.forInputString(Unknown Source) 
&lt;BR /&gt; at java.lang.Integer.parseInt(Unknown Source) 
&lt;BR /&gt; at java.lang.Integer.&amp;lt;init&amp;gt;(Unknown Source) 
&lt;BR /&gt; at org.talend.designer.codegen.translators.nosql.mongodb.TMongoDBConnectionBeginJava.generate(TMongoDBConnectionBeginJava.java:62) 
&lt;BR /&gt;I entered a numeric value in the Port field of the connection so I can get the code generated. Here is the image from the code. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEnD.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139788i279A8535F83236AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEnD.jpg" alt="0683p000009MEnD.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEnI.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156340i459F91E64D661613/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEnI.jpg" alt="0683p000009MEnI.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEYF.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135217iA47D1C4D4ADF5572/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEYF.jpg" alt="0683p000009MEYF.jpg" /&gt;&lt;/span&gt;</description>
    <pubDate>Sat, 13 Jul 2013 13:34:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-13T13:34:26Z</dc:date>
    <item>
      <title>Integer Context Variable causing generate error in tMongoDBConnection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Integer-Context-Variable-causing-generate-error-in/m-p/2324720#M94391</link>
      <description>Hello, 
&lt;BR /&gt;I am using an integer context variable to specify the connect port to a MongoDB database, which is different for DEV and PROD and other environments. This is in the tMongoDBConnection 
&lt;BR /&gt;However, whenever I define the context variable for PORT in the component section, I get a generate failed message like below: 
&lt;BR /&gt;Execution failed : Failed to generate code. 
&lt;BR /&gt;[org.eclipse.emf.codegen.jet.JETException: InvocationTargetException in .... 
&lt;BR /&gt;The following is captured in the logs... 
&lt;BR /&gt;Caused by: org.eclipse.emf.codegen.jet.JETException: InvocationTargetException 
&lt;BR /&gt; at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:475) 
&lt;BR /&gt; at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:447) 
&lt;BR /&gt; at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:438) 
&lt;BR /&gt; at org.talend.designer.codegen.proxy.JetProxy.generate(JetProxy.java:54) 
&lt;BR /&gt; at org.talend.designer.codegen.CodeGenerator.generateComponentCode(CodeGenerator.java:928) 
&lt;BR /&gt; ... 44 more 
&lt;BR /&gt;Caused by: java.lang.reflect.InvocationTargetException 
&lt;BR /&gt; at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) 
&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
&lt;BR /&gt; at java.lang.reflect.Method.invoke(Unknown Source) 
&lt;BR /&gt; at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:467) 
&lt;BR /&gt; ... 48 more 
&lt;BR /&gt;Caused by: java.lang.NumberFormatException: For input string: "context.target_port" 
&lt;BR /&gt; at java.lang.NumberFormatException.forInputString(Unknown Source) 
&lt;BR /&gt; at java.lang.Integer.parseInt(Unknown Source) 
&lt;BR /&gt; at java.lang.Integer.&amp;lt;init&amp;gt;(Unknown Source) 
&lt;BR /&gt; at org.talend.designer.codegen.translators.nosql.mongodb.TMongoDBConnectionBeginJava.generate(TMongoDBConnectionBeginJava.java:62) 
&lt;BR /&gt;I entered a numeric value in the Port field of the connection so I can get the code generated. Here is the image from the code. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEnD.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139788i279A8535F83236AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEnD.jpg" alt="0683p000009MEnD.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEnI.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156340i459F91E64D661613/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEnI.jpg" alt="0683p000009MEnI.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEYF.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135217iA47D1C4D4ADF5572/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEYF.jpg" alt="0683p000009MEYF.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Sat, 13 Jul 2013 13:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Integer-Context-Variable-causing-generate-error-in/m-p/2324720#M94391</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-13T13:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Integer Context Variable causing generate error in tMongoDBConnection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Integer-Context-Variable-causing-generate-error-in/m-p/2324721#M94392</link>
      <description>Have you tried defining it as a String rather than an int?</description>
      <pubDate>Sun, 14 Jul 2013 07:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Integer-Context-Variable-causing-generate-error-in/m-p/2324721#M94392</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-14T07:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Integer Context Variable causing generate error in tMongoDBConnection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Integer-Context-Variable-causing-generate-error-in/m-p/2324722#M94393</link>
      <description>Yes, I had tried defining the variable as a string as well but getting the same issue.
&lt;BR /&gt;Note that the port number expects a numeric value.</description>
      <pubDate>Mon, 15 Jul 2013 04:04:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Integer-Context-Variable-causing-generate-error-in/m-p/2324722#M94393</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-15T04:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Integer Context Variable causing generate error in tMongoDBConnection</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Integer-Context-Variable-causing-generate-error-in/m-p/2324723#M94394</link>
      <description>Hi, &lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Execution failed : Failed to generate code.&lt;BR /&gt;[org.eclipse.emf.codegen.jet.JETException: InvocationTargetException in ....&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Could you use other talend version to see if this issue repro? Or restart your studio..&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Mon, 15 Jul 2013 04:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Integer-Context-Variable-causing-generate-error-in/m-p/2324723#M94394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-15T04:45:55Z</dc:date>
    </item>
  </channel>
</rss>

