Try:

import org.apache.log4j.*;

instead of:

import org.apache.log4j;

Better yet, just import the Logger class specifically.  You don't need the whole
package.

Now, if the bad import line was just a typo on your part (which now that I think
about it, it probably is - otherwise you wouldn't be able to compile), double
check that there is a a log4j.jar in $JBOSS_HOME/server/default/lib/.

David



Mensaje citado por costin <[EMAIL PROTECTED]>:

> Okay, great; than why  :
> 
>       import org.apache.log4j;
> 
> doesn`t work?
> 
> As least that`s the log4j import statement AFAIK.
> 
> DW> Log4J comes with JBoss, and you have *no need* to include it in *any* of
> your
> DW> application units.  Ready to use, out of the box - no messing with
> classpath! 
> DW> Why would you want log4j available *only* to one app?  IMHO a logging
> service is
> DW> a nice thing for an app server to provide to all deployed applications,
> and
> DW> Log4J's the way to go...
> 
> DW> David
> 
> 
> 
> DW> Mensaje citado por costin <[EMAIL PROTECTED]>:
> 
> >>   Hi!
> >> 
> >>   I have a very little and common question about a problem I can`t get
> >>   solved. I have the following directories:
> >> 
> >> [EMAIL PROTECTED] my]$ tree ./
> >> ./
> >> |-- META-INF
> >> |   `-- application.xml
> >> |-- ejb.jar
> >> |   |-- META-INF
> >> |   |   |-- ejb-jar.xml
> >> |   |   |-- jboss.xml
> >> |   |   `-- jbosscmp-jdbc.xml
> >> |   `-- app
> >> |       |-- ejb
> >> |       |   `-- *.class
> >> |       `-- interfaces
> >> |           `-- *.class
> >> |-- lib
> >> |   `-- log4j-1.2.7.jar
> >> `-- web.war
> >>     |-- WEB-INF
> >>     |   |-- classes
> >>     |   |   `-- log4j-1.2.7.jar -> ../../../lib/log4j-1.2.7.jar
> >>     |   |-- lib
> >>     |   |   `-- log4j-1.2.7.jar -> ../../../lib/log4j-1.2.7.jar
> >>     |   `-- web.xml
> >>     `-- a.jsp
> >> 
> >>     In a.jsp I`m doing a simple import org.apache.log4j;
> >> 
> >>     Unfortunatelly this gives me an error as the file cannot be find.
> >> I`ve put even links to the jar in the appropriate directories (as you
> >> can see) but at no effect.
> >> 
> >> What I am doing wrong? I want to make the log4j available to my
> >> application in the jar form without adding it to the class-path(i.e.
> >> available only to this ear).
> >> 
> >> 
> >> --
> >> Thanks,
> >>  costin          
> >> 
> >> 
> >> 
> >> -------------------------------------------------------
> >> This SF.net email is sponsored by:
> >> The Definitive IT and Networking Event. Be There!
> >> NetWorld+Interop Las Vegas 2003 -- Register today!
> >> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
> >> _______________________________________________
> >> JBoss-user mailing list
> >> [EMAIL PROTECTED]
> >> https://lists.sourceforge.net/lists/listinfo/jboss-user
> >> 
> 
> 
> DW> ---------------------
> DW> David Ward
> DW> [EMAIL PROTECTED]
> DW> http://www.dotech.com
> 
> 
> DW> -------------------------------------------------------
> DW> This SF.net email is sponsored by:
> DW> The Definitive IT and Networking Event. Be There!
> DW> NetWorld+Interop Las Vegas 2003 -- Register today!
> DW> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
> DW> _______________________________________________
> DW> JBoss-user mailing list
> DW> [EMAIL PROTECTED]
> DW> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> -- 
>  costin                            mailto:[EMAIL PROTECTED]
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:
> The Definitive IT and Networking Event. Be There!
> NetWorld+Interop Las Vegas 2003 -- Register today!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 


---------------------
David Ward
[EMAIL PROTECTED]
http://www.dotech.com


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to