You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by vpl <vp...@gmail.com> on 2007/09/24 12:00:05 UTC

axis2.log missing

Hi,

I've browsed the axis user mailing list and could not find a clear answer to
this new-comer ... question. Please help
I'm unsing the axis2.war deployed into a tomcat 6.0.14. In the catalina.out
I see a log4j INFO when my Web-service is deployed.
But I added on the server side some log4j code to trace my web-service
activity.
When I start my rpc.client I get the log4j WARM "No appender could be found
.....".
log4j file is never created, nowhere.
I've also tried to insert a log4j.properties into the .aar generated by my
ant when I compile my web-serivce (into the class root directory).
NOTHING ....

Something wrong.
Could somebody help me ?

Thanks


===================================================================
public class IcProvider {
	private static org.apache.log4j.Logger log =
Logger.getLogger(IcProvider.class);
	public User logon(String userVal) {
    	if (userVal.equals("vpl")) {
    		log.info("user vpl logged");
        	return new User("vpl");    		
    	}
    	else 
    		return null;
    }
    
}


# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=INFO, CONSOLE
#log4j.rootCategory=INFO, CONSOLE, LOGFILE

# Set the enterprise logger priority to FATAL
log4j.logger.org.apache.axis2.enterprise=FATAL
log4j.logger.de.hunsicker.jalopy.io=FATAL
log4j.logger.httpclient.wire.header=FATAL
log4j.logger.org.apache.commons.httpclient=FATAL

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=axis2.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

-- 
View this message in context: http://www.nabble.com/axis2.log-missing-tf4508178.html#a12856946
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: axis2.log missing

Posted by Rick Isaacs <re...@gmail.com>.
Hi,

I had the same problem for the client as I wanted the log on the client
side.

I got logging to work in the /Userguide samples.

I put the following files in the \build dir

C:\apache-
tomcat-5.5.25\webapps\axis2\WEB-INF\samples\userguide\build\commons-logging.propertiesC:\apache-
tomcat-5.5.25\webapps\axis2\WEB-INF\samples\userguide\build\log4j.properties

and added the \build to the classpath in the build.xml

<project name="userguide" default="generate.service"> <property
name="mainDir"
      value="../.."/>
      <property name="classes.dir" value="build/classes"/>
      <path
          id="axis.classpath"> <fileset dir="../../lib">
          <include name="*.jar"/>
           </fileset> <pathelement location="build/userguide.jar"/>

           <pathelement location="build"/>

       </path>

The files need to be class path, then the client will not display the WARN:
No appender could be

If you do a clean, the build dir will be deleted.

Hope this works.

Rick

On Nov 23, 2007 3:58 PM, aquaglia <an...@socomit.it> wrote:

>
> Ensure you have copied log4j.jar under axis2\WEB-INF\lib
>
>
> vpl wrote:
> >
> > Hi,
> >
> > I've browsed the axis user mailing list and could not find a clear
> answer
> > to this new-comer ... question. Please help
> > I'm unsing the axis2.war deployed into a tomcat 6.0.14. In the
> > catalina.out I see a log4j INFO when my Web-service is deployed.
> > But I added on the server side some log4j code to trace my web-service
> > activity.
> > When I start my rpc.client I get the log4j WARM "No appender could be
> > found .....".
> > log4j file is never created, nowhere.
> > I've also tried to insert a log4j.properties into the .aar generated by
> my
> > ant when I compile my web-serivce (into the class root directory).
> > NOTHING ....
> >
> > Something wrong.
> > Could somebody help me ?
> >
> > Thanks
> >
> >
> > ===================================================================
> > public class IcProvider {
> >       private static org.apache.log4j.Logger log =
> > Logger.getLogger(IcProvider.class);
> >       public User logon(String userVal) {
> >       if (userVal.equals("vpl")) {
> >               log.info("user vpl logged");
> >               return new User("vpl");
> >       }
> >       else
> >               return null;
> >     }
> >
> > }
> >
> >
> > # Set root category priority to INFO and its only appender to CONSOLE.
> > log4j.rootCategory=INFO, CONSOLE
> > #log4j.rootCategory=INFO, CONSOLE, LOGFILE
> >
> > # Set the enterprise logger priority to FATAL
> > log4j.logger.org.apache.axis2.enterprise=FATAL
> > log4j.logger.de.hunsicker.jalopy.io=FATAL
> > log4j.logger.httpclient.wire.header=FATAL
> > log4j.logger.org.apache.commons.httpclient=FATAL
> >
> > # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
> > log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
> > log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
> > log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
> >
> > # LOGFILE is set to be a File appender using a PatternLayout.
> > log4j.appender.LOGFILE=org.apache.log4j.FileAppender
> > log4j.appender.LOGFILE.File=axis2.log
> > log4j.appender.LOGFILE.Append=true
> > log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
> > log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x -
> %m%n
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/axis2.log-missing-tf4508178.html#a13913667
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: axis2.log missing

Posted by aquaglia <an...@socomit.it>.
Ensure you have copied log4j.jar under axis2\WEB-INF\lib


vpl wrote:
> 
> Hi,
> 
> I've browsed the axis user mailing list and could not find a clear answer
> to this new-comer ... question. Please help
> I'm unsing the axis2.war deployed into a tomcat 6.0.14. In the
> catalina.out I see a log4j INFO when my Web-service is deployed.
> But I added on the server side some log4j code to trace my web-service
> activity.
> When I start my rpc.client I get the log4j WARM "No appender could be
> found .....".
> log4j file is never created, nowhere.
> I've also tried to insert a log4j.properties into the .aar generated by my
> ant when I compile my web-serivce (into the class root directory).
> NOTHING ....
> 
> Something wrong.
> Could somebody help me ?
> 
> Thanks
> 
> 
> ===================================================================
> public class IcProvider {
> 	private static org.apache.log4j.Logger log =
> Logger.getLogger(IcProvider.class);
> 	public User logon(String userVal) {
>     	if (userVal.equals("vpl")) {
>     		log.info("user vpl logged");
>         	return new User("vpl");    		
>     	}
>     	else 
>     		return null;
>     }
>     
> }
> 
> 
> # Set root category priority to INFO and its only appender to CONSOLE.
> log4j.rootCategory=INFO, CONSOLE
> #log4j.rootCategory=INFO, CONSOLE, LOGFILE
> 
> # Set the enterprise logger priority to FATAL
> log4j.logger.org.apache.axis2.enterprise=FATAL
> log4j.logger.de.hunsicker.jalopy.io=FATAL
> log4j.logger.httpclient.wire.header=FATAL
> log4j.logger.org.apache.commons.httpclient=FATAL
> 
> # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
> log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
> log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
> log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
> 
> # LOGFILE is set to be a File appender using a PatternLayout.
> log4j.appender.LOGFILE=org.apache.log4j.FileAppender
> log4j.appender.LOGFILE.File=axis2.log
> log4j.appender.LOGFILE.Append=true
> log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
> log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
> 
> 

-- 
View this message in context: http://www.nabble.com/axis2.log-missing-tf4508178.html#a13913667
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: axis2.log missing

Posted by Jochen Rieß <jo...@uni-dortmund.de>.
Hi there,

I've faced a similar problem. I figured out that due to the fact that 
axis itself uses log4j the common & easy way of putting a 
log4j.properties inside the deployed webservice does not work. You have 
to configure the logging for your classes manually, i.e. telling your 
webservice where to look for log4j configuration or doing it 'by hand'

        Properties loggerproperties = new Properties();
        loggerproperties.put("log4j.logger.yourclass, "DEBUG, appender");
[...]
        PropertyConfigurator.configure(loggerproperties);

Srinath Perera schrieb:
> did you try putting it in the classes directory of the Axis2 war ?
>
> On 9/24/07, vpl <vp...@gmail.com> wrote:
>   
>> Hi,
>>
>> I've browsed the axis user mailing list and could not find a clear answer to
>> this new-comer ... question. Please help
>> I'm unsing the axis2.war deployed into a tomcat 6.0.14. In the catalina.out
>> I see a log4j INFO when my Web-service is deployed.
>> But I added on the server side some log4j code to trace my web-service
>> activity.
>> When I start my rpc.client I get the log4j WARM "No appender could be found
>> .....".
>> log4j file is never created, nowhere.
>> I've also tried to insert a log4j.properties into the .aar generated by my
>> ant when I compile my web-serivce (into the class root directory).
>> NOTHING ....
>>
>> Something wrong.
>> Could somebody help me ?
>>
>> Thanks
>>
>>
>> ===================================================================
>> public class IcProvider {
>>         private static org.apache.log4j.Logger log =
>> Logger.getLogger(IcProvider.class);
>>         public User logon(String userVal) {
>>         if (userVal.equals("vpl")) {
>>                 log.info("user vpl logged");
>>                 return new User("vpl");
>>         }
>>         else
>>                 return null;
>>     }
>>
>> }
>>
>>
>> # Set root category priority to INFO and its only appender to CONSOLE.
>> log4j.rootCategory=INFO, CONSOLE
>> #log4j.rootCategory=INFO, CONSOLE, LOGFILE
>>
>> # Set the enterprise logger priority to FATAL
>> log4j.logger.org.apache.axis2.enterprise=FATAL
>> log4j.logger.de.hunsicker.jalopy.io=FATAL
>> log4j.logger.httpclient.wire.header=FATAL
>> log4j.logger.org.apache.commons.httpclient=FATAL
>>
>> # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
>> log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
>> log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
>> log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
>>
>> # LOGFILE is set to be a File appender using a PatternLayout.
>> log4j.appender.LOGFILE=org.apache.log4j.FileAppender
>> log4j.appender.LOGFILE.File=axis2.log
>> log4j.appender.LOGFILE.Append=true
>> log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
>> log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
>>
>> --
>> View this message in context: http://www.nabble.com/axis2.log-missing-tf4508178.html#a12856946
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>     
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: axis2.log missing

Posted by Srinath Perera <he...@gmail.com>.
did you try putting it in the classes directory of the Axis2 war ?

On 9/24/07, vpl <vp...@gmail.com> wrote:
>
> Hi,
>
> I've browsed the axis user mailing list and could not find a clear answer to
> this new-comer ... question. Please help
> I'm unsing the axis2.war deployed into a tomcat 6.0.14. In the catalina.out
> I see a log4j INFO when my Web-service is deployed.
> But I added on the server side some log4j code to trace my web-service
> activity.
> When I start my rpc.client I get the log4j WARM "No appender could be found
> .....".
> log4j file is never created, nowhere.
> I've also tried to insert a log4j.properties into the .aar generated by my
> ant when I compile my web-serivce (into the class root directory).
> NOTHING ....
>
> Something wrong.
> Could somebody help me ?
>
> Thanks
>
>
> ===================================================================
> public class IcProvider {
>         private static org.apache.log4j.Logger log =
> Logger.getLogger(IcProvider.class);
>         public User logon(String userVal) {
>         if (userVal.equals("vpl")) {
>                 log.info("user vpl logged");
>                 return new User("vpl");
>         }
>         else
>                 return null;
>     }
>
> }
>
>
> # Set root category priority to INFO and its only appender to CONSOLE.
> log4j.rootCategory=INFO, CONSOLE
> #log4j.rootCategory=INFO, CONSOLE, LOGFILE
>
> # Set the enterprise logger priority to FATAL
> log4j.logger.org.apache.axis2.enterprise=FATAL
> log4j.logger.de.hunsicker.jalopy.io=FATAL
> log4j.logger.httpclient.wire.header=FATAL
> log4j.logger.org.apache.commons.httpclient=FATAL
>
> # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
> log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
> log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
> log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
>
> # LOGFILE is set to be a File appender using a PatternLayout.
> log4j.appender.LOGFILE=org.apache.log4j.FileAppender
> log4j.appender.LOGFILE.File=axis2.log
> log4j.appender.LOGFILE.Append=true
> log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
> log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
>
> --
> View this message in context: http://www.nabble.com/axis2.log-missing-tf4508178.html#a12856946
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
============================
Srinath Perera:
   Indiana University, Bloomington
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org