HI,

I have tried the 1.3.0 and ran into issues, so I am building from the latest source and still has the same issue.

Yogi


On Wed, Jan 23, 2013 at 11:36 AM, Mike Percy <mpercy@apache.org> wrote:
What version of Flume are you using? Are you using Maven for your build?

You should be able to get away with just flume-ng-core.


On Wed, Jan 23, 2013 at 10:02 AM, yogender nerella <ynerella@gmail.com> wrote:
Hi,

I would like to make my app directly write events to an flume agent.

What are the libraries needed to add into my application?

I have tried to add the following three but runs into class not found errors.


log4j.properties are as follows:


log4j.rootLogger=TRACE, flume
log4j.appender.flume = org.apache.flume.clients.log4jappender.Log4jAppender
log4j.appender.flume.Hostname = example.com
log4j.appender.flume.Port = 44444
log4j.appender.flume.layout=org.apache.log4j.TTCCLayout


Error In Initialization

Classpath: C:\\workspace\mongodb\Mongodb\bin;C:\test\log4j-1.2.16.jar;C:\test\flume\flume-ng-core-1.4.0-SNAPSHOT.jar;C:\test\flume\flume-ng-log4jappender-1.4.0-SNAPSHOT.jar;C:\test\flume\flume-ng-sdk-1.4.0-SNAPSHOT.jar
log4j:WARN Error during default initialization
java.lang.NoClassDefFoundError: org/jboss/netty/channel/ChannelFactory
at org.apache.flume.api.RpcClientFactory.getDefaultInstance(RpcClientFactory.java:168)
at org.apache.flume.api.RpcClientFactory.getDefaultInstance(RpcClientFactory.java:128)
at org.apache.flume.clients.log4jappender.Log4jAppender.activateOptions(Log4jAppender.java:195)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:117)
at LogTest.<init>(LogTest.java:7)
at LogTest.main(LogTest.java:11)
Caused by: java.lang.ClassNotFoundException: org.jboss.netty.channel.ChannelFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
log4j:WARN No appenders could be found for logger (LogTest).
log4j:WARN Please initialize the log4j system properly.
     

Appreciate your help,
Yogi