Re: Archive Download

2009-01-22 Thread Ben Walter
Never mindappears to be issue with smb share module on Linux or Windows 
access to smb on Linux

>>> 

From: "Ben Walter" 
To:
Date: 23/01/2009 8:03 p.m.
Subject: Archive Download
Hi,

I've been trying to download 
http://archive.apache.org/dist/tomcat/tomcat-5/v5.0.30/bin/jakarta-tomcat-5.0.30.exe
 with two different browsers, no proxy, and it only gets to 4.69MB before 
stopping and claiming the download is complete.

I need v5.0.30 for Windows to do some bug testing...




Sincerely,

Ben Walter
Technical Specialist
Mobile: +64 (21) 0227 1484
www.scorpiogeek.net.nz


Archive Download

2009-01-22 Thread Ben Walter
Hi,
 
I've been trying to download 
http://archive.apache.org/dist/tomcat/tomcat-5/v5.0.30/bin/jakarta-tomcat-5.0.30.exe
 with two different browsers, no proxy, and it only gets to 4.69MB before 
stopping and claiming the download is complete.
 
I need v5.0.30 for Windows to do some bug testing...
 
 
 
 
Sincerely,
 
Ben Walter
Technical Specialist
Mobile: +64 (21) 0227 1484
www.scorpiogeek.net.nz


RE: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-22 Thread Caldarale, Charles R
> From: Michael Ludwig [mailto:mil...@gmx.de]
> Subject: Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)
>
> Turns out the Tomcat service does not disregard the PATH. It needs the
> directory in the PATH, and *in addition* to be present in the PATH the
> directory has to be included in the Java property java.library.path.

Something's definitely wrong here; there shouldn't be any reason to have to 
specify the library twice.  The Windows version of the JVM initialization code 
only looks at PATH if the java.library.path system property has not been set to 
anything; there's no code anywhere that I'm aware of that will concatenate PATH 
and java.library.path.

If you don't mind running another experiment, please start Tomcat as a service 
once with and once without the -Djava.library.path setting in the Java tab of 
tomcat6w.exe, and use LambdaProbe or JConsole to examine the system properties. 
 If -Djava.library.path is not set, you should see the system property set to 
the PATH value prefixed with Tomcat's bin directory and the current directory 
(.); if -Djava.library.path is set, the system property should be just the 
value from the -D.  If you're seeing something different than the above, 
there's probably a typo somewhere, so please post what the diagnostic tools 
display.

(Just for reference, I'm using Tomcat 6.0.18 and JDK 1.6.0_11 on Vista 64.)

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-22 Thread Konstantin Kolinko
Hi, Michael.

I am glad to hear that you solved this.

>
> Hmm. Apparently, the directory hadn't been in the PATH the moment
> the SYSTEM account took a copy of it. Maybe SYSTEM doesn't read the
> environment again later on. It may only get to see updates to the PATH
> after a reboot. Or some other trick.
>
> On the other hand, Tomcat running as a service under the SYSTEM account
> should disregard the PATH, as far as I know and have heard so far.
>
> I did a reboot.
>
> Turns out the Tomcat service does not disregard the PATH. It needs the
> directory in the PATH, and *in addition* to be present in the PATH the
> directory has to be included in the Java property java.library.path.
> Nota bene, in addition to, but not in place of the PATH.
>
> So this is solved for me. But is this the correct behaviour?
>

I think that the answer is (and your solution proves this) that the statement
that service does not need environment variables is not 100% true.

That is, if you compare *.bat/*.sh with how the service is started, you can
see that  *.bat/*.sh processes some env variables and builds up a java -jar
command from those variables. The service launcher from the other hand,
launches that jar directly, thus you have to configure all the arguments
explicitly, and not relying on the env variables. It is those vars that are
not needed.

If I remember correctly, the PATH variable is respected by the Win32 API
that loads the dll libraries. Thus the behavior that you had to include that
folder into the PATH. Win32 API help should provide more information.

http://msdn.microsoft.com/en-us/library/ms684175(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx

Best regards,
Konstantin Kolinko

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



Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)

2009-01-22 Thread Michael Ludwig
Konstantin Kolinko schrieb am 22.01.2009 um 07:51:16 (+0300):
> 2009/1/22 Michael Ludwig :
> > But I'm assured by the developers that:
> >   "The Java API for DB XML begins by first trying to load the
> >   release versions of the libraries, and failing that then tries
> >   to load the debug versions. If it fails to find both versions
> >   then the UnsatisfiedLinkError is thrown listing the release
> >   library, even though it did look for the debug library."
> 
> Should be relatively easy to check: try to reproduce the error
> with release versions of those libraries.

Thanks Konstantin.

Hmm. I tried to build the release versions (in Visual C++ 2005 Express)
setting "Properties > Configuration" to "Release" instead of "Debug".
Unfortunately, however, it has produced the debug version again, and
when checking the Properties, I can see that the Configuration has gone
back to Debug. I don't know VS very well and I don't feel like pursuing
this error now.

> > C:\src\BerkeleyDbXml\dbxml-2.4.16\bin\debug>notepad libdb_java46d.dll
> >
> > This works, I can see the DLL in notepad. So the Local System
> > account can read the files.
> 
> How about other DLLs that that DLL loads?

I can open those from the SYSTEM shell just as well.

Other native libraries (like Oracle XE driver) load fine in the Tomcat
Service.

> Can you run a standalone Java program that loads those libraries or
> run startup.bat from that command prompt window?

After adding the directory in question to the PATH, both the standalone
program and the Tomcat via startup.bat (which relies on the PATH) work
fine from the SYSTEM shell.

> Also, though maybe not relevant for this very error, but for reference:
> http://wiki.apache.org/tomcat/HowTo#head-a4b7185ee95d0cf14a48f92c08d1eb66b561139d

I'm aware of this. The JARs are made available only to the
"common.loader" in "catalina.properties".

Hmm. Apparently, the directory hadn't been in the PATH the moment
the SYSTEM account took a copy of it. Maybe SYSTEM doesn't read the
environment again later on. It may only get to see updates to the PATH
after a reboot. Or some other trick.

On the other hand, Tomcat running as a service under the SYSTEM account
should disregard the PATH, as far as I know and have heard so far.

I did a reboot.

Turns out the Tomcat service does not disregard the PATH. It needs the
directory in the PATH, and *in addition* to be present in the PATH the
directory has to be included in the Java property java.library.path.
Nota bene, in addition to, but not in place of the PATH.

So this is solved for me. But is this the correct behaviour?

Michael

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



Re: IIS6, Tomcat 6.0, ISAPI redirector 1.2.27 - no log on one server

2009-01-22 Thread ManiacCoder

Yes, I have verified that the user account under which the Tomcat service is
running has the same permissions on all platforms, as well as the web and
pool users for the IIS web site.
-- 
View this message in context: 
http://www.nabble.com/IIS6%2C-Tomcat-6.0%2C-ISAPI-redirector-1.2.27---no-log-on-one-server-tp21597358p21616665.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Configuring alternate host and port on Tomcat server - newbie question

2009-01-22 Thread Caldarale, Charles R
> From: Shyam Anand [mailto:struts_new...@yahoo.com]
> Subject: Configuring alternate host and port on Tomcat server
> - newbie question
>
> I would like to configure the second instance
> to work with a secondary IP/alternate host and
> port 443 on the same machine.

By default, Tomcat listens on IP address 0.0.0.0, meaning every IP address 
configured for the TCP/IP stack on the system.  You'll need to set the address 
attribute of all  elements for each Tomcat to use the specific IP 
address you want for each one.
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html#Standard%20Implementation

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Configuring alternate host and port on Tomcat server - newbie question

2009-01-22 Thread Shyam Anand
Hi,
I'm running Tomcat 5.5 on a Solaris(SunOS 5.10 )box. I have a couple of 
instances of Tomcat web servers running on the same machine - the first one 
uses the primary IP/localhost and port 443, and I would like to configure the 
second instance to work with a secondary IP/alternate host and port 443 on the 
same machine. I looked at the  configuration files under the $TOMCAT_HOME/conf 
directory and noticed references to the default local host in the following 
files:
server.xml
server-minimal.xml
workers.properties
workers2.properties
logging.properties
---
In order to configure the alternate host, do I just need to replace all 
references to "localhost" with the corresponding DNS entry for my alternate 
host manually?
Or is it easier to do this through the Admin web page by creating a new host 
and new connector? I don't see any options to edit entries for the default host 
and connector - is this possible?

Could somebody let me know what is the best way to accomplish my task?

Any help/suggestions or pointers to the right documentation will be greatly 
appreciated.

Thanks,
Shyam



  

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



RE: GenericType error?

2009-01-22 Thread Caldarale, Charles R
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com]
> Subject: Re: GenericType error?

> Well I do need to get my wisdom teeth removed ;)

I did that 35 years ago; nothing to look forward to, other than to get it over 
with.

> I don't see how this is relevant though.

It was relevant (before you provided additional information), since some 
language constructs are only available in 1.5 or 1.6 JREs.

> The fact that it works on an exact clone of the
> production box seems to me to point to corruption
> in the Tomcat distribution

Which says the clone isn't quite "exact".  Are you by any chance accidentally 
using gcj on the failing system?

> (temp/ or work/ dirs maybe?).

You can always clean out those directories completely and see if it has an 
effect.

> This project works on my Windows machine ( I
> run it inside of Netbeans).

What happens if you run Tomcat directly on the Windows box, not from NetBeans?

> Btw, other aspects of the project are working correctly,
> just blah.jsp seems to be the problem.

Can you post at least the part of blah.jsp around line 28, if not all of it?

What happens if you try to pre-compile blah.jsp?
http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html#Web%20Application%20Compilation

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: GenericType error?

2009-01-22 Thread Jonathan Mast
Well I do need to get my wisdom teeth removed ;)

Linux: Slackware 10.2.0
Tomcat: as downloaded from tomcat.apache.org
Windows: XP service pack 2, Netbeans 6.5, Tomcat 5.5, the project has its
Source code and JVM level set to 1.4.2, which is installed along with 1.5,
and 1.6.

I don't see how this is relevant though.  This project been developed in on
this machine since day 1.  The fact that it works on an exact clone of the
production box seems to me to point to corruption in the Tomcat distribution
(temp/ or work/ dirs maybe?).

Furthermore here is the deployment sequence (again this has been standard
procedure for months now):
kill httpd and tomcat
wait until all its thread have died
rm -r apache/htdocs/blah
rm -r tomcat/work/Catalina/www.mysite.com/blah/
build blah
restart httpd + tomcat

Btw, other aspects of the project are working correctly, just blah.jsp seems
to be the problem.

Another thing: 2 contexts are pointing to blah, again nothing new here. (and
i'm deleting the work/ dir for both)

Thanks for enduring

On Thu, Jan 22, 2009 at 4:15 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Jonathan Mast [mailto:jhmast.develo...@gmail.com]
> > Subject: Re: GenericType error?
> >
> > Sorry:
> >
> > OS: linux
> > JVM: 1.4.2
> > Tomcat: 5.5.17
>
> (This is like pulling teeth.)
>
> Which Linux?  Is it a real Tomcat, or a 3rd-party repackaged one?
>
> Which Windows is the compilation working on?  Which Tomcat and JVM is
> installed on the Windows box?
>
>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Facing “Javax.servlet.servletException: cannot connect to windows server”. error

2009-01-22 Thread prakash shanmugam
Dear kees Jan koster,

   I had visited the link suggested by you, please let me know how to
change the java property "-Djava.awt.headless=true"

   Is it just enough to type the command prompt?
with regards
prakash.s

On Fri, Jan 23, 2009 at 1:56 AM, Kees Jan Koster  wrote:

> Dear S.Prakash,
>
>
>I am using jrxml for preparing the reports in excel files. It is
>> working fine in windows but if the same is implemented (server)MAC OS
>> tomcat
>> I am facing  "Javax.servlet.servletException: cannot connect to windows
>> server – not enough".
>>
>> I am using Tomcat 5.5.28 as server, MYsql as database and MAC(Tiger)
>> as OS. Please suggest to over come this issue.
>>
>
>
> Have you considered trying to use "-Djava.awt.headless=true" and "unset
> DISPLAY"? http://java-monitor.com/forum/showthread.php?t=3
> --
> Kees Jan
>
> http://java-monitor.com/forum/
> kjkos...@kjkoster.org
> 06-51838192
>
> Human beings make life so interesting. Do you know that in a universe so
> full of wonders,
> they have managed to invent boredom. Quite astonishing... -- Terry
> Pratchett
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: PostgreSQL vs MySQL with Tomcat

2009-01-22 Thread Jonathan Mast
Perhaps the discussion should move back towards how Tomcat interacts with
databases.

This thread seems to be damning MySQL for not having super advanced
features, some of which should perhaps not even be in the purview of the
database layer, but more appropriately belong at the application layer (ie.
Tomcat).

For example, I rewrote a report generator for my company.  The existing
generator, a PHP + MySQL setup, was insanely slow and difficult to maintain
being that it consisted of 1 php page containing hundreds of lines of code.
I rewrote it in jsp + POJO and the new version runs much faster, because it
doesn't have a single query with a JOIN clause in it.  The old generator had
super complex queries that took forever to run and placed an enormous amount
of load on the database server.  I achieved that same result of a JOIN by
pushing that functionality up to the Java layer.

Sure we can argue about which DBMS has the fastest JOINs but nonetheless it
remains that JOIN queries will always be computationally expensive compared
to single table queries.

Well thats my 2 cents :)

On Thu, Jan 22, 2009 at 7:39 AM, Jim Cox  wrote:

> When creating tables with referential integrity in MySQL you still get gems
> like, e.g.:
>
>  mysql> create table jimtest ( colA  varchar(32) NOT NULL, CONSTRAINT fk1
> FOREIGN KEY(colA) REFERENCES jimtest2(colA) ON DELETE CASCADE );
> ERROR 1005 (HY000): Can't create table './test/jimtest.frm' (errno: 150)
>
> Same indecipherable error for non-existent referenced table, or column type
> mismatch, or a missing index. Admittedly, you learn what to look for after
> a
> while, but the error message sucks.
>
>
> On Wed, Jan 21, 2009 at 11:06 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Rusty,
> >
> > Rusty Wright wrote:
> > > I think the biggest gripe I've had with mysql is the problem where I
> was
> > > violating a unique constraint and it was giving me some generic
> > > (completely useless) error; HY001 I think.
> >
> > I've always found the error messages themselves very informative. For
> > instance, if I attempt to insert a record into a table with an FK that
> > doesn't match, MySQL's command-line interface gives me this message:
> >
> > ERROR 1452 (23000): Cannot add or update a child row: a foreign key
> > constraint fails (`database/target_table`, CONSTRAINT
> > `name_of_foreign_key_constraint` FOREIGN KEY (`column_name`) REFERENCES
> > `source_table` (`column_name`))
> >
> > Perhaps Connector/J doesn't give quite such useful error messages, but I
> > seem to recall something nice like "Foreign key constraint check failed".
> >
> > I have found that every database has stupid error codes and you
> > basically have to code your app around tables of db-specific error codes
> > if you want to give your users (or log files) anything better than the
> > driver-supplied error messages.
> >
> > - -chris
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.9 (MingW32)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iEYEARECAAYFAkl38NUACgkQ9CaO5/Lv0PCwAgCggKgAfu/ZZ+ClRAGtEuM4+xyK
> > e7EAn0R/4fyPgBfhxSB51um5ZW63jZzL
> > =xo6L
> > -END PGP SIGNATURE-
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>


Re: Facing “Javax.servlet.servletException: cannot connect to windows server”. error

2009-01-22 Thread prakash shanmugam
Hai martin,

 I am using Tomcat 5.5.28 in MAC (Tiger) which is running at 9090
port, since 8080 already configured for another server we had changed the
port to 9090 in server.xml and MYsql is running at 3306 port.
with regards
prakash.s

On Thu, Jan 22, 2009 at 8:22 AM, Martin Gainty  wrote:

>
> Prakash-
>
> are your interfaces up and running?
> ifconfig -a
>
> also make sure the ports are not already bound specifically 3306 for MySQL
> and 8080 for TC
>
> HTH
> Martin
> __
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
>
>
> > Date: Thu, 22 Jan 2009 06:28:42 +0530
> > Subject: Facing "Javax.servlet.servletException: cannot connect to
> windows server". error
> > From: prakash...@gmail.com
> > To: users@tomcat.apache.org
> >
> > Hai all,
> >
> > I am using jrxml for preparing the reports in excel files. It
> is
> > working fine in windows but if the same is implemented (server)MAC OS
> tomcat
> > I am facing  "Javax.servlet.servletException: cannot connect to windows
> > server – not enough".
> >
> >   I am using Tomcat 5.5.28 as server, MYsql as database and
> MAC(Tiger)
> > as OS. Please suggest to over come this issue.
> >
> >
> > --
> > with Regards
> > S.Prakash
>
> _
> Hotmail(R) goes where you go. On a PC, on the Web, on your phone.
>
> http://www.windowslive-hotmail.com/learnmore/versatility.aspx#mobile?ocid=TXT_TAGHM_WL_HM_versatility_121208
>


Re: SECURITY breach in Tomcat

2009-01-22 Thread Toby Kurien
thanks. I only need ROOT and myApp (which is my application). I am the
developer, admin, everything. And yes, we moved between physical
server racks that actually host Virtual environments.

On Thu, Jan 22, 2009 at 3:15 PM, Gregor Schneider  wrote:
>>
>> Moving servers mean we moved it physically from one box to another. IP
>> and DNS stays the same when we move.
>> Btw: Can I take off all the apps from webapps, except ROOT and myApp?
>> Hacker or virus is probably exploiting some vulnerability in them. As
>> of now, tomcat is running after restarting the whole box, but I am
>> afraid if it will shutdown or crash.
>>
>
> box == server-rack?
>
> Since I got no idea of your application's structure, I can't give you
> any advice of what to remove and what to keep.
>
> Just that much:
>
> ROOT.war ist the default application when you call your server i.e. at
> www.yourserver.com.
>
> Provided myApp.war is a known application, *theoretically* it might be
> possible that it needs additional apps, if it uses servlet-chaing
> etc..
>
> It might be helpful if you could post the result of
>
> cd [Tomcat-Installation-Directory]
> dir -s
>
> The best method actually would be if you contact the developer of the
> application(s) hosted, ask them about what they expect within their
> application-directories and remove the rest.
>
> Toby, I'm afraid I'll have to call it a day now, however, since the
> guys from the US should be about to wake up after yesterday's
> inauguration-party, I'm pretty sure they will help you to get your
> feet back on the ground.
>
> I'll check the list tomorrow anyways.
>
> Good luck!
>
> Gregor
> --
> just because your paranoid, doesn't mean they're not after you...
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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




RE: GenericType error?

2009-01-22 Thread Caldarale, Charles R
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com]
> Subject: Re: GenericType error?
>
> Sorry:
>
> OS: linux
> JVM: 1.4.2
> Tomcat: 5.5.17

(This is like pulling teeth.)

Which Linux?  Is it a real Tomcat, or a 3rd-party repackaged one?

Which Windows is the compilation working on?  Which Tomcat and JVM is installed 
on the Windows box?

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: GenericType error?

2009-01-22 Thread Jonathan Mast
Sorry:

OS: linux
JVM: 1.4.2
Tomcat: 5.5.17


On Thu, Jan 22, 2009 at 4:03 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Jonathan Mast [mailto:jhmast.develo...@gmail.com]
> > Subject: GenericType error?
>
> > What is causing this error?
>
> It's caused by not telling us anything about the Tomcat version or the JVM
> you're using, and precious little about the platforms you're running on.
>
>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: GenericType error?

2009-01-22 Thread Caldarale, Charles R
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com]
> Subject: GenericType error?

> What is causing this error?

It's caused by not telling us anything about the Tomcat version or the JVM 
you're using, and precious little about the platforms you're running on.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



GenericType error?

2009-01-22 Thread Jonathan Mast
I have a webapp that is giving me this error:

description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 28 in the jsp file: /blah.jsp
Generated servlet error:
Syntax error on tokens, GenericType expected instead

An error occurred at line: 28 in the jsp file: /blah.jsp
Generated servlet error:
Syntax error on token ".", ; expected

An error occurred at line: 28 in the jsp file: /blah.jsp
Generated servlet error:
Syntax error on tokens, Expression expected instead

An error occurred at line: 28 in the jsp file: /blah.jsp
Generated servlet error:
Syntax error on tokens, delete these tokens


org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

. and so on

Line 28 happens to correspond to the beginning of the Scriptlet expression
in blah.jsp

This project works on my Windows machine ( I run it inside of Netbeans).  It
also works on a clone of the production machine.

What is causing this error?

Thanks


Re: Facing “Javax.servlet.servletException: c annot connect to windows server”. error

2009-01-22 Thread Kees Jan Koster

Dear S.Prakash,

   I am using jrxml for preparing the reports in excel  
files. It is
working fine in windows but if the same is implemented (server)MAC  
OS tomcat
I am facing  "Javax.servlet.servletException: cannot connect to  
windows

server – not enough".

 I am using Tomcat 5.5.28 as server, MYsql as database and  
MAC(Tiger)

as OS. Please suggest to over come this issue.



Have you considered trying to use "-Djava.awt.headless=true" and  
"unset DISPLAY"? http://java-monitor.com/forum/showthread.php?t=3

--
Kees Jan

http://java-monitor.com/forum/
kjkos...@kjkoster.org
06-51838192

Human beings make life so interesting. Do you know that in a universe  
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry  
Pratchett



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



Re: Tomcat shutdown script initiates Heap dump collection

2009-01-22 Thread Prakash Nathan1

Hi Andre

I could not execute the following in my production server
echo "catalina.sh : JAVA_OPTS = $JAVA_OPTS" > /var/log/tomcat_debug_file.log

Here is how I start the tomcat services
/opt/app/tomcat/public1/bin/startup.sh

I was checking all the file the "startup.sh" uses

startup.sh includes catalina.sh
catalina.sh includes setenv.sh and setclasspath.sh

However, I dont see any JAVA_OPTS parameter defined. 
I believe, this is a optional parameter and it is not defined in our
environment. your views ?

Could you please let me know the relation between JAVA_OPTS and the heap
dump collection?

Thanks
-- 
View this message in context: 
http://www.nabble.com/Tomcat-shutdown-script-initiates-Heap-dump-collection-tp21421003p21612325.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: SECURITY breach in Tomcat

2009-01-22 Thread Gregor Schneider
>
> Moving servers mean we moved it physically from one box to another. IP
> and DNS stays the same when we move.
> Btw: Can I take off all the apps from webapps, except ROOT and myApp?
> Hacker or virus is probably exploiting some vulnerability in them. As
> of now, tomcat is running after restarting the whole box, but I am
> afraid if it will shutdown or crash.
>

box == server-rack?

Since I got no idea of your application's structure, I can't give you
any advice of what to remove and what to keep.

Just that much:

ROOT.war ist the default application when you call your server i.e. at
www.yourserver.com.

Provided myApp.war is a known application, *theoretically* it might be
possible that it needs additional apps, if it uses servlet-chaing
etc..

It might be helpful if you could post the result of

cd [Tomcat-Installation-Directory]
dir -s

The best method actually would be if you contact the developer of the
application(s) hosted, ask them about what they expect within their
application-directories and remove the rest.

Toby, I'm afraid I'll have to call it a day now, however, since the
guys from the US should be about to wake up after yesterday's
inauguration-party, I'm pretty sure they will help you to get your
feet back on the ground.

I'll check the list tomorrow anyways.

Good luck!

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: SECURITY breach in Tomcat

2009-01-22 Thread Len Popp
Yes, you should remove all other webapps ("manager", "examples", etc.)
You can remove ROOT too, unless you've put files in there that you
need to serve.
-- 
Len



On Thu, Jan 22, 2009 at 14:50, Toby Kurien  wrote:
> Yea, I rebuild server from scratch. Fortunately, we have virtual
> machines so we can revert to a factory build by just reverting to a
> snapshot. That is same as moving to a fresh OS without anything
> installed.
>
> Moving servers mean we moved it physically from one box to another. IP
> and DNS stays the same when we move.
> Btw: Can I take off all the apps from webapps, except ROOT and myApp?
> Hacker or virus is probably exploiting some vulnerability in them. As
> of now, tomcat is running after restarting the whole box, but I am
> afraid if it will shutdown or crash.
>
> Thanks to all who are contributing.
>
> On Thu, Jan 22, 2009 at 12:14 PM, Gregor Schneider
>  wrote:
>> Toby,
>>
>> On Thu, Jan 22, 2009 at 5:27 PM, Toby Kurien  wrote:
>>> Thanks Gregor. We are looking at setting up in Linux, but that is
>>> going to take longer to get a LIVE environment up and running. I have
>>> in the past already setup Tomcat from scratch 2-3 times and the
>>> infection just keeps coming. Only open port is 80 and network access
>>> is disabled.
>>>
>>
>> Did you setup Tomcat only or did you setup the complete server incl.
>> the OS (Windows)?
>>
>> I know setting up the server from scratch is a PITA, however, I
>> believe you don't have any other choice.
>>
>> In Windows, the virus usually will reside somewhere outside from Tomcat.
>>
>> Therefore, you should set up the OS first (preferably from CD/DVD)
>> then a fresh JDK download, then a fresh Tomcat-Download.
>> You shoudl also check the integrity of the downloads, FOr Tomcat,
>> that's pretty easy (see http://tomcat.apache.org/download-60.cgi,
>> "Release Integrity"), for the JDK, however, I'm not aware of any
>> integrity-check.
>>
>>> In fact, one of my previous builds on another machine
>>> that was similarly infected, now stops showing signs of it after we
>>> moved the server. So it seems the DNS (url) is compromised and only
>>> that machine is hacked/infected into.
>>>
>>
>> What exactly do you mean by "moved the server"? Did you assign a different 
>> IP?
>>
>> Gregor
>> --
>> just because your paranoid, doesn't mean they're not after you...
>> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
>> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: SECURITY breach in Tomcat

2009-01-22 Thread Toby Kurien
Yea, I rebuild server from scratch. Fortunately, we have virtual
machines so we can revert to a factory build by just reverting to a
snapshot. That is same as moving to a fresh OS without anything
installed.

Moving servers mean we moved it physically from one box to another. IP
and DNS stays the same when we move.
Btw: Can I take off all the apps from webapps, except ROOT and myApp?
Hacker or virus is probably exploiting some vulnerability in them. As
of now, tomcat is running after restarting the whole box, but I am
afraid if it will shutdown or crash.

Thanks to all who are contributing.

On Thu, Jan 22, 2009 at 12:14 PM, Gregor Schneider
 wrote:
> Toby,
>
> On Thu, Jan 22, 2009 at 5:27 PM, Toby Kurien  wrote:
>> Thanks Gregor. We are looking at setting up in Linux, but that is
>> going to take longer to get a LIVE environment up and running. I have
>> in the past already setup Tomcat from scratch 2-3 times and the
>> infection just keeps coming. Only open port is 80 and network access
>> is disabled.
>>
>
> Did you setup Tomcat only or did you setup the complete server incl.
> the OS (Windows)?
>
> I know setting up the server from scratch is a PITA, however, I
> believe you don't have any other choice.
>
> In Windows, the virus usually will reside somewhere outside from Tomcat.
>
> Therefore, you should set up the OS first (preferably from CD/DVD)
> then a fresh JDK download, then a fresh Tomcat-Download.
> You shoudl also check the integrity of the downloads, FOr Tomcat,
> that's pretty easy (see http://tomcat.apache.org/download-60.cgi,
> "Release Integrity"), for the JDK, however, I'm not aware of any
> integrity-check.
>
>> In fact, one of my previous builds on another machine
>> that was similarly infected, now stops showing signs of it after we
>> moved the server. So it seems the DNS (url) is compromised and only
>> that machine is hacked/infected into.
>>
>
> What exactly do you mean by "moved the server"? Did you assign a different IP?
>
> Gregor
> --
> just because your paranoid, doesn't mean they're not after you...
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



TCP connections and HTTP sessions

2009-01-22 Thread tovaldez
Hi,
monitoring our webapp while running load testing, I noticed that the number of 
the effective users browsing the site is more than the number of opened sockets 
in ESTABLISHED state (while under a 240 Virtual Users load, I see only 180 
ESTABLISHED connections, or 2000VU vs 450 opened sockets).

At first I think this is due to some TCP socket reuse optimization by the JVM 
or the OS. Could someone confirm this idea or give me another interpretation of 
this behaviour?

Tomcat 5.5, default HTTP/1.1 connector with sun JDK 1.5 on a Debian 4.0 box, 
jmeter as test tool.
This is the configuration of the onnector: 



Thanks


Re: SECURITY breach in Tomcat

2009-01-22 Thread Gregor Schneider
Toby,

On Thu, Jan 22, 2009 at 5:27 PM, Toby Kurien  wrote:
> Thanks Gregor. We are looking at setting up in Linux, but that is
> going to take longer to get a LIVE environment up and running. I have
> in the past already setup Tomcat from scratch 2-3 times and the
> infection just keeps coming. Only open port is 80 and network access
> is disabled.
>

Did you setup Tomcat only or did you setup the complete server incl.
the OS (Windows)?

I know setting up the server from scratch is a PITA, however, I
believe you don't have any other choice.

In Windows, the virus usually will reside somewhere outside from Tomcat.

Therefore, you should set up the OS first (preferably from CD/DVD)
then a fresh JDK download, then a fresh Tomcat-Download.
You shoudl also check the integrity of the downloads, FOr Tomcat,
that's pretty easy (see http://tomcat.apache.org/download-60.cgi,
"Release Integrity"), for the JDK, however, I'm not aware of any
integrity-check.

> In fact, one of my previous builds on another machine
> that was similarly infected, now stops showing signs of it after we
> moved the server. So it seems the DNS (url) is compromised and only
> that machine is hacked/infected into.
>

What exactly do you mean by "moved the server"? Did you assign a different IP?

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: SECURITY breach in Tomcat

2009-01-22 Thread Brian Clark
I suggest removing all of the bundled web apps (in the webapps folder), 
including root, manager and host-manager. 

Also, upgrade your JVM to the latest 1.5.x version, which I think is 1.5.15 or 
something like that. 

Finally, scan your app/system for vulnerabilities with something like these:
https://www.mcafeesecure.com
http://www.alertsite.com/security.shtml
http://www.qualys.com/index.php

Qualys and Alertsite have free trials. I suggest you use them. They may also be 
able to find a hole in your own web apps as your problem may not be in Tomcat, 
the JVM or the OS. 

Brian





From: Len Popp 
To: Tomcat Users List 
Sent: Thursday, January 22, 2009 10:27:31 AM
Subject: Re: SECURITY breach in Tomcat

This sounds like an attack that has been seen before:
http://markmail.org/message/jrqw75yw3d3xh3p6
That message also has tips on tightening security.
In those cases it seems that the security hole was a weak password for
the manager webapp.
-- 
Len



On Thu, Jan 22, 2009 at 10:16, Toby Kurien  wrote:
> Hi,
> I have a webapp for my company that has been running for several
> years. Recently, we got infected by a trojan or virus and this has
> been causing a lot of abnormal behavior. The trojan creates user
> accounts in Windows and also creates web applications like safee.war
> and zhu.war into the webapps folder of Tomcat and also shuts down
> Tomcat. The trojan webapps have jsp and exe files which try to modify,
> copy and delete files in the system and also try to access the
> database. Symantec and Norton have not been able to rectify or detect
> much.
> I am totally at loss on what's going on and how to tighten or rectify
> this. Anyone with any ideas is highly appreciated.
>
> Thanks,
> -Toby
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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


  

Re: SECURITY breach in Tomcat

2009-01-22 Thread Len Popp
This sounds like an attack that has been seen before:
http://markmail.org/message/jrqw75yw3d3xh3p6
That message also has tips on tightening security.
In those cases it seems that the security hole was a weak password for
the manager webapp.
-- 
Len



On Thu, Jan 22, 2009 at 10:16, Toby Kurien  wrote:
> Hi,
> I have a webapp for my company that has been running for several
> years. Recently, we got infected by a trojan or virus and this has
> been causing a lot of abnormal behavior. The trojan creates user
> accounts in Windows and also creates web applications like safee.war
> and zhu.war into the webapps folder of Tomcat and also shuts down
> Tomcat. The trojan webapps have jsp and exe files which try to modify,
> copy and delete files in the system and also try to access the
> database. Symantec and Norton have not been able to rectify or detect
> much.
> I am totally at loss on what's going on and how to tighten or rectify
> this. Anyone with any ideas is highly appreciated.
>
> Thanks,
> -Toby
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: SECURITY breach in Tomcat

2009-01-22 Thread Toby Kurien
Thanks Gregor. We are looking at setting up in Linux, but that is
going to take longer to get a LIVE environment up and running. I have
in the past already setup Tomcat from scratch 2-3 times and the
infection just keeps coming. Only open port is 80 and network access
is disabled. In fact, one of my previous builds on another machine
that was similarly infected, now stops showing signs of it after we
moved the server. So it seems the DNS (url) is compromised and only
that machine is hacked/infected into.

On Thu, Jan 22, 2009 at 11:17 AM, Gregor Schneider
 wrote:
> On Thu, Jan 22, 2009 at 4:39 PM, Toby Kurien  wrote:
>
>> [ Tomcat hacked ]
>
> Basic lesson concerning security:
>
> If a system is once compromised, there is only one option:
>
> Dump it and set it up vanilla.
>
> Why?
>
> It's because you have no idea what additional malware has been
> installed be the initial bandit.
>
> There are hints that conficker (the latest worm everybody is talking
> about) abuses not only the known weaknesses which should have been
> closed by the latest patches but also additional ones.
>
> Therefore:
>
> - get a BIG can of coffee, tell your sweetheart, it's gonna be late tonite
>
> - take your server off the network
>
> - save your Tomcat-configs
>
> - scrutinize your configs carefully
>
> - set up your server from scratch (vanilla)
>
> - set up Tomcat from a vanilla download
>
> - adapt the Tomcat-configs so that they match the previous ones
>
> - if the manager-app is really necessary, change the password
>
> - re-install your webapps from your sources (backups might also have
> been compromised
>
> The next advise might sound a bit arrogant, however, I believe it's
> the best one you can get:
>
> Use some OS other than windows.
>
> HTH
>
> Gregor
> --
> just because your paranoid, doesn't mean they're not after you...
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: SECURITY breach in Tomcat

2009-01-22 Thread Gregor Schneider
On Thu, Jan 22, 2009 at 4:39 PM, Toby Kurien  wrote:

> [ Tomcat hacked ]

Basic lesson concerning security:

If a system is once compromised, there is only one option:

Dump it and set it up vanilla.

Why?

It's because you have no idea what additional malware has been
installed be the initial bandit.

There are hints that conficker (the latest worm everybody is talking
about) abuses not only the known weaknesses which should have been
closed by the latest patches but also additional ones.

Therefore:

- get a BIG can of coffee, tell your sweetheart, it's gonna be late tonite

- take your server off the network

- save your Tomcat-configs

- scrutinize your configs carefully

- set up your server from scratch (vanilla)

- set up Tomcat from a vanilla download

- adapt the Tomcat-configs so that they match the previous ones

- if the manager-app is really necessary, change the password

- re-install your webapps from your sources (backups might also have
been compromised

The next advise might sound a bit arrogant, however, I believe it's
the best one you can get:

Use some OS other than windows.

HTH

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: SECURITY breach in Tomcat

2009-01-22 Thread Toby Kurien
Tomcat is 6.0.18
JVM is 1.5.0_12-b04
Windows Server 2003
We got the latest patches from Microsoft regarding some similar
security breaches.

On Thu, Jan 22, 2009 at 10:30 AM, Brian Clark  wrote:
> What version of Tomcat are you using?
> What version of the JVM?
> What version of Windows?
> Are you up to date on your Windows patches?
>
>
>
>
> 
> From: Toby Kurien 
> To: users@tomcat.apache.org
> Sent: Thursday, January 22, 2009 9:16:46 AM
> Subject: SECURITY breach in Tomcat
>
> Hi,
> I have a webapp for my company that has been running for several
> years. Recently, we got infected by a trojan or virus and this has
> been causing a lot of abnormal behavior. The trojan creates user
> accounts in Windows and also creates web applications like safee.war
> and zhu.war into the webapps folder of Tomcat and also shuts down
> Tomcat. The trojan webapps have jsp and exe files which try to modify,
> copy and delete files in the system and also try to access the
> database. Symantec and Norton have not been able to rectify or detect
> much.
> I am totally at loss on what's going on and how to tighten or rectify
> this. Anyone with any ideas is highly appreciated.
>
> Thanks,
> -Toby
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>

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



Re: SECURITY breach in Tomcat

2009-01-22 Thread Joseph Millet
Not sure this would be useful in your case

>
http://mail-archives.apache.org/mod_mbox/tomcat-users/200810.mbox/%3c19811090.p...@talk.nabble.com%3e

There seems to be issues with app manager and windows running tomcats.



On Thu, Jan 22, 2009 at 4:30 PM, Brian Clark  wrote:

> What version of Tomcat are you using?
> What version of the JVM?
> What version of Windows?
> Are you up to date on your Windows patches?
>
>
>
>
> 
> From: Toby Kurien 
> To: users@tomcat.apache.org
> Sent: Thursday, January 22, 2009 9:16:46 AM
> Subject: SECURITY breach in Tomcat
>
> Hi,
> I have a webapp for my company that has been running for several
> years. Recently, we got infected by a trojan or virus and this has
> been causing a lot of abnormal behavior. The trojan creates user
> accounts in Windows and also creates web applications like safee.war
> and zhu.war into the webapps folder of Tomcat and also shuts down
> Tomcat. The trojan webapps have jsp and exe files which try to modify,
> copy and delete files in the system and also try to access the
> database. Symantec and Norton have not been able to rectify or detect
> much.
> I am totally at loss on what's going on and how to tighten or rectify
> this. Anyone with any ideas is highly appreciated.
>
> Thanks,
> -Toby
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>
>


Re: SECURITY breach in Tomcat

2009-01-22 Thread Brian Clark
What version of Tomcat are you using? 
What version of the JVM? 
What version of Windows? 
Are you up to date on your Windows patches?





From: Toby Kurien 
To: users@tomcat.apache.org
Sent: Thursday, January 22, 2009 9:16:46 AM
Subject: SECURITY breach in Tomcat

Hi,
I have a webapp for my company that has been running for several
years. Recently, we got infected by a trojan or virus and this has
been causing a lot of abnormal behavior. The trojan creates user
accounts in Windows and also creates web applications like safee.war
and zhu.war into the webapps folder of Tomcat and also shuts down
Tomcat. The trojan webapps have jsp and exe files which try to modify,
copy and delete files in the system and also try to access the
database. Symantec and Norton have not been able to rectify or detect
much.
I am totally at loss on what's going on and how to tighten or rectify
this. Anyone with any ideas is highly appreciated.

Thanks,
-Toby

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


  

SECURITY breach in Tomcat

2009-01-22 Thread Toby Kurien
Hi,
I have a webapp for my company that has been running for several
years. Recently, we got infected by a trojan or virus and this has
been causing a lot of abnormal behavior. The trojan creates user
accounts in Windows and also creates web applications like safee.war
and zhu.war into the webapps folder of Tomcat and also shuts down
Tomcat. The trojan webapps have jsp and exe files which try to modify,
copy and delete files in the system and also try to access the
database. Symantec and Norton have not been able to rectify or detect
much.
I am totally at loss on what's going on and how to tighten or rectify
this. Anyone with any ideas is highly appreciated.

Thanks,
-Toby

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



Re: PostgreSQL vs MySQL with Tomcat

2009-01-22 Thread Jim Cox
When creating tables with referential integrity in MySQL you still get gems
like, e.g.:

  mysql> create table jimtest ( colA  varchar(32) NOT NULL, CONSTRAINT fk1
FOREIGN KEY(colA) REFERENCES jimtest2(colA) ON DELETE CASCADE );
ERROR 1005 (HY000): Can't create table './test/jimtest.frm' (errno: 150)

Same indecipherable error for non-existent referenced table, or column type
mismatch, or a missing index. Admittedly, you learn what to look for after a
while, but the error message sucks.


On Wed, Jan 21, 2009 at 11:06 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Rusty,
>
> Rusty Wright wrote:
> > I think the biggest gripe I've had with mysql is the problem where I was
> > violating a unique constraint and it was giving me some generic
> > (completely useless) error; HY001 I think.
>
> I've always found the error messages themselves very informative. For
> instance, if I attempt to insert a record into a table with an FK that
> doesn't match, MySQL's command-line interface gives me this message:
>
> ERROR 1452 (23000): Cannot add or update a child row: a foreign key
> constraint fails (`database/target_table`, CONSTRAINT
> `name_of_foreign_key_constraint` FOREIGN KEY (`column_name`) REFERENCES
> `source_table` (`column_name`))
>
> Perhaps Connector/J doesn't give quite such useful error messages, but I
> seem to recall something nice like "Foreign key constraint check failed".
>
> I have found that every database has stupid error codes and you
> basically have to code your app around tables of db-specific error codes
> if you want to give your users (or log files) anything better than the
> driver-supplied error messages.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkl38NUACgkQ9CaO5/Lv0PCwAgCggKgAfu/ZZ+ClRAGtEuM4+xyK
> e7EAn0R/4fyPgBfhxSB51um5ZW63jZzL
> =xo6L
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: run tomcat as tomcat user

2009-01-22 Thread Chris Wareham

André Warnier wrote:

Kaushal Shriyan wrote:

Hi

I am not able to start tomcat as tomcat user on ubutu 8.04 Linux,
Below is my start/stop script
Any ideas as what is going wrong ?


I think the way you are using the "su" command is wrong.
Try :
su - (userid) -c "command + params"

You also probably want to re-direct the output of "command" to /dev/null 
etc..


Using another of the scripts existing in /etc/init.d as template, and 
modifying it, may be a better idea.




As André Warnier suggests, install an init script to handle the startup
and shutdown of Tomcat as a non-privileged user. The following notes
assume a RedHat like Linux distro, such as Fedora or CentOS, but should
be helpful to Ubuntu or Debian users:

1. Configure the environment for the non-privileged user by adding the
   following lines to the end of the file .bash_profile found in the
   user's home directory:

JAVA_HOME=/usr/java/default
CATALINA_HOME=$HOME/tomcat
CATALINA_OPTS="-Xms256M -Xmx1000M -XX:MaxPermSize=128M"
export JAVA_HOME CATALINA_HOME CATALINA_OPTS

   Adjust the heap settings to suit your requirements.

2. As root, install an init script like the following to the /etc/init.d
   directory:

#!/bin/sh

# Start the webapp container

TOMCAT_USER=web

tomcat_start () {
su -l -c /home/$TOMCAT_USER/tomcat/bin/startup.sh $TOMCAT_USER
}

tomcat_stop () {
su -l -c /home/$TOMCAT_USER/tomcat/bin/shutdown.sh $TOMCAT_USER
}

case "$1" in
  start)
tomcat_start
;;
  stop)
tomcat_stop
;;
  restart)
tomcat_stop
sleep 30
tomcat_start
;;
  *)
echo "Usage: /etc/init.d/tomcat {start|stop|restart}"
exit 1
;;
esac

exit 0

3. Assuming that the init script has been installed as
   /etc/init.d/tomcat, then run the following commands as root:

# chmod 755 /etc/init.d/tomcat
# ln /etc/init.d/tomcat /etc/rc0.d/K13tomcat
# ln /etc/init.d/tomcat /etc/rc1.d/K13tomcat
# ln /etc/init.d/tomcat /etc/rc2.d/S69tomcat
# ln /etc/init.d/tomcat /etc/rc3.d/S69tomcat
# ln /etc/init.d/tomcat /etc/rc4.d/S69tomcat
# ln /etc/init.d/tomcat /etc/rc5.d/S69tomcat
# ln /etc/init.d/tomcat /etc/rc6.d/K13tomcat

   I find that using hard links rather than sym links makes it easier to
   find all links to an init script using find(1).

4. Tomcat will have to listen on unprivileged ports, such as 8080 and
   8443, so you can either proxy from Apache, or if you have no need to
   run a web server as well as Tomcat then you can use the following
   commands to enable port forwarding:

# /sbin/iptables -A FORWARD -p tcp --destination-port 80 -j ACCEPT
# /sbin/iptables -t nat -A PREROUTING -j REDIRECT -p tcp 
--destination-port 80 --to-ports 8080

# /sbin/iptables -A FORWARD -p tcp --destination-port 443 -j ACCEPT
# /sbin/iptables -t nat -A PREROUTING -j REDIRECT -p tcp 
--destination-port 443 --to-ports 8443

# /sbin/service iptables save
# chkconfig iptables on
# service iptables start

Hope this helps,

Chris
--

Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside, London SE1 2RR

Tel:  +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753


www.visitlondon.com





  
  
'Visit London Limited' is registered in England under No.761149;

Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.


Visit London is the official visitor organisation for London. Visit London is 
partly funded by Partnership, the Mayor's London Development Agency and London 
Councils.
The information contained in this e-mail is confidential and intended for the 
named recipient(s) only.  If you have received it in error, please notify the 
sender immediately and then delete the message.  If you are not the intended 
recipient, you must not use, disclose, copy or distribute this email. The views 
expressed in this e-mail are those of the individual and not of Visit London. 
We reserve the right to read and monitor any email or attachment entering or 
leaving our systems without prior notice.

 Please don't print this e-mail unless you really need to.

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



Re: run tomcat as tomcat user

2009-01-22 Thread André Warnier

Kaushal Shriyan wrote:

Hi

I am not able to start tomcat as tomcat user on ubutu 8.04 Linux,
Below is my start/stop script
Any ideas as what is going wrong ?


I think the way you are using the "su" command is wrong.
Try :
su - (userid) -c "command + params"

You also probably want to re-direct the output of "command" to /dev/null 
etc..


Using another of the scripts existing in /etc/init.d as template, and 
modifying it, may be a better idea.



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



Re: PostgreSQL vs MySQL with Tomcat

2009-01-22 Thread Chris Wareham

Joseph Millet wrote:

Hi all,

in my opinion MySql as previously said is a lot easier to administrate, and
more "developer friendly" than postgre - even if its process managements is
far from being good (some single query may bring it down - as far as I could
see so far using 5.1.22 and many previous versions... ). However one has to
think about the future of both these 2 DBMS and since Sun bought MySql
lately I'm pretty sure anything MySql lakes compared against postgre will
soon be caught up.

Joseph



This is getting very off-topic, but Sun buying MySQL AB has so far
hindered the improvement of the MySQL database engine. See the blog
postings by Monty Widenius (creator of MySQL) and other Sun/MySQL AB
engineers, where they acknowledge that version 5 was not fit for release
and that version 6 is little better. If Widenius is to be believed, then
the release of known to be buggy versions of MySQL are down to pressure
from Sun to get something, anything, to market. A cynic would say that's
always been part of MySQL's problems, and that it's generally true of
most commercial software (open or closed source).

Chris
--

Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside, London SE1 2RR

Tel:  +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753


www.visitlondon.com





  
  
'Visit London Limited' is registered in England under No.761149;

Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.


Visit London is the official visitor organisation for London. Visit London is 
partly funded by Partnership, the Mayor's London Development Agency and London 
Councils.
The information contained in this e-mail is confidential and intended for the 
named recipient(s) only.  If you have received it in error, please notify the 
sender immediately and then delete the message.  If you are not the intended 
recipient, you must not use, disclose, copy or distribute this email. The views 
expressed in this e-mail are those of the individual and not of Visit London. 
We reserve the right to read and monitor any email or attachment entering or 
leaving our systems without prior notice.

 Please don't print this e-mail unless you really need to.

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



Re: IIS6, Tomcat 6.0, ISAPI redirector 1.2.27 - no log on one server

2009-01-22 Thread Thangavel Sankaranarayanan
Did u try checking the security settings are same as in the test
environment

Regards,
Thangavel Sankaranarayanan



   
 Rick Larkin   
 To 
   users@tomcat.apache.org 
 22/01/09 09:05 AM  cc 
   
   Subject 
 Please respond to IIS6, Tomcat 6.0, ISAPI redirector  
   "Tomcat Users   1.2.27 - no log on one server   
   List"   
   
   
   
   




I've searched all over the web and on the list to try and find an
answer to my question. We have a similar installation for a DEV, TEST,
STAGE and PROD environments, namely:

Windows 2003
Tomcat 6.0 (I don't remember the full version, but it isn't critical to
this post)
isapi_redirect.dll version 1.2.27
IIS6

I've set the system up on all of our boxes -- same configuration, and
it runs on all of them but one production server. On that machine, the
redirector shows in IIS with the green up arrow but no matter what I do
I cannot get any kind of log out of the redirector. IIS is not routing
any traffic to the redirector as far as I can tell from the IIS log.

I really could use some ideas on what to try at this point to
troubleshoot this problem. I've played around with permissions, changed
configuration settings (tried them in the registry as well as in the
properties file), etc. The exact same configuration is working on 5
other servers, so I know that the combination is good. I now that I am
missing something, probably simple, but I'm at my wits end.

Any advice on what to try to get a log out of the redirector would be
very welcome, as I've exhausted my ability to research it. Thank you!




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




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