You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Petr Hracek <ph...@gmail.com> on 2011/05/12 15:12:59 UTC

VJDBC and tomcat5

Hello gyus,

I would like to ask you if you have any experiances with
vjdbc(http://vjdbc.sourceforge.net/)?

I am trying to configurate them together with old tomcat 5
(tomcat5-5.5.27) but without any success?
Servlet is stored in /srv/www/tomcat5/base/webapps/vjdbc directory.
web.xml file is (under /srv/www/tomcat5/base/webapps/vjdbc/WEB-INF/web.xml):

linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF # cat web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>


    <servlet>
        <servlet-name>VJdbcServlet</servlet-name>
        <servlet-class>de.simplicit.vjdbc.server.servlet.ServletCommandSink</servlet-class>
        <init-param>
                <param-name>config-resource</param-name>
                <param-value>/WEB-INF/config/vjdbc-exam.xml</param-value>
        </init-param>
    </servlet>


    <session-config>
        <session-timeout>
           300
        </session-timeout>
    </session-config>
</web-app>

linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF #

Could you please advice me why http://<IP_address>/vjdbc/VJdbcServlet
is not working.
When I have inserted in log4j.properties file logging then in
catalina.out is not mentioned any output.
linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF # cat
/usr/share/tomcat5/common/classes/log4j.properties
log4j.logger.de.simplicit.vjdbc=DEBUG, A1
log4j.rootLogger=INFO, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF #

Thank you in advance
-- 
Best Regards / S pozdravem
Petr Hracek

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: VJDBC and tomcat5

Posted by Bill Miller <mi...@gmail.com>.
Both formats are perfectly valid, the only difference is how you're looking up the logger in your code.

To use "log4j.logger.de.simplicit.vjdbc=DEBUG, A1", your code would be calling the lookup with "de.simplicit.vjdbc".
To use "log4j.logger.vjdbc=DEBUG, A1", your code would be calling the lookup with "vjdbc".

Both should result in logging at DEBUG level to the A1 appender.

Bill
-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: May 12, 2011 5:14 PM
To: Tomcat Users List
Subject: Re: VJDBC and tomcat5

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

André,

On 5/12/2011 9:49 AM, André Warnier wrote:
> Hi.
> I am am no log4j or java guru, but
> 
> Petr Hracek wrote:
> ...
> 
>> When I have inserted in log4j.properties file logging then in
>> catalina.out is not mentioned any output.
>> linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF # cat
>> /usr/share/tomcat5/common/classes/log4j.properties
>> log4j.logger.de.simplicit.vjdbc=DEBUG, A1
> 
> should that not simply be
> 
> log4j.logger.vjdbc=DEBUG, A1
> 
> (the name of the webapp, not the servlet class) ?

Naw, log4j loggers can use naming convention, but it's typical to use
class name (or package name, etc.) to define loggers and provide
configuration for them.

It probably has nothing to do with the problem, though the OP gave
virtually no details whatsoever about the problem other than stating
that "it doesn't work". :(

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3MTX0ACgkQ9CaO5/Lv0PAZhgCaAzR1+BFQj+p4KY8JVPliEIot
Uy8AoJigu8mPz5hfj0+zV5ferPtbhNGe
=MOGs
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: VJDBC and tomcat5

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

André,

On 5/12/2011 9:49 AM, André Warnier wrote:
> Hi.
> I am am no log4j or java guru, but
> 
> Petr Hracek wrote:
> ...
> 
>> When I have inserted in log4j.properties file logging then in
>> catalina.out is not mentioned any output.
>> linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF # cat
>> /usr/share/tomcat5/common/classes/log4j.properties
>> log4j.logger.de.simplicit.vjdbc=DEBUG, A1
> 
> should that not simply be
> 
> log4j.logger.vjdbc=DEBUG, A1
> 
> (the name of the webapp, not the servlet class) ?

Naw, log4j loggers can use naming convention, but it's typical to use
class name (or package name, etc.) to define loggers and provide
configuration for them.

It probably has nothing to do with the problem, though the OP gave
virtually no details whatsoever about the problem other than stating
that "it doesn't work". :(

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3MTX0ACgkQ9CaO5/Lv0PAZhgCaAzR1+BFQj+p4KY8JVPliEIot
Uy8AoJigu8mPz5hfj0+zV5ferPtbhNGe
=MOGs
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: VJDBC and tomcat5

Posted by André Warnier <aw...@ice-sa.com>.
Hi.
I am am no log4j or java guru, but

Petr Hracek wrote:
...

> When I have inserted in log4j.properties file logging then in
> catalina.out is not mentioned any output.
> linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF # cat
> /usr/share/tomcat5/common/classes/log4j.properties
> log4j.logger.de.simplicit.vjdbc=DEBUG, A1

should that not simply be

log4j.logger.vjdbc=DEBUG, A1

(the name of the webapp, not the servlet class) ?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org