Re: OCI vs THIN

2007-12-03 Thread Alexey Solofnenko
We evaluated OCI driver ourselves and found that it has only one benefit 
- external OPS$ account support. Otherwise THIN driver requires less 
maintenance, less installation and it is often faster, because it brings 
some datatypes inline (LONG, if I am not mistaken).


- Alexey.

Rumpa Giri wrote:

For production environment it has been recommended that we use OCI
driver.

Based on the oracle JDBC guide, with oracle 10g there is not much
difference in the two drivers in terms of capability. 


We would like to know is there any documentation/links/whitepapers on
the above? Is there any data proving that OCI performs better than THIN
driver?

What are you using for your production JDBC driver? Have you had a
chance to compare the two before making the decision?

Thanks,
Rumpa Giri 
   
-

Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try
it now.

  


--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread Alexey Solofnenko
Theoretically, the behaviour can be caused by network problems - 
[reverse] DNS could not be resolved (maybe for logging), file share 
becomes unavailable, etc.


- Alexey.

jnedzel wrote:

Folks:

We're having an intermittent problem with Tomcat becoming non-responsive for
a while (between 30 seconds and several minutes) and then recovering without
any intervention.  There are no error messages in the Tomcat logs.

Any ideas what might be causing this or where to look?

We're running Tomcat 5.5.20 on linux.

Thanks,

Jared
  


--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: How do I run Tomcat as a non-root user?

2007-10-10 Thread Alexey Solofnenko
Look there: 
http://wiki.apache.org/tomcat/HowTo#head-18d1c3f3fa702a1be769340784515eecce6e0ac9 
.


- Alexey.

Rob Tanner wrote:

Hi,

How do I run Tomcat as a non-root user?  I need to be able to bind to 
ports 80 & 443 which are privileged ports.  I know that with straight 
Apache the user that it runs as is configured in httpd.conf.  It 
starts up as root, binds to the ports and then drops its privileges.  
However, I'm running Tomcat as stand-alone.  So, is there some 
mechanism in Tomcat to accomplish the same thing?


Thanks,
Rob





--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat crash @ midnight - but why?

2007-09-26 Thread Alexey Solofnenko
InstallShield now has auto update feature too. Plus there is auto update 
in antiviruses, Google Pack, other products. Also disk defragmenters may 
want to reboot the machine to defragment system files. Sometimes they 
log messages in EventLog.


Martin Cavanagh wrote:

Thanks Alexey.

Notifications only :(

Keep the ideas coming guys!

just to to check - there is no hidden setting in Tomcat which says - 
shut me down at midnight sometimes for an inexplainable reason?


Martin

Alexey Solofnenko wrote:

Maybe it is caused by automatic Windows Update. Did you check it?

- Alexey.

Martin Cavanagh wrote:

Hi guys, I'm still having this problem.

Its happened 3 times now.  Always at exactly midnight.  21.09, 25.09 
and 26.09.


We have VM Ware Server as the hardware - could this cause the problem?

I have a firewall on the machine with only the HTTPS port open.

In the config file there is the standard AJP port (8009) - what does 
this actually do?


Hardware : VM Ware Server
OS: Win 2003
Tomcat Version: 5.5.23

Any ideas?

Thanks

Martin

David Smith wrote:
Huh??  The shutdown port explicitly binds to the localhost 
interface.  External clients cannot access it anyway.  Easily 
demonstrated with a netstat command.


--David



Martin Gainty wrote:


Hi Pid

you're going to need a firewall if someone can telnet to your 
shutdown port

(check server.xml for the exact port number)

Martin--
- Original Message -
From: "Pid" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, September 21, 2007 7:19 AM
Subject: Re: Tomcat crash @ midnight - but why?


 


What's immediately before the shutdown description in the logs?

p



Martin Cavanagh wrote:
 

Why would windows report it as crashing then?

I know I didn't shut it down, I was sleeping, as I assume 
everyone else

was who had access to the system..

Thanks

Martin

David Delbecq wrote:
 
According to your log it did not crash. It did shutdown 
following the

shutdown procedure (which can be executed by bin\shutdown.bat). I
suggest you investigate possibilities that a local service is 
setup to

shutdown tomcat at midnight on the server.

The tomcat shutdown procedure is started when tomcat receive the
SHUTDOWN string at the admin connector (8005 here). This 
connector is
  

by
 


default accessible only on local machine.

En l'instant précis du 21/09/07 09:21, Martin Cavanagh 
s'exprimait en

ces termes:

   

Hi everyone.

Yesterday I started a 2nd Apache Server for my program.  It was
installed several months ago.  Version 5.5.0.23.

The server is running on Windows 2003 Server with Java JRE 
1.5.0_11


It worked fine with my program for several hours.  Then 
exactly at

midnight it crashed.

Dienst "Apache Tomcat" wurde unerwartet beendet. Dies ist 
bereits 1

Mal passiert. - Which translates to,
Service "Apache Tomcat" stopped unexpectedly.  This has 
happened once

already.

The catalina logs show
21.09.2007 00:00:00 org.apache.coyote.http11.Http11AprProtocol 
pause

INFO: Pausing Coyote HTTP/1.1 on http-443
21.09.2007 00:00:00 org.apache.coyote.ajp.AjpAprProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
21.09.2007 00:00:01 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
21.09.2007 00:00:01 org.apache.coyote.http11.Http11AprProtocol 
destroy

INFO: Stopping Coyote HTTP/1.1 on http-443
21.09.2007 00:00:01 org.apache.coyote.ajp.AjpAprProtocol destroy
INFO: Stopping Coyote AJP/1.3 on ajp-8009

Which unfortunately isn't really particularly useful.  I can't 
see any
other logs regarding this.  How do I find out why my Tomcat 
crashed?


Thanks

Martin




  

- 


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]














--

Alexey N. Solofnenko <http://trelony.cjb.net/>
Pleasant Hill, CA (GMT-8 usually)

-
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: Tomcat crash @ midnight - but why?

2007-09-26 Thread Alexey Solofnenko

Maybe it is caused by automatic Windows Update. Did you check it?

- Alexey.

Martin Cavanagh wrote:

Hi guys, I'm still having this problem.

Its happened 3 times now.  Always at exactly midnight.  21.09, 25.09 
and 26.09.


We have VM Ware Server as the hardware - could this cause the problem?

I have a firewall on the machine with only the HTTPS port open.

In the config file there is the standard AJP port (8009) - what does 
this actually do?


Hardware : VM Ware Server
OS: Win 2003
Tomcat Version: 5.5.23

Any ideas?

Thanks

Martin

David Smith wrote:
Huh??  The shutdown port explicitly binds to the localhost 
interface.  External clients cannot access it anyway.  Easily 
demonstrated with a netstat command.


--David



Martin Gainty wrote:


Hi Pid

you're going to need a firewall if someone can telnet to your 
shutdown port

(check server.xml for the exact port number)

Martin--
- Original Message -
From: "Pid" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, September 21, 2007 7:19 AM
Subject: Re: Tomcat crash @ midnight - but why?


 


What's immediately before the shutdown description in the logs?

p



Martin Cavanagh wrote:
 

Why would windows report it as crashing then?

I know I didn't shut it down, I was sleeping, as I assume everyone 
else

was who had access to the system..

Thanks

Martin

David Delbecq wrote:
   
According to your log it did not crash. It did shutdown following 
the

shutdown procedure (which can be executed by bin\shutdown.bat). I
suggest you investigate possibilities that a local service is 
setup to

shutdown tomcat at midnight on the server.

The tomcat shutdown procedure is started when tomcat receive the
SHUTDOWN string at the admin connector (8005 here). This 
connector is
  

by
 


default accessible only on local machine.

En l'instant précis du 21/09/07 09:21, Martin Cavanagh 
s'exprimait en

ces termes:

 

Hi everyone.

Yesterday I started a 2nd Apache Server for my program.  It was
installed several months ago.  Version 5.5.0.23.

The server is running on Windows 2003 Server with Java JRE 1.5.0_11

It worked fine with my program for several hours.  Then exactly at
midnight it crashed.

Dienst "Apache Tomcat" wurde unerwartet beendet. Dies ist bereits 1
Mal passiert. - Which translates to,
Service "Apache Tomcat" stopped unexpectedly.  This has happened 
once

already.

The catalina logs show
21.09.2007 00:00:00 org.apache.coyote.http11.Http11AprProtocol 
pause

INFO: Pausing Coyote HTTP/1.1 on http-443
21.09.2007 00:00:00 org.apache.coyote.ajp.AjpAprProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
21.09.2007 00:00:01 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
21.09.2007 00:00:01 org.apache.coyote.http11.Http11AprProtocol 
destroy

INFO: Stopping Coyote HTTP/1.1 on http-443
21.09.2007 00:00:01 org.apache.coyote.ajp.AjpAprProtocol destroy
INFO: Stopping Coyote AJP/1.3 on ajp-8009

Which unfortunately isn't really particularly useful.  I can't 
see any
other logs regarding this.  How do I find out why my Tomcat 
crashed?


Thanks

Martin




  


-
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]









--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)

-
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: Can two Tomcat web apps deadlock each other?

2007-09-05 Thread Alexey Solofnenko
There can be a simple problem with locking - see 
http://tomcat.apache.org/faq/windows.html#lock . On Linux the files are 
usually not locked, so you can get "class not found exception" when a 
jar file is replaced with a new one.


Ask administrators to get the stack trace (and check if CPU is at 100% 
or not - maybe it is not a deadlock). Otherwise you can look for a 
problem for a very long time.


You can also add try/catch with finite number of retries  around 
connection code. Please  also check that your application shuts down 
cleanly - no exceptions are thrown during shutdown (but they should be 
logged) and preferably there are no finally() methods.


Wm.A.Stafford wrote:
Thanks Alexey.  Unfortunately, the server in question is not ours and 
we do not even have log in on it, so any kind of sane analysis is 
probably out of the question.
All we can do is try deploying another version with changes that will 
either fix the problem (we hope) or yield some more information about 
what is going on.



-=bill

Alexey Solofnenko wrote:
Everything is possible, but unlikely. Please try running server stack 
trace from 
http://tmitevski.users.mcs2.netarray.com/stacktrace/app/launch.jnlp 
to get a thread dump. It will show the list of threads and what locks 
they have acquired and what locks they are waiting for.


- Alexey.

Wm.A.Stafford wrote:
We are deploying a newer version of a web app to run in the same 
Tomcat instance (1.4.31) as the existing version.  On our 
development servers, winXP,  if the new version encounters a startup 
problem the production app will start and only the new version will 
fail.


On the production server, which is linux, Tomcat seems to 'hang' on 
the first failure encountered when starting the new app and nothing 
further happens. Tomcat has to be restarted after deleting the new 
app when it enters this state.  In the localhost log the last log 
entry is the exception logged from the new app and there is no 
further logging.  Since we have been doing some database changes the 
usual error that causes this is Jakarta DBCP connection failure but 
we have also seen it for a missing class file.  So I  don't think 
the error per se is at the root of the problem.


To me this looks like a deadlock.  Is it possible for one Tomcat web 
application to deadlock with another? An obvious difference is 
windows vs linux servers.  Could there be some config issue for 
Tomcat on linux that would lead to this behavior?


We are completely stumped by this, any ideas or suggestions would be 
appreciated.


-=bill


-
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]


--

Alexey N. Solofnenko <http://trelony.cjb.net/>
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Can two Tomcat web apps deadlock each other?

2007-09-05 Thread Alexey Solofnenko
Everything is possible, but unlikely. Please try running server stack 
trace from 
http://tmitevski.users.mcs2.netarray.com/stacktrace/app/launch.jnlp to 
get a thread dump. It will show the list of threads and what locks they 
have acquired and what locks they are waiting for.


- Alexey.

Wm.A.Stafford wrote:
We are deploying a newer version of a web app to run in the same 
Tomcat instance (1.4.31) as the existing version.  On our development 
servers, winXP,  if the new version encounters a startup problem the 
production app will start and only the new version will fail.


On the production server, which is linux, Tomcat seems to 'hang' on 
the first failure encountered when starting the new app and nothing 
further happens. Tomcat has to be restarted after deleting the new app 
when it enters this state.  In the localhost log the last log entry is 
the exception logged from the new app and there is no further 
logging.  Since we have been doing some database changes the usual 
error that causes this is Jakarta DBCP connection failure but we have 
also seen it for a missing class file.  So I  don't think the error 
per se is at the root of the problem.


To me this looks like a deadlock.  Is it possible for one Tomcat web 
application to deadlock with another? 
An obvious difference is windows vs linux servers.  Could there be 
some config issue for Tomcat on linux that would lead to this behavior?


We are completely stumped by this, any ideas or suggestions would be 
appreciated.


-=bill


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


--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Java freezing at 100% usage, tomcat 5, java 5

2007-08-17 Thread Alexey Solofnenko
I do not know the answer. A similar behaviour happened with our servers 
when finilizer dead-locked. In your case Finilizer did not dead-lock, 
but it fails with exception and I do not know if it recovers after that. 
Try checking stack trace several times in a row and see what the 
finilizer does.


"Finalizer" daemon prio=1 tid=0x0809d908 nid=0x4834 waiting for monitor 
entry [0xb24a1000..0xb24a1ea0]

at java.lang.Throwable.getStackTraceElement(Native Method)
at java.lang.Throwable.getOurStackTrace(Throwable.java:592)
- locked <0x792bef30> (a java.net.SocketException)
at java.lang.Throwable.printStackTrace(Throwable.java:511)
- locked <0x792bf368> (a java.io.PrintWriter)
at com.mysql.jdbc.Util.stackTraceToString(Util.java:291)
at 
com.mysql.jdbc.CommunicationsException.(CommunicationsException.java:186)

at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2723)
at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1401)
at com.mysql.jdbc.Connection.realClose(Connection.java:4882)
at com.mysql.jdbc.Connection.cleanup(Connection.java:2062)
at com.mysql.jdbc.Connection.finalize(Connection.java:3369)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)


- Alexey.

Jimmy Phelan :: Blacknight Solutions wrote:



Hi All

We are using tomcat 5 on a shared hosting server. The server is 
running DirectAdmin as its control panel. It is running RedHat 
Enterprise 4, tomcat 5.5.23 and jvm 1.5.0_08-b03


I have attached a stack trace (from kill -3)

We are using a plugin from da-plugin.com to use tomcat in DirectAdmin, 
but the support on this is less than stellar, and we don’t believe it 
to be the issue


What seems to be happening is that every now and again the java 
process jumps to 100% usage, and sticks. Only a service tomcatd 
restart will kill it and restart the server


Tomcat 5 has the following variables enables in its process

-Xmx512M 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties 
-Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath 
:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar 
-Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat 
-Djava.io.tmpdir=/usr/local/tomcat/temp 
org.apache.catalina.startup.Bootstrap start


We are also running tomcat-4 in tandem with tomcat 5, it runs with the 
following variables


-Djava.endorsed.dirs=/usr/local/tomcat.4.1.33/common/endorsed 
-classpath 
/usr/local/java/lib/tools.jar:/usr/local/tomcat.4.1.33/bin/bootstrap.jar 
-Dcatalina.base=/usr/local/tomcat.4.1.33 
-Dcatalina.home=/usr/local/tomcat.4.1.33 
-Djava.io.tmpdir=/usr/local/tomcat.4.1.33/temp 
org.apache.catalina.startup.Bootstrap start


We have been trying to sort this out for a while, but cant see 
anything, can anyone else?


Jimmy



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


--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat and path with pound sign (#) -> ClassNotFoundException

2007-08-09 Thread Alexey Solofnenko
In ANT we are using our own URL encoding, because Java one does not 
[always] work correctly in some cases. I guess it could be happening 
here too (possibly when creating new URLClassLoaderes). Anyway, there 
are Tomcat sources available. Feel free fixing them and submitting the 
patch.


See 
http://www.cenqua.com/fisheye/demo/browse/ant/src/main/org/apache/tools/ant/launch/Locator.java 
.


- Alexey.

Markus Schiegl wrote:

Hi Alexey,

yes it does (see message thread and different logs). i've checked with
"set -x" and even the actual process call with "ps" and truss/strace.
same problem if I call java directly - okay it does not log to
catalina.out but to stdout...

Somewhere the road while watching the truss output the open-syscalls use
the wrong/truncated directory.

thanks and kind regards,
   Markus

Alexey Solofnenko wrote:
  

Try running "bash -x catalina.sh run" to see if Java is started
correctly. If it is not, try running the same command from a normal
directory, and run the same command yourself without using scripts
provided with Tomcat.

- Alexey.

Markus Schiegl wrote:


Hi,

you're right about # as a special char for different programming
languages. but nevertheless the # sign is a valid character for
directory and file names (in contrast to * or / for example) for unix
and windows. If it's wise to use it is another question but sometimes
it's just beyond your control.

The same problem (# in directory name) and error message
(ClassNotFoundException) happens with Windows XP. Confirms my suspicion
this beeing a Java and/or Tomcat issue.

kind regards,
   Markus

Propes, Barry L wrote:
 
  

isn't that likely because in some languages like PHP, Python and Perl
the # is to comment out a line, and it will invariably break the code?
Because I thought some on this list were integrating Tomcat with
those languages.

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 09, 2007 7:58 AM
To: Tomcat Users List
Subject: Re: Tomcat and path with pound sign (#) ->
ClassNotFoundException


On 8/8/07, Markus Schiegl <[EMAIL PROTECTED]> wrote:

   


Has anybody been able to start a tomcat server from such a directory?
  
  

I copied a working installation from /usr/local/apache-tomcat-6.0.13
to /usr/local/apache-tomcat#6.0.13, set CATALINA_HOME and got this:

   


./bin/catalina.sh run
  
  

Using CATALINA_BASE:   /usr/local/apache-tomcat#6.0.13
Using CATALINA_HOME:   /usr/local/apache-tomcat#6.0.13
Using CATALINA_TMPDIR: /usr/local/apache-tomcat#6.0.13/temp
Using JRE_HOME:   /usr/local/jdk1.6.0_02/jre
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

So it seems a genuine limitation...

HTH,



-
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]
  


--

Alexey N. Solofnenko <http://trelony.cjb.net/>
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat and path with pound sign (#) -> ClassNotFoundException

2007-08-09 Thread Alexey Solofnenko
Try running "bash -x catalina.sh run" to see if Java is started 
correctly. If it is not, try running the same command from a normal 
directory, and run the same command yourself without using scripts 
provided with Tomcat.


- Alexey.

Markus Schiegl wrote:

Hi,

you're right about # as a special char for different programming
languages. but nevertheless the # sign is a valid character for
directory and file names (in contrast to * or / for example) for unix
and windows. If it's wise to use it is another question but sometimes
it's just beyond your control.

The same problem (# in directory name) and error message
(ClassNotFoundException) happens with Windows XP. Confirms my suspicion
this beeing a Java and/or Tomcat issue.

kind regards,
   Markus

Propes, Barry L wrote:
  

isn't that likely because in some languages like PHP, Python and Perl the # is 
to comment out a line, and it will invariably break the code?
Because I thought some on this list were integrating Tomcat with those 
languages.

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 09, 2007 7:58 AM
To: Tomcat Users List
Subject: Re: Tomcat and path with pound sign (#) ->
ClassNotFoundException


On 8/8/07, Markus Schiegl <[EMAIL PROTECTED]> wrote:



Has anybody been able to start a tomcat server from such a directory?
  

I copied a working installation from /usr/local/apache-tomcat-6.0.13
to /usr/local/apache-tomcat#6.0.13, set CATALINA_HOME and got this:



./bin/catalina.sh run
  

Using CATALINA_BASE:   /usr/local/apache-tomcat#6.0.13
Using CATALINA_HOME:   /usr/local/apache-tomcat#6.0.13
Using CATALINA_TMPDIR: /usr/local/apache-tomcat#6.0.13/temp
Using JRE_HOME:   /usr/local/jdk1.6.0_02/jre
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

So it seems a genuine limitation...

HTH,



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


--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat and path with pound sign (#) -> ClassNotFoundException

2007-08-08 Thread Alexey Solofnenko

Are you allowed to create symbolic links with normal names?

- Alexey.

Markus Schiegl wrote:

Hi there,

starting Tomcat from a path containing a pound sign (#) somewhere
results in a ClassNotFoundException.

I've checked this with
- Solaris Sparc/X86 + Mac OS X
- Java 5 + 6
- Tomcat 5.5.23 + 6.0.13

example:
- mkdir /export/home/markus/tomcat#1
- extract tomcat within this directory
- export JAVA_HOME=/usr/java (JDK 6)
- /export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/startup.sh
  or
  cd /export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin ; ./startup.sh

output from catalina.sh with the java call (added set -x to catalina.sh
- i.e. no problem of the calling script omitting something)

/usr/java/bin/java
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/conf/logging.properties
-Djava.endorsed.dirs=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/endorsed
-classpath
:/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/bootstrap.jar:/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/commons-logging-api.jar
-Dcatalina.base=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
-Dcatalina.home=/export/home/markus/tomcat#1/apache-tomcat-6.0.13
-Djava.io.tmpdir=/export/home/markus/tomcat#1/apache-tomcat-6.0.13/temp
org.apache.catalina.startup.Bootstrap start

$cat catalina.out
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)


truss output: path was truncated after the # sign:

...
2717/2: read(5, "CAFEBABE\0\0\0 1\00701\0".., 142)  = 142
2717/2:
stat64("/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/org/apache/catalina/security/SecurityClassLoad.class",
0xD230ABF0) Err#2 ENOENT
2717/2: llseek(9, 1422, SEEK_SET)   = 1422
2717/2: read(9, " P K0304\n\0\0\0\b\0F91C".., 30)   = 30
2717/2: llseek(9, 1504, SEEK_SET)   = 1504
2717/2: read(9, "95 W k o14 U18 ~ f [DAC3".., 1634) = 1634
2717/2: brk(0x08172F08) = 0
2717/2: brk(0x08176F08) = 0
2717/9: pollsys(0x, 0, 0xCFCA9CD8, 0x)  = 0
2717/2:
stat64("/export/home/markus/tomcat#1/apache-tomcat-6.0.13/bin/org/apache/catalina/startup/Catalina.class",
0xD230B3D0) Err#2 ENOENT
2717/2: stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
ENOENT
2717/2: stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
ENOENT
2717/2: stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
ENOENT
2717/2: stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
ENOENT
2717/3: lwp_cond_wait(0x0806F7A0, 0x0806F788, 0xD208DB48, 0)
(sleeping...)
2717/3: lwp_cond_wait(0x0806F7A0, 0x0806F788, 0xD208DB48, 0)
Err#62 ETIME
2717/9: pollsys(0x, 0, 0xCFCA9CD8, 0x)  = 0
2717/2: stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
ENOENT
2717/2: stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
ENOENT
2717/2: stat64("/export/home/markus/tomcat", 0xD230AA60) Err#2
ENOENT
...

Although there is a rather old but maybe similar bug at:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4231042
i supose somewhere the road this has been fixed, as i have no problems
with JAVA 5/6 and other java programs otherwise my tests where flawed.

Installing the jdk in such a directory (e.g. /opt/java#6) works with
tomcat, too.

Can anybody confirm that "#" is still a special character (for tomcat)?
Unfortunately i'm somewhat forced to place tomcat installations/
instances into such (with #) directories.

Any fix possible?

thanks in advance!

kind regards,
   Markus


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


--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat with 8 GB memory

2007-07-31 Thread Alexey Solofnenko
There can be hidden dependencies on native code. For example, JDBC 
drivers (OCI, ...).  Fortunately there are usually corresponding 64 bit  
libraries available - you just need to update PATH or LD_LIBRARY_PATH.


- Alexey.

Andrew Miehs wrote:

On 31/07/2007, at 2:04 PM, Mohan2005 wrote:



so now we have to identify if our application is 64bit compatible or 
32bit

compatible.



If your application is only JAVA, then no porting is required.

Andrew

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


--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat with 8 GB memory

2007-07-28 Thread Alexey Solofnenko
I can only tell that we run performance testing for our platform and 
found that best performance was achieved by using a separate server per  
user (reusable pool). However the memory requirements were abysmal, so 
we are running two processes in parallel by default achieving good 
performance without requiring much more memory. But unlike [most] web 
applications we have a lot of long lived objects and maybe 
synchronization issues are the major factor in our case. That is why I 
say that only performance tests can say for sure.


- Alexey.

Caldarale, Charles R wrote:
From: Alexey Solofnenko [mailto:[EMAIL PROTECTED] 
Subject: Re: Tomcat with 8 GB memory


No, each of two 4GB processes will have only a half of the 
objects under the same load.



There's a significant amount of objects created by the container and the
webapps that are essentially permanent; with two JVM instances, you now
have two copies of these, not just one.  The number of short-lived
objects in existence during request processing is dependent on the
number of concurrent requests, but not directly on the rate of requests.

  

And I heard that GC does not scale linear with heap size.



This was true in the days of primitive GC algorithms, but the current
ones are little affected by gross heap size.  Having labored under the
old belief myself, I was somewhat surprised when measurements showed
only very minor variations with different heap sizes.  (That probably
has more to do with the lower L1/L2/L3 cache hit rates when using larger
heaps rather than something inherent in the GC algorithms themselves.)

  

And this is without multi-threading performance considerations.



Note that modern GC operations are parallelized, so reducing the number
of CPU resources available by running multiple JVMs causes a given GC to
run longer.  There is little interaction among the parallel GC threads,
so lock conflicts and cache invalidations don't impact GC much.  (Which
says nothing about whether or not a given app can benefit from more CPUs
being available.)

  

As usual, your mileage may vary and only tests can tell for sure.



Most definitely.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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


--

Alexey N. Solofnenko <http://trelony.cjb.net/>
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat with 8 GB memory

2007-07-28 Thread Alexey Solofnenko

The 32 versus 64 bit was discussed on a different branch of this thread.

- Alexey.

Ron Wheeler wrote:
If you read the article that I cited from Microsoft, you will find a 
discussion about 32 bit and 64 bit performance that includes a lot of 
these discussions including why a 64 bit Java Virtual Machine is 
better than a 32 bit version of Java.


A 32 bit OS will limit you to a 2 GB process space which has to 
include all your code and your heaps.
If you are running Tomcat, you just run out of places to put user 
requests and eventually you start to fail to respond to requests.


If you only need to serve a few users, it does not really matter what 
you pick from today's hardware and OS choices.
If you need to support thousands of users making steady streams of 
requests, you want a 64 bit application starting with the hardware and 
going up through the OS to the JVM and the servlet engine.


If you want to actually have Tomcat with 8GB of memory, you need 64 
bits otherwise you are getting Tomcat with 2 Gb memory with 6 GB left 
over.


Read the article. It is a nice change from folklore.

You might also want to find some textbooks on basic Computer Science 
to avoid being misled by foolishness.


Ron



Joe Nathan wrote:

Alexey Solofnenko-2 wrote:
 
No, each of two 4GB processes will have only a half of the objects 
under the same load. And I heard that GC does not scale linear with 
heap size. And this is without multi-threading performance 
considerations.  As usual, your mileage may vary and only tests can 
tell for sure.





It's not easy to measure gc time, especially if it is based on 
generational
gc algorithm which does NOT do gc for all objects. In addition, a 
single gc does not remove all obsolate objects. They are often 
removed at the second or third time gc.
When you test, monitor IO activities as well, potentially stemming 
from virtual memory paging activities. It could be the one that makes

gc much longer.

Generally it's good to minimize object creation and use not too 
UNNECESSARILY large JVM heap. What many people practice

is to recyle objects and threads.

  


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


--

Alexey N. Solofnenko <http://trelony.cjb.net/>
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat with 8 GB memory

2007-07-27 Thread Alexey Solofnenko
No, each of two 4GB processes will have only a half of the objects under 
the same load. And I heard that GC does not scale linear with heap size. 
And this is without multi-threading performance considerations.  As 
usual, your mileage may vary and only tests can tell for sure.


- Alexey.

Caldarale, Charles R wrote:
From: Alexey Solofnenko [mailto:[EMAIL PROTECTED] 
Subject: Re: Tomcat with 8 GB memory


I was under impression that GC does not scale linearly. That 
means one 8GB process will be slower than two 4GB processes.



Not true.  The time of a full GC using modern algorithms depends mostly
on the number and type of live objects, not the amount of heap space.
The number and type of live (reachable) objects stays relatively
constant for most application once the ramp-up period is over.
Consequently, running a single JVM with the largest heap you can fit in
the process space is the most efficient from a GC point of view.  (Of
course, there are plenty of other reasons not to put all your eggs in
one basket.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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


--

Alexey N. Solofnenko <http://trelony.cjb.net/>
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Tomcat with 8 GB memory

2007-07-27 Thread Alexey Solofnenko
I was under impression that GC does not scale linearly. That means one 
8GB process will be slower than two 4GB processes. There are other 
considerations too: multi-threading - global locks will lock less 
threads (maybe in GC, heap, application logic, ...), but cluster 
overhead may be noticeable too.


- Alexey.

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lightbulb,

lightbulb432 wrote:
  

If you have a gigantic server with something like 8 GB of memory, what would
be the best way to run Tomcat 6 on it? One instance, multiple instances, or
divide it up into two or more virtualized servers each with one instance?



Unless you have concerns about stability of TC6 or your own application,
one big JVM with a ton of threads would be my recommendation.
Virtualization or multiple TC instances only adds overhead with no other
real benefit. (If you run multiple applications, multiple TC instances
might make sense).

  

Is Tomcat meant to run as one instance with that much memory, or is it
optimized for a different amount of memory?



Tomcat shouldn't care. I think that thread synchronization is faster
than full context switching, but that can be very sensitive to the
platform, OS, and tuning parameters you might have (in the OS). Java is
perfectly happy to run with 8GB.

  

I realize with the options I mentioned above there are implications
regarding high-availability and performance, but I'm not sure exactly what
they'd be. Perhaps someone with more knowledge of this kind of stuff could
comment.



If you trust your operating system (I would trust any UNIX and UNIX-like
OS, and Windows is somewhat dependable if you don't ask it to do too
many things), then a single instance of the OS on a lot of hardware is
just fine: go for it.

If you are concerned about your OS's stability, then by all means run
multiple instances of the OS and load balance between. From a strict
performance standpoint, less is more, so stick to one OS and one Tomcat
instance on that big, fat machine.

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

iD8DBQFGqOyq9CaO5/Lv0PARAlTDAJwKFLgizNh/MatDmEupjdLvLvvDWgCfbHSj
XLO50tctVgV5w+N/qwYYZEQ=
=DJLh
-END PGP SIGNATURE-

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


--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature