<?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 Custom components tlog4j and tinitlog4j not functioning when deploying to talend runtime container (Talend version 7) (TOS ESB) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Custom-components-tlog4j-and-tinitlog4j-not-functioning-when/m-p/2307276#M144166</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to deploy a job with tlog4j (and tinitlog4j) components - these are custom components from the exchange. When I try locally , the job will function (I see output in the console and in the file configured as logger output in the log4j xml config). If I export as "standalone job", the job also functions correctly. However, when I try to export this job as OSGI and deploy it to a container, the logging appears to be completely disabled - there is no console output and no file output, and no error or anything else in the tesb.log or in the karaf log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone had this problem and knows how to fix it? Any help would be appreciated. Thanks.&lt;BR /&gt;I attach a jpg of my simple test job .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 08:09:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T08:09:20Z</dc:date>
    <item>
      <title>Custom components tlog4j and tinitlog4j not functioning when deploying to talend runtime container (Talend version 7) (TOS ESB)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Custom-components-tlog4j-and-tinitlog4j-not-functioning-when/m-p/2307276#M144166</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to deploy a job with tlog4j (and tinitlog4j) components - these are custom components from the exchange. When I try locally , the job will function (I see output in the console and in the file configured as logger output in the log4j xml config). If I export as "standalone job", the job also functions correctly. However, when I try to export this job as OSGI and deploy it to a container, the logging appears to be completely disabled - there is no console output and no file output, and no error or anything else in the tesb.log or in the karaf log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone had this problem and knows how to fix it? Any help would be appreciated. Thanks.&lt;BR /&gt;I attach a jpg of my simple test job .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:09:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Custom-components-tlog4j-and-tinitlog4j-not-functioning-when/m-p/2307276#M144166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom components tlog4j and tinitlog4j not functioning when deploying to talend runtime container (Talend version 7) (TOS ESB)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Custom-components-tlog4j-and-tinitlog4j-not-functioning-when/m-p/2307277#M144167</link>
      <description>&lt;P&gt;After some experimenting I have found out that there is actually an exception thrown, which was not being logged anywhere. It looks like one of the dependencies can't be found:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Exception in component tRESTRequest_1_In (testservicelog)&lt;BR /&gt;java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/log4j/BasicConfigurator&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at local_project.testservicelog_0_1.testservicelog.tRESTRequest_1_LoopProcess(testservicelog.java:3492)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at local_project.testservicelog_0_1.testservicelog$RestServiceProviderImpl4TalendJob.processRequest(testservicelog.java:480)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at local_project.testservicelog_0_1.testservicelog$RestServiceProviderImpl4TalendJob.abc(testservicelog.java:571)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.reflect.Method.invoke(Unknown Source)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:192)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1182)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1116)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.server.Server.handle(Server.java:534)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.Thread.run(Unknown Source)&lt;BR /&gt;Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/BasicConfigurator&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.courtine.talend.log4j.TalendLog4JConfigurator.configureLog4J(TalendLog4JConfigurator.java:36)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at local_project.testservicelog_0_1.testservicelog.tInitLog4J_1Process(testservicelog.java:1458)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at local_project.testservicelog_0_1.testservicelog.tFixedFlowInput_1Process(testservicelog.java:1308)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at local_project.testservicelog_0_1.testservicelog.tRESTRequest_1_LoopProcess(testservicelog.java:3320)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... 34 more&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried to manually import the needed dependencies in the job but this does not appear to solve the problem. Anyone have any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 14:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Custom-components-tlog4j-and-tinitlog4j-not-functioning-when/m-p/2307277#M144167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-06T14:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Custom components tlog4j and tinitlog4j not functioning when deploying to talend runtime container (Talend version 7) (TOS ESB)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Custom-components-tlog4j-and-tinitlog4j-not-functioning-when/m-p/2307278#M144168</link>
      <description>&lt;P&gt;I have managed to work around this issue in the meantime.&lt;/P&gt; 
&lt;P&gt;It looks like it is not easily possible to use the tlog4j custom components with the Runtime (at least not in the latest versions&amp;nbsp; - 6.x or 7.x). The components rely on using a custom written log4j config and loading this with some methods/classes in the "standalone" log4j library - the karaf container uses pax logging and different implementations to "catch" logging from different frameworks. This means that some parts of the API have noop implementations - in this situation, parts used by these old custom components, namely by the tinitlog4j component.&lt;/P&gt; 
&lt;P&gt;What instead must be done is to modify the config files for the container logging directly ( &amp;lt;runtimefolder&amp;gt;/container/etc/org.ops4j.pax.logging.cfg ) and add any custom loggers and appenders there. Then in the job simply use a tJava type of component where you call log4j.getLogger("yourLoggerName"). One minor inconvenience was that not all messages are displayed to the console in the studio (I think only &amp;gt; Warn levels are displayed) so this made debugging the logging a bit harder but I got around this by writing a small routine which automatically prints every log command also to console.&lt;/P&gt; 
&lt;P&gt;One of the needs I had was to be able to easily have a separate log file per job, which can be achieved by using a "Routing" type appender - this was called "sifting" appender in the older versions of Karaf I believe - and will actually create a separate log file per bundle (in this case,per job).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 13:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Custom-components-tlog4j-and-tinitlog4j-not-functioning-when/m-p/2307278#M144168</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-11T13:34:59Z</dc:date>
    </item>
  </channel>
</rss>

