Thanks simon.i tryyour suggestion and the error is gone.

I use log4j  in my maven style web project,and i meet this exception :
java.lang.NoClassDefFoundError: org/apache/log4j/Level

I solve it after I add this dependency in my  pom.xml:

<dependency>
<groupId>slide</groupId>
<artifactId>log4jlogger</artifactId>
<version>2.0</version>
</dependency>


Thanks again!

在 2009年12月9日星期三UTC+8上午12时28分48秒,Simon写道:
>
> Hello, 
>
> I have run the SendMessage.java , however, I get problems at runtime. 
> Here is the error. How can I solve this? 
>
> ----------------------------------------------------------------------------------------
>  
>
> Example: Send message from a serial gsm modem. 
> SMSLib: A Java API library for sending and receiving SMS via a GSM 
> modem or other supported gateways. 
> This software is distributed under the terms of the Apache v2.0 
> License. 
> Web Site: http://smslib.org 
> Version: 3.4.4 
> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/ 
> log4j/Level 
>         at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223) 
>         at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120) 
>         at 
> org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java: 
> 111) 
>         at 
> org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269) 
>         at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242) 
>         at org.smslib.helper.Logger.<init>(Logger.java:34) 
>         at org.smslib.Service.<init>(Service.java:100) 
>         at examples.modem.SendMessage.doIt(SendMessage.java:27) 
>         at examples.modem.SendMessage.main(SendMessage.java:77) 
>
> ---------------------------------------------------------------------------------------------------
>  
>
>
> Regards, 
> Simon. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib Discussion Group" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/smslib/4ea05a06-87f9-4b87-b3b9-1723dbcfcc12%40googlegroups.com.

Reply via email to