{"id":4295,"date":"2014-03-30T09:44:16","date_gmt":"2014-03-30T09:44:16","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/integrating-scala-app-with-newrelic-java-agent-collection-of-common-programming-errors\/"},"modified":"2014-03-30T09:44:16","modified_gmt":"2014-03-30T09:44:16","slug":"integrating-scala-app-with-newrelic-java-agent-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/integrating-scala-app-with-newrelic-java-agent-collection-of-common-programming-errors\/","title":{"rendered":"Integrating Scala app with NewRelic Java Agent-Collection of common programming errors"},"content":{"rendered":"<p>I want to integrate a Scala app (<strong>Kestrel<\/strong>, http:\/\/robey.github.com\/kestrel) with NewRelic using java agant but failed with error<\/p>\n<pre><code>sh scripts\/devel.sh \nStarting kestrel in development mode... \nMar 28, 2013 18:15:15 +0800 NewRelic 1 INFO: Agent is using Logback \nMar 28, 2013 18:15:15 +0800 NewRelic 1 INFO: Loading configuration file \"\/tmp\/newrelic.yml\" \nMar 28, 2013 6:15:24 PM java.util.logging.LogManager$RootLogger log \nFATAL: Error in config file: %s com.twitter.util.Eval$CompilerException: Compiler exception error: line 1: object twitter is not a member of package com\n\nimport com.twitter.conversions.storage._ \n^ at com.twitter.util.Eval$StringCompiler.apply(Eval.scala:533) \nat com.twitter.util.Eval$StringCompiler$$anonfun$apply$3.apply(Eval.scala:544) \nat com.twitter.util.Eval$StringCompiler$$anonfun$apply$3.apply(Eval.scala:543) \nat scala.Option.getOrElse(Option.scala:108) \nat com.twitter.util.Eval$StringCompiler.apply(Eval.scala:543) \nat com.twitter.util.Eval.applyProcessed(Eval.scala:196) at com.twitter.util.Eval.apply(Eval.scala:167) at com.twitter.ostrich.admin.RuntimeEnvironment.loadConfig(RuntimeEnvironment.scala:230) \nat com.twitter.ostrich.admin.RuntimeEnvironment.loadRuntimeConfig(RuntimeEnvironment.scala:256) \nat net.lag.kestrel.Kestrel$.main(Kestrel.scala:307) at net.lag.kestrel.Kestrel.main(Kestrel.scala)\n\nMar 28, 2013 6:15:24 PM java.util.logging.LogManager$RootLogger log \nFATAL: error: line 1: object twitter is not a member of package com \nimport com.twitter.conversions.storage._\n<\/code><\/pre>\n<p><strong>Steps to reproduce:<\/strong><\/p>\n<ul>\n<li>Download http:\/\/robey.github.com\/kestrel\/download\/kestrel-2.4.1.zip<\/li>\n<li>Put newrelic.jar &amp; newrelic.yml (with config) inside another folder, e.g. \/tmp\/newrelic<\/li>\n<li>\n<p>Edit the scripts\/devel.sh, Add the javaagent flags<\/p>\n<p>java -server -Xmx1024m -Dstage=development -Dnewrelic.config.file=\/tmp\/newrelic\/newrelic.yml -javaagent:\/tmp\/newrelic\/newrelic.jar -jar &#8220;$ROOT_DIR&#8221;\/kestrel_2.9.2-2.4.1.jar 4. Run scripts\/devel.sh and you will see the above error.<\/p>\n<\/li>\n<\/ul>\n<p>Any idea? Actually I have fire a ticket to NewRelic but got no answer from them for a whole month, I hope the community and @lewis-cirne (NewRelic CEO) can shield some light on this<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I want to integrate a Scala app (Kestrel, http:\/\/robey.github.com\/kestrel) with NewRelic using java agant but failed with error sh scripts\/devel.sh Starting kestrel in development mode&#8230; Mar 28, 2013 18:15:15 +0800 NewRelic 1 INFO: Agent is using Logback Mar 28, 2013 18:15:15 +0800 NewRelic 1 INFO: Loading configuration file &#8220;\/tmp\/newrelic.yml&#8221; Mar 28, 2013 6:15:24 PM java.util.logging.LogManager$RootLogger [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4295","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4295"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4295\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}