Tomcat and database connection

2010-05-13 Thread Tomás Tormo

Greetings

I would like to understand correctly how Tomcat database pool works.

As I understand, when the application starts, a pool connection is 
created with *initialSize* connections (0 by default).


Later on, new connections are created on demand of the application, 
untill it reaches the *maxActive* connections. If *maxActive* has been 
reached and the application requests for a new connection, the pool will 
wait *maxWait* milliseconds for a free connection.


If any connection has been released, it will be kept as idle as long as 
*maxIdle* is not reached. No more connections will be created if there 
are *minIdle* or more connections in the pool in idle state.


¿Am I right?

But I still have some questions:

¿How to see the pool connection state in real time? (idle connections, 
active connections, etc). We are using Introscope for monitoring an 
application, and we can see some stalled connections... but the 
maxActive parameter is far bigger (100) than the actived connections 
shown by Introscope (24). This is happening with Tomcat 5.5 on CentOs 
using Java 1.6.


Thank you very much

--
Un saludo,

Tomás Tormo Franco
Area de sistemas

INDENOVA S.L.
C/ Dels Traginers 14, 2º B
Polígono Vara de Quart
46014 Valencia
Tel. (34) 96 381 99 47
Fax. (34) 96 381 99 48

tto...@indenova.com
http://www.indenova.com

Descárguese gratuitamente el software eSigna Viewer para visualizar documentos 
firmados electrónicamente: http://www.indenova.com/eSignaViewer.php



Re: Tomcat and database connection

2010-05-13 Thread Tomás Tormo


http://commons.apache.org/dbcp/configuration.html
   

Thanks, I was already checking that.


I don't know anything about Introscope.

It just an monitoring tool application


If maxActive is larger than the number of active connections, then
there's nothing wrong there, is there?  I'm not sure what you're trying
to explain by that.

   
Yes maxActive is larger than the active connections. Both queries (the 
one running and the one stalled) are trying to access the same register 
in BBDD (is the case when two different users are doing the same), but 
the query is just a simple SELECt, that's why I think is surprising that 
the second one is getting stalled...



If you can see some stalled connections, take a thread dump to see what
they're doing/waiting on.


Could I use jvisualvm for that? I knew I could see threads state there, 
but I didn't know I could see why they are waiting...

Sorry for my ignorance, I'm just starting in this field... :S



On 13/05/10 11:05, Pid wrote:

On 13/05/2010 09:35, Tomás Tormo wrote:
   

Greetings

I would like to understand correctly how Tomcat database pool works.
 

It's a repackaged version of Apache Commons DBCP.

   

As I understand, when the application starts, a pool connection is
created with *initialSize* connections (0 by default).

Later on, new connections are created on demand of the application,
untill it reaches the *maxActive* connections. If *maxActive* has been
reached and the application requests for a new connection, the pool will
wait *maxWait* milliseconds for a free connection.

If any connection has been released, it will be kept as idle as long as
*maxIdle* is not reached. No more connections will be created if there
are *minIdle* or more connections in the pool in idle state.
 

http://commons.apache.org/dbcp/configuration.html

   

¿Am I right?

But I still have some questions:

¿How to see the pool connection state in real time? (idle connections,
active connections, etc). We are using Introscope for monitoring an
application, and we can see some stalled connections... but the
maxActive parameter is far bigger (100) than the actived connections
shown by Introscope (24). This is happening with Tomcat 5.5 on CentOs
using Java 1.6.
 

I don't know anything about Introscope.

If maxActive is larger than the number of active connections, then
there's nothing wrong there, is there?  I'm not sure what you're trying
to explain by that.

If you can see some stalled connections, take a thread dump to see what
they're doing/waiting on.


p


   



--
Un saludo,

Tomás Tormo Franco
Area de sistemas

INDENOVA S.L.
C/ Dels Traginers 14, 2º B
Polígono Vara de Quart
46014 Valencia
Tel. (34) 96 381 99 47
Fax. (34) 96 381 99 48

tto...@indenova.com
http://www.indenova.com

Descárguese gratuitamente el software eSigna Viewer para visualizar documentos 
firmados electrónicamente: http://www.indenova.com/eSignaViewer.php


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



Re: Apache+mod_jk+Tomcat in openSUSE 10.3

2008-05-22 Thread Tomás Tormo

Hi
 Here i come again!! I'm would  like to install 
apache+mod_jk+tomcat in openSuse 10.3, but according to the howto's for 
SUSE I've seen on the internet, I should create a virtual host in apache 
in order to make it work. In my experience in other distros (Ubuntu, 
CentOs), this is not necessary... then... should  I create that virtual 
host? ( i'm asking this because other guy I met couldn't make it work...)


Thank you very much

--
Un saludo,

Tomás Tormo Franco

Indenova, S.L.
Tels.: +34 963 81 99 47  ext.519
http://www.indenova.com
mailto:[EMAIL PROTECTED]  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Apache+mod_jk+Tomcat in openSUSE 10.3

2008-05-21 Thread Tomás Tormo

Hi
  I'm gonna install apache+mod_jk+tomcat in openSuse 10.3, but 
according to the howto's I've seen on the internet, I should create a 
virtual host in apache in order to make it work. In my experience in 
other distros (Ubuntu, CentOs), this is not necessary... then... should  
I create that virtual host? ( i'm asking this because other guy I met 
couldn't make it work...)


Thank you very much

--
Un saludo,

Tomás Tormo Franco

Indenova, S.L.
Tels.: +34 963 81 99 47 
http://www.indenova.com
mailto:[EMAIL PROTECTED]  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to increase tomcat memory

2008-05-19 Thread Tomás Tormo

Hi

   here it comes my question again... :D How to increase tomcat memory? 
I'm getting GC overhead limit exceeded.


I tried putting export JAVA_OPTS=-Xms256m -Xmx512m in setclasspath.sh 
file as well as putting CATALINA_OPTS=-server -Xms256m -Xmx512m in 
/etc/init.d/tomcat5.5 script file, but when I go to tomcat 
administration webpage and list the server status I always get Max 
memory: 113.81 MB.


Thank you very much

--
Un saludo,

Tomás Tormo Franco

Indenova, S.L.
Tels.: +34 963 81 99 47 
http://www.indenova.com
mailto:[EMAIL PROTECTED]  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: *SPAM* Re: How to increase tomcat memory

2008-05-19 Thread Tomás Tormo
Thank you very much for you answer. Because of I was in a hurry, I 
examined the invocation of tomcat and I found that Tomcat was using 
128mb of memory, so, obviously , the lines I added weren't working at 
all... Then, I realized that the -Xmx128m argument was after a line 
-Djava.awt.headless=true, so I simply located that line (that can be 
found in catalina.sh) and changed the argument with -Xmx512m, and now my 
applicattion is working perfectly :)


Anyway... does anybody know the correct way to do this? (or maybe, this 
is the good one... :p )


Thank you again!

Alan Chaney escribió:

You seem to be using linux. If you go:

ps alx | grep java

after you have started tomcat you should be able to find the 
invocation for tomcat. Please check to see whether or not the options 
you have specified below appear in that list and check very carefully 
that there is whitespace around the options. I would look for two 
things were I debugging this:


1. The option isn't being included in the tomcat java invocation

2. The option is corrupted (misspelt, incorrect spacing etc).

HTH

Alan Chaney


Tomás Tormo wrote:

Hi

   here it comes my question again... :D How to increase tomcat 
memory? I'm getting GC overhead limit exceeded.


I tried putting export JAVA_OPTS=-Xms256m -Xmx512m in 
setclasspath.sh file as well as putting CATALINA_OPTS=-server 
-Xms256m -Xmx512m in /etc/init.d/tomcat5.5 script file, but when I 
go to tomcat administration webpage and list the server status I 
always get Max memory: 113.81 MB.


Thank you very much



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Un saludo,

Tomás Tormo Franco

Indenova, S.L.
Tels.: +34 963 81 99 47 
http://www.indenova.com
mailto:[EMAIL PROTECTED]  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: *SPAM* Re: How to increase tomcat memory

2008-05-19 Thread Tomás Tormo
Sorry, the file i edited was the one in /etc/init.d/tomcatX (where X 
is the version of Tomcat)


too much working.. :D

Greetings!

Tomás Tormo escribió:
Thank you very much for you answer. Because of I was in a hurry, I 
examined the invocation of tomcat and I found that Tomcat was using 
128mb of memory, so, obviously , the lines I added weren't working at 
all... Then, I realized that the -Xmx128m argument was after a line 
-Djava.awt.headless=true, so I simply located that line (that can be 
found in catalina.sh) and changed the argument with -Xmx512m, and now 
my applicattion is working perfectly :)


Anyway... does anybody know the correct way to do this? (or maybe, 
this is the good one... :p )


Thank you again!

Alan Chaney escribió:

You seem to be using linux. If you go:

ps alx | grep java

after you have started tomcat you should be able to find the 
invocation for tomcat. Please check to see whether or not the options 
you have specified below appear in that list and check very carefully 
that there is whitespace around the options. I would look for two 
things were I debugging this:


1. The option isn't being included in the tomcat java invocation

2. The option is corrupted (misspelt, incorrect spacing etc).

HTH

Alan Chaney


Tomás Tormo wrote:

Hi

   here it comes my question again... :D How to increase tomcat 
memory? I'm getting GC overhead limit exceeded.


I tried putting export JAVA_OPTS=-Xms256m -Xmx512m in 
setclasspath.sh file as well as putting CATALINA_OPTS=-server 
-Xms256m -Xmx512m in /etc/init.d/tomcat5.5 script file, but when I 
go to tomcat administration webpage and list the server status I 
always get Max memory: 113.81 MB.


Thank you very much



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








--
Un saludo,

Tomás Tormo Franco

Indenova, S.L.
Tels.: +34 963 81 99 47 
http://www.indenova.com
mailto:[EMAIL PROTECTED]  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to increase memory form Tomcat 5.5

2008-05-13 Thread Tomás Tormo

Hi

   I'm getting the OutOfMemory exception sometimes with some 
applications in tomcat 5.5 on Ubuntu. I've been searching on the 
internet how to give more memory to Tomcat, but the only way i found is 
to add the line set JAVA_OPTS=-server -Xms256m -Xmx512m (cause in this 
case i need that amount of memory) in the beginning of catalina.sh, but 
it doesn't work: when i check the Server Status in the Web 
Administration page of Tomcat, i always get the same value: 113 mb. 
Could you please help me to resolve this issue?


Thank you very much.

--
Un saludo,

Tomás Tormo Franco

Indenova, S.L.
Tels.: +34 963 81 99 47 
http://www.indenova.com
mailto:[EMAIL PROTECTED]  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: *SPAM* RE: How to increase memory form Tomcat 5.5

2008-05-13 Thread Tomás Tormo
I tried what you told me (actually, I put the line 
*export JAVA_OPTS=-Xms256m -Xmx512m* in the beginning of the setclasspath.sh file), but it didn't make anychange... (it is still saying 113mb avaliable in the Server Status in the Administration webpage...)


Any solution?

Thank you very much.



--
Un saludo,

Tomás Tormo Franco

Indenova, S.L.
Tels.: +34 963 81 99 47 
http://www.indenova.com
mailto:[EMAIL PROTECTED]  




James Law escribió:

I believe in Linux the command is

Export JAVA_OPTS= etc

I put it in the setclasspath.sh file though I don't think its that important?


-Original Message-
From: Tomás Tormo [mailto:[EMAIL PROTECTED] 
Sent: 13 May 2008 09:25

To: Tomcat Users List
Subject: How to increase memory form Tomcat 5.5

Hi

I'm getting the OutOfMemory exception sometimes with some 
applications in tomcat 5.5 on Ubuntu. I've been searching on the 
internet how to give more memory to Tomcat, but the only way i found is 
to add the line set JAVA_OPTS=-server -Xms256m -Xmx512m (cause in this 
case i need that amount of memory) in the beginning of catalina.sh, but 
it doesn't work: when i check the Server Status in the Web 
Administration page of Tomcat, i always get the same value: 113 mb. 
Could you please help me to resolve this issue?


Thank you very much.

  





Re: *SPAM* Re: How to set a maximun log size?

2008-03-18 Thread Tomás Tormo

Mark Thomas escribió:

Tomás Tormo wrote:

Hello

 I'm a newbie Tomcat user and my catalina.out log file is getting too 
big. How could I set a maximun size in order to force Tomcat to build 
a new one when the maximun size is reached? I've been searching on 
the internet but nothing matches what i want to do.


http://wiki.apache.org/tomcat/FAQ/Logging#Q4

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Thank you very much! I don't know how I didn't see this before hehehe. 
In spite of this solution, I think I'll use the logrotate daemon in 
order to control the size of the logs. What do you think about this one?


Thank you again.

--
Un saludo,

Tomás Tormo Franco

Indenova, S.L.
Tels.: +34 963 81 99 47 
http://www.indenova.com
mailto:[EMAIL PROTECTED]  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to set a maximun log size?

2008-03-17 Thread Tomás Tormo

Hello

 I'm a newbie Tomcat user and my catalina.out log file is getting too 
big. How could I set a maximun size in order to force Tomcat to build a 
new one when the maximun size is reached? I've been searching on the 
internet but nothing matches what i want to do.


Thank you very much


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to initialize variables when tomcat load a webservice?

2007-11-27 Thread Tomás Tormo

Hi

   I'm developing a webservice wich has to initialize some variables 
when it is loaded by tomcat (just because otherwise it is too slow). Can 
this be done? Has the client to initialize the class by means of the 
constructor or is tomcat the one that will initialize it?


Thank you!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: *SPAM* Re: How to initialize variables when tomcat load a webservice?

2007-11-27 Thread Tomás Tormo

Delian Krustev wrote:

On Tue, 27 Nov 2007 13:18:47 +0100 Tomás Tormo wrote:
  

I'm developing a webservice wich has to initialize some variables
when it is loaded by tomcat (just because otherwise it is too slow). Can
this be done? Has the client to initialize the class by means of the
constructor or is tomcat the one that will initialize it?



You need to define a listener and handle the context initialized event.

This should give you enough tips for searching :-)


P.S. this looks like a general java web apps programming question, not a 
tomcat one.



Cheers
Delian

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

Thank you!!!

Yes, it's enough for searching. Well, it is a general question about 
java web programming, but i didn't know if i could apply this to tomcat 
environment, and i didn't find anything useful on the web... With this 
is enough to start :)


Thank you again!!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to change the CLASSPATH in tomcat 5.028 for a concrete webservice

2007-09-10 Thread Tomás Tormo

Hello

I would like to change the classpath for a concrete webservice in 
Tomcat 5.028 because the webservice has to use a concrete folder in 
order to work. This folder should be in the CLASSPATH in order to make 
the webservice work properly and because the webservice can't find it, 
it doesn't work.


I've tried a lot of ways to solve it: I tried to launch tomcat with the 
classpath modified from the shell itself(making it point to the folder), 
tried to export the classpath from startup.sh script, tried to export 
the classpath from catalina.sh script, tried to modify the CATALINA_OPTS 
variable, tried to put the folder in both lib and classes folders of the 
webservice folder... but nothing worked.


could you please help me? Anyway i'll continue researching by myself.

thank you very much


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to change the CLASSPATH in tomcat 5.028 for a concrete webservice

2007-09-10 Thread Tomás Tormo

Hi again

 I've tried to set the classpath in catalina.sh in order to have my own 
classpath set when tomcat starts up ( I show it in catalina.sh as well 
and it looks good). But my problem is that when I show it in my 
webservice (using 
System.out.println(System.getProperty(java.class.path))) it is changed 
again (it only points to a few jar files in /bin folder) and therefore 
my webservice can't work properly. Shouldn't it be pinting to my my 
/webapp/webservice/WEB-INF/lib folder as well? Does anybody know how to 
fix this problem?


Hakan: I've tried the solution you gave me (create a setenv.sh script 
called from startup.sh) but tomcat don't start up!


Thank you very much for your future answers :p

Tomás Tormo escribió:

Hi Hakan

First of all thank you for your fast answer ;).

Do you mean to create an script called setenv.sh wich will set the 
CLASSPATH (by export CLASSPATH.. etc)? This script should be called by 
a modified startup.sh?


By they way, I printed the CLASSPATH in my webservice (using 
System.out.println(System.getProperty(java.class.path)); ) and it 
says that my CLASSPATH is only pointing to a few jars in the bin 
folder, not even to my /lib folder in my webservice folder (I hope I 
explained myself well, I'm not using war files). Shouldn't it be 
pointing to my /webapp/webservice/WEB-INF/lib folder as well?


Thank you!!

Greetings!!



Hakan Koseoglu escribió:

Hi Tomás,
Tomás Tormo said the following on 09/10/2007 08:26 AM:
I would like to change the classpath for a concrete webservice in 
Tomcat 5.028 because the webservice has to use a concrete folder in 
order to work. This folder should be in the CLASSPATH in order to 
make the webservice work properly and because the webservice can't 
find it, it doesn't work.
With Tomcat 5, creating a setenv.sh solves the problem for me. It 
gets called if you start the Tomcat using startup.sh.


Any variable you define there will be used, including the classpath. 
We use it to point to the libraries which we don't put into 
common/lib nor war files.







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: *SPAM* Re: How to change the CLASSPATH in tomcat 5.028 for a concrete webservice

2007-09-10 Thread Tomás Tormo

Hi David

  I'm using tomcat 5.028 in Ubuntu 6.10 . I've written a java 
applicattion wich uses a wrapper to communicate with an applicattion 
written in C, wich is the core of my applicattion. Both the wrapper 
and the core are third party applicattions, and because of that i don't 
have the source code, I just have the API.


The third party sent me an example application wich uses the core. And, 
as I could see in the script wich lauches the application, this folder 
should be added to the classpath in order to be able to be located by 
the wrapper applicattion. The documentation of the wrapper just says 
that this folder has to exist with an specific name.


My problem is that my applicattion works fine launched from shell (it 
founds the folder and uses the core perfectly) but it doesn't work as a 
webservice. It is not able to find the resource folder (let's call it 
cfg). As I can see in the catalina log, the application tries to load 
the resources (via ClassLoader I guess) and then launches an exception 
saying that is not able to find it. The client  gets a HTTPErrorCode0.


I think I've tried everything to make it find the folder, but I wasn't 
successful. do you have any idea?


thank you very  much

David Smith escribió:
I wold STRONLY recommend you DO NOT touch the CLASSPATH env variable.  
It's just a horrible idea.  What is it about your webservice that 
requires the alteration of CLASSPATH?  Can you describe that a bit 
more?  The standard classloader structure works very well in virtually 
all other cases.


--David

Tomás Tormo wrote:

Hi again

 I've tried to set the classpath in catalina.sh in order to have my 
own classpath set when tomcat starts up ( I show it in catalina.sh as 
well and it looks good). But my problem is that when I show it in my 
webservice (using 
System.out.println(System.getProperty(java.class.path))) it is 
changed again (it only points to a few jar files in /bin folder) and 
therefore my webservice can't work properly. Shouldn't it be pinting 
to my my /webapp/webservice/WEB-INF/lib folder as well? Does anybody 
know how to fix this problem?


Hakan: I've tried the solution you gave me (create a setenv.sh script 
called from startup.sh) but tomcat don't start up!


Thank you very much for your future answers :p

Tomás Tormo escribió:

Hi Hakan

First of all thank you for your fast answer ;).

Do you mean to create an script called setenv.sh wich will set the 
CLASSPATH (by export CLASSPATH.. etc)? This script should be called 
by a modified startup.sh?


By they way, I printed the CLASSPATH in my webservice (using 
System.out.println(System.getProperty(java.class.path)); ) and it 
says that my CLASSPATH is only pointing to a few jars in the bin 
folder, not even to my /lib folder in my webservice folder (I hope I 
explained myself well, I'm not using war files). Shouldn't it be 
pointing to my /webapp/webservice/WEB-INF/lib folder as well?


Thank you!!

Greetings!!



Hakan Koseoglu escribió:

Hi Tomás,
Tomás Tormo said the following on 09/10/2007 08:26 AM:
I would like to change the classpath for a concrete webservice in 
Tomcat 5.028 because the webservice has to use a concrete folder 
in order to work. This folder should be in the CLASSPATH in order 
to make the webservice work properly and because the webservice 
can't find it, it doesn't work.
With Tomcat 5, creating a setenv.sh solves the problem for me. It 
gets called if you start the Tomcat using startup.sh.


Any variable you define there will be used, including the 
classpath. We use it to point to the libraries which we don't put 
into common/lib nor war files.







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Noob needs help with a webservice wich uses resources located in a folder

2007-09-04 Thread Tomás Tormo

Hello

First of all thank you for your answer. The owner of tomcat it's my 
user, but the problem is that my system doesn't have the group (or user) 
tomcat. I tried to launch tomcat as root (just as a test) moving the 
folder to the same place as the .class is, and later the same moving the 
folder to webapps/service/WEB-INF/lib folder... but nothing worked...


any other idea? I'll keep on trying.

Thank you!!

PTS escribió:
If my quick read of your problem is correct, (only works when run from 
command line) then I would venture to say that you may have a rights 
issue. Who owns the app? By default Tomcat starts from the scripts as 
owner tomcat where as from the command line it is running as you (root 
or some admin level). Try chown and chgrp the app to tomcat and see if 
that helps.


No even moving it into the folder does not give Tomcat the rights to 
access it. You could also change the access rights but I would be 
careful there as letting anyone execute code is not a good thing, but 
chgrp to tomcat and group executable would work. Just make sure you 
understand what the implications of the changes you make are, even on 
ownership and group membership.


Doug


- Original Message - From: Tomás Tormo [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, September 03, 2007 7:09 AM
Subject: Noob needs help with a webservice wich uses resources located 
in a folder




Hi

 I'm quite noob about tomcat topic. I'm using tomcat 5.028 in Ubuntu 
6.10 and I would like to find an anwer to my question about web 
services because i'm not able to solve it. I've written a java 
applicattion wich uses a wrapper to communicate with an applicattion 
written in C, wich is the core of my applicattion. Both the wrapper 
and the core are third party applicattions, and because of that i 
don't have the source code, I just have the API.


The third party sent me an example application wich uses the core. 
And, as I could see in the script wich lauches the application, this 
folder should be added to the classpath in order to be able to be 
located by the wrapper applicattion. The documentation of the wrapper 
just says that this folder has to exist with an specific name.


My problem is that my applicattion works fine launched from shell (it 
founds the folder and uses the core perfectly) but it doesn't work as 
a webservice. It is not able to find the resource folder (let's call 
it cfg). As I can see in the catalina log, the application tries to 
load the resources (via ClassLoader I guess) and then launches an 
exception saying that is not able to find it. The client  gets a 
HTTPErrorCode0.


I've tried a lot of ways to solve it: I tried to launch tomcat with 
the classpath modified from the shell itself(making it point to the 
folder), tried to export the classpath from startup.sh script, tried 
to export the classpath from catalina.sh script, tried to modify the 
CATALINA_OPTS variable, tried to put the folder in both lib and 
classes folders of the webservice folder... but nothing worked.


Please.. could you help me to solve this problem? I think I've tried 
all the options that came to my mind (except declaring a resource in 
server.xml file, altought I don't know If this wrapper uses JNDI to 
access to the resource..).I hope I explained myself well.  As I think 
you can see, I'm quite noob with tomcat, so please don't be so hard 
with your answers... :'-p


Thank you very much!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Noob needs help with a webservice wich uses resources located in a folder

2007-09-03 Thread Tomás Tormo

Hi

 I'm quite noob about tomcat topic. I'm using tomcat 5.028 in Ubuntu 
6.10 and I would like to find an anwer to my question about web services 
because i'm not able to solve it. I've written a java applicattion wich 
uses a wrapper to communicate with an applicattion written in C, wich is 
the core of my applicattion. Both the wrapper and the core are third 
party applicattions, and because of that i don't have the source code, I 
just have the API.


The third party sent me an example application wich uses the core. And, 
as I could see in the script wich lauches the application, this folder 
should be added to the classpath in order to be able to be located by 
the wrapper applicattion. The documentation of the wrapper just says 
that this folder has to exist with an specific name.


My problem is that my applicattion works fine launched from shell (it 
founds the folder and uses the core perfectly) but it doesn't work as a 
webservice. It is not able to find the resource folder (let's call it 
cfg). As I can see in the catalina log, the application tries to load 
the resources (via ClassLoader I guess) and then launches an exception 
saying that is not able to find it. The client  gets a HTTPErrorCode0.


I've tried a lot of ways to solve it: I tried to launch tomcat with the 
classpath modified from the shell itself(making it point to the folder), 
tried to export the classpath from startup.sh script, tried to export 
the classpath from catalina.sh script, tried to modify the CATALINA_OPTS 
variable, tried to put the folder in both lib and classes folders of the 
webservice folder... but nothing worked.


Please.. could you help me to solve this problem? I think I've tried all 
the options that came to my mind (except declaring a resource in 
server.xml file, altought I don't know If this wrapper uses JNDI to 
access to the resource..).I hope I explained myself well.  As I think 
you can see, I'm quite noob with tomcat, so please don't be so hard with 
your answers... :'-p


Thank you very much!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]