<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>LiferayClient setup fails with NPE in Talend job</title>
  <link rel="self" href="https://liferay.dev/sv/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120693286" />
  <subtitle>LiferayClient setup fails with NPE in Talend job</subtitle>
  <id>https://liferay.dev/sv/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120693286</id>
  <updated>2026-05-11T20:03:38Z</updated>
  <dc:date>2026-05-11T20:03:38Z</dc:date>
  <entry>
    <title>RE: LiferayClient setup fails with NPE in Talend job</title>
    <link rel="alternate" href="https://liferay.dev/sv/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120927694" />
    <author>
      <name>Igor Beslic</name>
    </author>
    <id>https://liferay.dev/sv/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120927694</id>
    <updated>2021-07-08T07:06:25Z</updated>
    <published>2021-07-08T07:06:24Z</published>
    <summary type="html">&lt;p&gt;Hi Gunther, I understand that this reply is extremelly late, but let
  me answer for others that may bump into it.&lt;/p&gt;
&lt;p&gt;The problem you reffer should be already fixed in latest liferay
  talend components code present in master branch. The cause is probably
  inadequat implementation of component that prevents saved
  connectTimeout value to be deserialized before host class - in this
  case tLiferayOutput.&lt;/p&gt;
&lt;p&gt;To save you the troubles of compiling new components code, here are
  two workarounds:&lt;br /&gt; 1. THIS DOES NOT WORK ALWAYS: set REST
  Connection Timeout to 300, Save talend job, set back REST Connection
  Timeout to 30 and save again&lt;/p&gt;
&lt;p&gt;2. This would always work:&lt;/p&gt;
&lt;p&gt;- Put tLiferayConnection component at workspace and configure it with credentials&lt;/p&gt;
&lt;p&gt;- Right click on it and from Context Menu pick On Component Ok and
  link it to any other talend component that starts the flow (see screensot)&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" src="/documents/14/0/Screenshot+2021-07-08+at+08.55.40.png/fd5ad5b2-d919-303c-0319-a49b8a551da4?t=1625727457000&amp;amp;imagePreview=1" /&gt;&lt;/p&gt;
&lt;p&gt;Here is my example where I start flow only after tLiferayConnection
  is initialized. Good thing is that you may re-use connection in all
  other tLiferay components that target same environment as tLiferayConnection&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" src="/documents/14/0/Screenshot+2021-07-08+at+08.55.58+%281%29.png/61443708-8220-96c1-18a5-1a0cdd2e6b14?t=1625727544275&amp;amp;imagePreview=1" /&gt;
  &lt;br /&gt; Do not forget to update connection settings in your
  tLiferayOutput to set Connection Component to use tLiferayConnection
  instead of in-component configuration as you did in your example:&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" src="/documents/14/0/Screenshot+2021-07-08+at+09.01.27+%281%29.png/b59bd968-da87-fbda-420d-ed1486089d33?t=1625727920211&amp;amp;imagePreview=1" /&gt;&lt;/p&gt;
&lt;p&gt;Hope this would help all others with same problem.&lt;br /&gt;  &lt;/p&gt;</summary>
    <dc:creator>Igor Beslic</dc:creator>
    <dc:date>2021-07-08T07:06:24Z</dc:date>
  </entry>
  <entry>
    <title>LiferayClient setup fails with NPE in Talend job</title>
    <link rel="alternate" href="https://liferay.dev/sv/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120693285" />
    <author>
      <name>Gunther Verhemeldonck</name>
    </author>
    <id>https://liferay.dev/sv/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120693285</id>
    <updated>2021-03-24T10:47:48Z</updated>
    <published>2021-03-24T10:46:05Z</published>
    <summary type="html">&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have a Talend Job to synchronize products to a Liferay Commerce 3.x
  instance, which works fine from within TOS.&lt;/p&gt;
&lt;p&gt;When running the Job from Liferay Dispatches, the job fails with a
  NullPointerException when it tries to read the
  &amp;quot;connectTimeout&amp;quot; property of the &lt;strong&gt;tLiferayOutput
  &lt;/strong&gt;component. As you can see below the value is set at 30
  seconds within TOS.&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" src="/documents/14/0/LiferayClient_advancedSettingsTalend.png/79e65a6f-87f0-8654-2c57-29e15e466dc0?t=1616582526298&amp;amp;imagePreview=1" /&gt;&lt;/p&gt;
&lt;p&gt;I'd expect that these value are respected during the build of the Job
  (export to zip), but apparently the value/property cannot be resolved
  at runtime.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Exception in component tLiferayOutput_1 (SyncProducts)
java.lang.NullPointerException
        at com.liferay.talend.properties.connection.LiferayConnectionProperties.getConnectTimeout(LiferayConnectionProperties.java:77)
        at com.liferay.talend.runtime.LiferaySourceOrSink.getLiferayClient(LiferaySourceOrSink.java:107)
        at com.liferay.talend.runtime.LiferaySourceOrSink.initialize(LiferaySourceOrSink.java:214)
        at com.liferay.talend.runtime.LiferaySourceOrSink.initialize(LiferaySourceOrSink.java:57)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Any ideas on how to further troubleshoot this issue?&lt;/p&gt;
&lt;p&gt;Tx&lt;/p&gt;</summary>
    <dc:creator>Gunther Verhemeldonck</dc:creator>
    <dc:date>2021-03-24T10:46:05Z</dc:date>
  </entry>
</feed>
