<?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 Re: Why am I getting &amp;quot;java.lang.NoSuchFieldError: DEFAULT&amp;quot; using splunk-library-javalogging to enable logging to HTTP Event Collector? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214712#M153</link>
    <description>&lt;P&gt;You're very welcome @lhsihan &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2016 01:13:23 GMT</pubDate>
    <dc:creator>ppablo</dc:creator>
    <dc:date>2016-02-24T01:13:23Z</dc:date>
    <item>
      <title>Why am I getting "java.lang.NoSuchFieldError: DEFAULT" using splunk-library-javalogging to enable logging to HTTP Event Collector?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214709#M150</link>
      <description>&lt;P&gt;I am trying to enable logging to HTTP Event Collector in the Java project with java.util.logging.&lt;BR /&gt;
The code is very simple:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;import java.util.logging.;
import com.splunk.logging.;
......................
Logger logger = Logger.getLogger("splunkLogger");
logger.info("This is a test event for Logback test");
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the property file (config/jdklogging.properties) is like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunkLogger.level = INFO
splunkLogger.handlers = com.splunk.logging.HttpEventCollectorLoggingHandler
com.splunk.logging.HttpEventCollectorLoggingHandler.url = &lt;A href="https://192.168.99.100:8088/services/collector" target="test_blank"&gt;https://192.168.99.100:8088/services/collector&lt;/A&gt;
com.splunk.logging.HttpEventCollectorLoggingHandler.level = INFO
com.splunk.logging.HttpEventCollectorLoggingHandler.token = 00E4854F-53D4-4A1E-934C-EF5945DF790D
com.splunk.logging.HttpEventCollectorLoggingHandler.disableCertificateValidation=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I run the java code with &lt;CODE&gt;-Djava.util.logging.config.file=config/jdklogging.properties&lt;/CODE&gt;, the error popped up:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Exception in thread "Timer-0" java.lang.NoSuchFieldError: DEFAULT
at org.apache.http.impl.nio.client.HttpAsyncClientBuilder.build(HttpAsyncClientBuilder.java:603)
at com.splunk.logging.HttpEventCollectorSender.startHttpClient(HttpEventCollectorSender.java:234)
at com.splunk.logging.HttpEventCollectorSender.postEvents(HttpEventCollectorSender.java:277)
at com.splunk.logging.HttpEventCollectorMiddleware.postEvents(HttpEventCollectorMiddleware.java:86)
at com.splunk.logging.HttpEventCollectorSender.postEventsAsync(HttpEventCollectorSender.java:256)
at com.splunk.logging.HttpEventCollectorSender.flush(HttpEventCollectorSender.java:152)
at com.splunk.logging.HttpEventCollectorSender.run(HttpEventCollectorSender.java:175)
at java.util.TimerThread.mainLoop(Unknown Source)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS:&lt;BR /&gt;
I could send the log to splunk http event collector by the following commands:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -H "Authorization: Splunk 00E4854F-53D4-4A1E-934C-EF5945DF790D" https
://xxx.xxx.xx.xxx:8088/services/collector/event -d '{"event":"test splunk"}'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Could you please give me help on this? Thank you very much!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 09:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214709#M150</guid>
      <dc:creator>lhsihan</dc:creator>
      <dc:date>2016-02-22T09:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "java.lang.NoSuchFieldError: DEFAULT" using splunk-library-javalogging to enable logging to HTTP Event Collector?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214710#M151</link>
      <description>&lt;P&gt;Thank you very much for helping me format my content!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 00:59:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214710#M151</guid>
      <dc:creator>lhsihan</dc:creator>
      <dc:date>2016-02-23T00:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "java.lang.NoSuchFieldError: DEFAULT" using splunk-library-javalogging to enable logging to HTTP Event Collector?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214711#M152</link>
      <description>&lt;P&gt;Fixed the problem by updating the dependency jar files.  Thanks everyone.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 00:46:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214711#M152</guid>
      <dc:creator>lhsihan</dc:creator>
      <dc:date>2016-02-24T00:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "java.lang.NoSuchFieldError: DEFAULT" using splunk-library-javalogging to enable logging to HTTP Event Collector?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214712#M153</link>
      <description>&lt;P&gt;You're very welcome @lhsihan &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 01:13:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214712#M153</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-02-24T01:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "java.lang.NoSuchFieldError: DEFAULT" using splunk-library-javalogging to enable logging to HTTP Event Collector?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214713#M154</link>
      <description>&lt;P&gt;I am also facing similar issue, Can you please let me know which  dependency jar you updated to fix this issue?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 15:17:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-am-I-getting-quot-java-lang-NoSuchFieldError-DEFAULT-quot/m-p/214713#M154</guid>
      <dc:creator>saurabh009</dc:creator>
      <dc:date>2017-04-10T15:17:11Z</dc:date>
    </item>
  </channel>
</rss>

