This is due to unavailability of log4j at the runtime. In the given sample
I cannot find any log4j usages. Have you done any modifications for that?
If you want to log something you might need to use sysouts instead of log4j.

Thanks & Regards
Danushka Fernando
Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729

On Mon, Jan 12, 2015 at 9:05 PM, Mahesh Chinthaka <[email protected]> wrote:

> Hi all,
> I was trying MB sample[1] and got following error.
> Anybody knows how to overcome this ?
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/slf4j/LoggerFactory
> at
> org.wso2.andes.jndi.PropertiesFileInitialContextFactory.<init>(PropertiesFileInitialContextFactory.java:60)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> at java.lang.Class.newInstance0(Class.java:372)
> at java.lang.Class.newInstance(Class.java:325)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
> at javax.naming.InitialContext.init(InitialContext.java:242)
> at javax.naming.InitialContext.<init>(InitialContext.java:216)
> at MessageListenerClient.initQueue(MessageListenerClient.java:120)
> at MessageListenerClient.registerSubscribers(MessageListenerClient.java:37)
> at MessageListenerClient.main(MessageListenerClient.java:32)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
> ... 19 more
>
> [1] -
> https://docs.wso2.com/display/MB220/Receiving+Messages+with+JMS+Message+Listener
>
> --
> *Mahesh Chinthaka Vidanagama* | Software Engineer
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
> Email: [email protected] | Web: www.wso2.com
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to