org/slf4j/LoggerFactory is in lib/slf4j-log4j12-1.4.3.jar.
On Tue, Jan 20, 2009 at 3:24 AM, <[email protected]> wrote: > Mit freundlichen Grüßen > > GM-Foto GmbH > Thomas Poth > > IT-Manager > Tel.: 0049-69-238570-0 > Fax: 0049-69-238570-30 > Mail: [email protected] > Web: www.gmfoto.de > > > > > Von: axiez <[email protected]> > An: [email protected] > Datum: 20.01.2009 07:18 > Betreff: Re: java.lang.ClassNotFoundException: > org.apache.activemq.jndi.ActiveMQInitialContextFactory > ________________________________ > > > > I added asm-2.2.3.jar, asm-commons-2.2.3.jar, cglib-nodep-2.1_3.jar, > commons-cli-1.0.jar, geronimo-cli-2.1.3.jar, > geronimo-deploy-jsr88-bootstrapper-2.1.3.jar, > geronimo-jaxws-builder-2.1.3.jar, geronimo-kernel-2.1.3.jar, > geronimo-transformer-2.1.3.jar, jcl104-over-slf4j-1.4.3.jar, > jsr88-deploymentfactory.jar, log4j-1.2.14.jar, > plexus-archiver-1.0-alpha-7.jar, slf4j-api-1.4.3.jar, > slf4j-log4j12-1.4.3.jar, xpp3-1.1.3.4.0.jar and xstream-1.2.2.jar to > classpath. > When I tried to run the program I got the error message: > java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory > > axiez wrote: >> >> I have the following sample code and jndi.properties file: >> import javax.jms.*; >> import javax.naming.InitialContext; >> import java.util.*; >> import java.io.*; >> public class LogClient { >> public static void main(String[] args) throws Exception { >> Properties p = new Properties(); >> p.load(new FileInputStream("jndi.properties")); >> p.put("openejb.authentication.realmName","geronimo-admin"); >> InitialContext ctx = new InitialContext(p); >> TopicConnectionFactory factory = (TopicConnectionFactory) >> ctx.lookup("java:comp/env/jms/DefaultActiveMQConnectionFactory"); >> TopicConnection connection = factory.createTopicConnection(); >> TopicSession session = connection.createTopicSession(false, >> Session.AUTO_ACKNOWLEDGE); >> Topic topic = (Topic)ctx.lookup("java:comp/env/jms/Topic"); >> TopicPublisher publisher = session.createPublisher(topic); >> TextMessage msg = session.createTextMessage(); >> msg.setText("This is a test message"); >> publisher.send(msg); >> publisher.close(); >> System.out.println("Message published. Please check application >> server's console to see the response from MDB"); >> } >> } >> >> jndi.properties file: >> >> java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory >> java.naming.provider.url=tcp://localhost:61616 >> java.naming.security.principal=system >> java.naming.security.credentials=manager >> >> I ran the program after successful compilation. Error message is: >> Exception in thread "main" javax.naming.NoInitialContextException: Cannot >> instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory >> [Root exception is java.lang.ClassNotFoundException: >> org.apache.activemq.jndi.ActiveMQInitialContextFactory] >> >> > > -- > View this message in context: > http://www.nabble.com/java.lang.ClassNotFoundException%3A-org.apache.activemq.jndi.ActiveMQInitialContextFactory-tp21537474s134p21557734.html > Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. > > > > > > -------------------------------------------------------------------------------------------------------------- > GM-Foto GmbH, Taunusstraße 47, D-60329 Frankfurt am Main > Telefon: +49 69 238570-0, Telefax: +49 69 238570-30 > Eingetragen beim Amtsgericht Frankfurt am Main: HRB 19494 > Geschäftsführer: Walter Adler und Harald Remsperger > > Öffnungszeiten: Montag - Freitag, 9:00 - 18:30 Uhr > > Internet: http://www.gmfoto.de , E-Mail: [email protected] > --------------------------------------------------------------------------------------------------------------
