Re: Memory Leak in Tomcat

2011-02-22 Thread הילה
I've posted my problem in the sourceforge forums, but no comments have
received so far. :(

If you have any suggestions to replace this, another way to authenticate the
tomcat to the DB with user and password that do not appear in clear text,
I'll be glad to hear about it.

Thanks
Hila

2011/2/23 André Warnier 

> הילה wrote:
> ...
>
> The tomcat service (on windows) ran with local system...
>
> Ok, now I get it.
>
> ...
>
>  Now the tomcat service is running
>>
> (as a Windows domain user)
>
>  and authenticates to the DB with a domain
>
>> user
>>
>
> The above are two entirely distinct matters.
>
> 1) the Tomcat service was running as "LocalSystem", and is now running
> under a Windows Domain user
>
> This does not require any additional components.
> You just need a Domain user, with the appropriate privilege to run a
> Service on this machine, and to set the "logon user" in the service tab of
> the Tomcat service.
>
> It does not require ntlmauth.dll (whatever that is, it is not a part of
> Tomcat), and I would bet that this, by itself, does not create any memory
> leak.
>
> 2) the Tomcat process authenticates to the database using a Windows Domain
> user.
>
> This /does/ require additional components (the jdts-1.2.5.jar in the tomcat
> 6.0\lib folder and the ntlmauth.dll which you mention), which is not
> provided by Tomcat, but apparently here :
>
> http://jtds.sourceforge.net/faq.html
>
> So it looks to me that you should ask the developers of jTDS why you are
> experiencing a memory leak when using it.
> I don't think that Tomcat per se has anything to do with this issue.
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Issue with oralce drive under tomcat 7

2011-02-22 Thread Caldarale, Charles R
> From: robert.jen...@surecomp.com [mailto:robert.jen...@surecomp.com] 
> Subject: Issue with oralce drive under tomcat 7

> Caused by: java.lang.ClassCastException: 
> oracle.jdbc.driver.OracleResultSetMetaData
> cannot be cast to oracle.jdbc.OracleResultSetMetaData

This is frequently caused by having the JDBC driver jar in more than one 
location.  If you're using Tomcat's DBCP capability, the jar must be in 
Tomcat's lib directory - only.  If you're doing your own connection pooling (or 
none at all), the jar should be in the webapp's WEB-INF/lib directory - only.  
Make sure the jar is not also in some other location, such as jre/lib, or the 
endorsed directory.

 - 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: Memory Leak in Tomcat

2011-02-22 Thread André Warnier

הילה wrote:
...

The tomcat service (on windows) ran with local system...

Ok, now I get it.

...

Now the tomcat service is running

(as a Windows domain user)
 and authenticates to the DB with a domain

user


The above are two entirely distinct matters.

1) the Tomcat service was running as "LocalSystem", and is now running under a Windows 
Domain user


This does not require any additional components.
You just need a Domain user, with the appropriate privilege to run a Service on this 
machine, and to set the "logon user" in the service tab of the Tomcat service.


It does not require ntlmauth.dll (whatever that is, it is not a part of Tomcat), and I 
would bet that this, by itself, does not create any memory leak.


2) the Tomcat process authenticates to the database using a Windows Domain user.

This /does/ require additional components (the jdts-1.2.5.jar in the tomcat 6.0\lib folder 
and the ntlmauth.dll which you mention), which is not provided by Tomcat, but apparently 
here :


http://jtds.sourceforge.net/faq.html

So it looks to me that you should ask the developers of jTDS why you are experiencing a 
memory leak when using it.

I don't think that Tomcat per se has anything to do with this issue.




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



Re: Tomcat 7 Cluster Issue

2011-02-22 Thread Filip Hanik - Dev Lists

It can probably be fixed, there are a few references to this
http://www.techienuggets.com/CommentDetail?tx=355312
https://issues.jboss.org/browse/JGRP-777

I'd have to reproduce it, so that I can fix it/work around it. I will 
open a bugzilla item with this


In the meantime, does this still happen if you remove the "bind" attribute?

best
Filip


On 02/22/2011 04:02 PM, Bruce Pease wrote:

Good Afternoon:



I am running Windows server 2008 with Oracle/Sun jdk 1.6u24 and Tomcat 7.0.8.
Windows server 2008 multicast is defaulted on.  I am attempting to set up a
cluster (config that currenly works in Windows server 2000 and tomcat 6), and
getting the exception listed below.  I haven't been able to find a
configuration change from Tomcat 6 to 7 that might be causing this error.  I
have included the cluster configuration as well.  Any assistance would be
appreciated.






 

 

 

 

 

 


 

 

 

 

 

 

 

 

 





Feb 22, 2011 5:48:11 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
startInternal

SEVERE: Unable to start cluster.

org.apache.catalina.tribes.ChannelException: java.net.SocketException: An
operation was attempted on something that is not a socket; No faulty members
identified.

 at
org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(ChannelCoor
dinator.java:178)

 at
org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordinator.
java:99)

 at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

 at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

 at
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.star
t(MessageDispatchInterceptor.java:153)

 at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

 at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

 at
org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:416)

 at
org.apache.catalina.ha.tcp.SimpleTcpCluster.startInternal(SimpleTcpCluster.ja
va:671)

 at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

 at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1026)

 at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)

 at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

 at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035)

 at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291
)

 at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

 at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:4
43)

 at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

 at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:724
)

 at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

 at
org.apache.catalina.startup.Catalina.start(Catalina.java:620)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
java:25)

 at java.lang.reflect.Method.invoke(Method.java:597)

 at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

 at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)



Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r)   &  Cruises Inc(tm)

1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com




   



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



Tomcat 7 Cluster Issue

2011-02-22 Thread Bruce Pease
Good Afternoon:

 

I am running Windows server 2008 with Oracle/Sun jdk 1.6u24 and Tomcat 7.0.8.
Windows server 2008 multicast is defaulted on.  I am attempting to set up a
cluster (config that currenly works in Windows server 2000 and tomcat 6), and
getting the exception listed below.  I haven't been able to find a
configuration change from Tomcat 6 to 7 that might be causing this error.  I
have included the cluster configuration as well.  Any assistance would be
appreciated.  

 




































 

Feb 22, 2011 5:48:11 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
startInternal

SEVERE: Unable to start cluster.

org.apache.catalina.tribes.ChannelException: java.net.SocketException: An
operation was attempted on something that is not a socket; No faulty members
identified.

at
org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(ChannelCoor
dinator.java:178)

at
org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordinator.
java:99)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

at
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.star
t(MessageDispatchInterceptor.java:153)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelIntercep
torBase.java:150)

at
org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:416)

at
org.apache.catalina.ha.tcp.SimpleTcpCluster.startInternal(SimpleTcpCluster.ja
va:671)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1026)

at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035)

at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291
)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:4
43)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:724
)

at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at
org.apache.catalina.startup.Catalina.start(Catalina.java:620)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:304)

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r)   & Cruises Inc(tm)
 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com  

 



Re: Memory Leak in Tomcat

2011-02-22 Thread הילה
Hey,

When going to tomcat site, you can download "32-bit/64-bit Windows Service
Installer
"
That's what I have installed. When installing this, it creates the tomcat
service in windows + the regular folder under c:\program files\apache
software foundation\Tomcat 6.0.
The tomcat service (on windows) ran with local system, and the connection
URL (of the DB) is specified under "c:\program files\apache software
foundation\tomcat 6.0\conf\catalina\localhost\*.xml"
In this xml file, along with the connection URL to DB, there is also the
user name and password of the user that have access to the DB, in clear
text.
In order for me to remove the user and password, I have changed the user
that runs the tomcat service to a domain user with access and permissions to
DB, placed the jdts-1.2.5.jar in the tomcat 6.0\lib folder and the
ntlmauth.dll (which is essential for the windows authentication to work) in
c:\windows\system32.

Now the tomcat service is running and authenticates to the DB with a domain
user (and not SQL user), but I have this memory leak as a side affect which
I'm trying (with, hopefully, the help of you guys) to resolve.

Thanks
Hila

2011/2/23 André Warnier 

>
> Your initial description says :
>
> Until now, we used [b]SQL Authentication[/b] for the tomcat service and
> configuration (user and password for tomcat to access the DB was provided
> within the xml configuration file, under c:\Program Files\Apache Software
> Foundation\Tomcat 6.0\conf\catalina\localhost), but! since we changed
>
> configuration to use [b]Windows Authentication [/b](the user that runs
> tomcat is now a domain user with permissions on the DB + removed user and
> password from xml configuration file), we observed a trend of memory leak,
> where it comes to attention by the process of tomcat, which is increasing
> on
> a daily basis.
>
> This is not very clear to me.
> This all seems to be happening on a Windows platform.
> How exactly then were you previously using "[b]SQL Authentication[/b] for
> the tomcat service" ? Are you talking about the user-id under which the
> Windows Tomcat Service was running ?
>
> (To my knowledge, the only way to run a Service under Windows, is under a
> Windows user-id.)
>
> Or are you talking about the way in which users of the Tomcat applications
> were authenticating to Tomcat ?
>
> If it is this second case, then you must be using some additional component
> to achieve this, because - again to my knowledge -, Tomcat itself does not
> contain components to perform Windows Domain authentication.
>
> Can you enlighten me ?
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Issue with oralce drive under tomcat 7

2011-02-22 Thread Robert.Jenkin
Hello

I am run a webapp under tomcat that also runs under websphere and weblogic. I 
have identified changes to war and code needed to handle the jdni issues as 
well as differences in configuration of web services between the three 
containers.

The issue I am having (it seems strange and not believable) is a problem with 
code that works under the web* containers and does not seem to work under 
tomcat 7.

The following are log out puts from web* and tomcat they show that the driver 
being used via jdbc pooling is the same driver.

Weblogic/WebSphere log entries showing oracle driver

  2011.02.22 05:00:22,602 Database Name: reportwriter
  2011.02.22 05:00:22,602 Database Username: weblogic
  2011.02.22 05:00:22,715 Database connection properties
  2011.02.22 05:00:22,716 --
  2011.02.22 05:00:22,716 Database Connection URL: 
jdbc:oracle:thin:@ssi-allmatch:1521:reporting
  2011.02.22 05:00:22,716 Database User Name: SYSTEM
  2011.02.22 05:00:22,716 Database Product Name: Oracle
  2011.02.22 05:00:22,717 Database Product Version: Oracle Database 11g 
Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
  2011.02.22 05:00:22,717 Database Driver Name: Oracle JDBC driver
  2011.02.22 05:00:22,717 Database Driver Version: 11.1.0.7.0-Production
   2011.02.22 05:00:23,36 Language repositories have been populated 
successfully.

Log entries using Tomcat 7

  2011.02.22 05:20:59,627 Database Name: reportwriter
  2011.02.22 05:20:59,627 Database Username: tomcat
   2011.02.22 05:21:00,46 Database connection properties
   2011.02.22 05:21:00,46 --
   2011.02.22 05:21:00,46 Database Connection URL: 
jdbc:oracle:thin:@ssi-allmatch:1521:reporting
   2011.02.22 05:21:00,46 Database User Name: SYSTEM
   2011.02.22 05:21:00,46 Database Product Name: Oracle
   2011.02.22 05:21:00,47 Database Product Version: Oracle Database 11g 
Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
   2011.02.22 05:21:00,47 Database Driver Name: Oracle JDBC driver
   2011.02.22 05:21:00,47 Database Driver Version: 11.1.0.7.0-Production
  2011.02.22 04:57:05,280 Language repositories have been populated 
successfully.

When I start up web* I get the following log segment

2011.02.22 05:29:20,1 Initializing reporting object.
   2011.02.22 05:29:20,91 ReportWriter Web application initialization has been 
completed.

When I start up Tomcat I get the following error


  2011.02.22 05:21:04,193 Initializing reporting object.
  2011.02.22 05:21:04,313 Error initializing Reporting object--
java.lang.RuntimeException: com.surecomp.reportwriter.bo.Reporting: unable to 
populate fields.
 at com.surecomp.reportwriter.bo.BO.newInstance(BO.java:211)
 at 
com.surecomp.reportwriter.ws.ReportingService.initialize(ReportingService.java:11)
 at com.surecomp.reportwriter.ReportWriter.init(ReportWriter.java:286)
 at javax.servlet.GenericServlet.init(GenericServlet.java:160)
 at 
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1133)
 at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1087)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:996)
 at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4741)
 at 
org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5062)
 at 
org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5057)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException: 
oracle.jdbc.driver.OracleResultSetMetaData cannot be cast to 
oracle.jdbc.OracleResultSetMetaData
 at 
com.surecomp.reportwriter.ClientDatabase.getFieldTypes(ClientDatabase.java:1011)
 at 
com.surecomp.reportwriter.bo.Reporting.populateFields(Reporting.java:107)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.surecomp.reportwriter.bo.BO.newInstance(BO.java:205)
 ... 14 more
--

The code in question (by error) is the following

public HashMap getFieldTypes(String tableName, String 
databaseName) throws Throwable {
  if (databaseName == null) {
   databaseName = Configuration.getDatabaseName();
  }
  HashMa

RE: Secure AJP over ssl

2011-02-22 Thread Jason Pyeron
> -Original Message-
> From: Mladen Turk [mailto:mt...@apache.org] 
> Sent: Tuesday, February 22, 2011 1:20
> To: users@tomcat.apache.org
> Subject: Re: Secure AJP over ssl
> 
> On 02/21/2011 10:31 PM, Jason Pyeron wrote:
> > Does (or could) tomcat 5.5 support encrypted AJP? The 
> frontend apache 
> > will be on a different host than the tomcat server. It is required 
> > that the communications are encrypted.
> >
> 
> I would suggest you reconsider your security requirements.

Cordially, no.

> Unless your frontend and backend are on different continents 
> the best way to fight wire tapping (only reason why would you 

Yes. You hit the nail on the head, besides being required by law.

> secure the communication at the first place) is much better 
> done with securing your infrastructure.

That is a naive view. [Please forgive the wording.]

Given:

1) The Apache box is secure and login is restricted to the minimum set of
persons with a kneed to know. 
2) The Tomcat box is secure and login is restricted to the minimum set of
persons with a kneed to know. 

There is no reason to allow the set of persons capable (and sometimes
authorized) to inspect the data on a network (network operations) to be able to
inspect the unsecured contents of the data stream. That would be a briech of
security and law.

-Jason

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.



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



Re: Memory Leak in Tomcat

2011-02-22 Thread André Warnier

הילה

(Interesting: my Thunderbird email client seems unable to remove your name 
above...)
Anyway, hi.

Your initial description says :

Until now, we used [b]SQL Authentication[/b] for the tomcat service and
configuration (user and password for tomcat to access the DB was provided
within the xml configuration file, under c:\Program Files\Apache Software
Foundation\Tomcat 6.0\conf\catalina\localhost), but! since we changed
configuration to use [b]Windows Authentication [/b](the user that runs
tomcat is now a domain user with permissions on the DB + removed user and
password from xml configuration file), we observed a trend of memory leak,
where it comes to attention by the process of tomcat, which is increasing on
a daily basis.

This is not very clear to me.
This all seems to be happening on a Windows platform.
How exactly then were you previously using "[b]SQL Authentication[/b] for the tomcat 
service" ? Are you talking about the user-id under which the Windows Tomcat Service was 
running ?


(To my knowledge, the only way to run a Service under Windows, is under a 
Windows user-id.)

Or are you talking about the way in which users of the Tomcat applications were 
authenticating to Tomcat ?


If it is this second case, then you must be using some additional component to achieve 
this, because - again to my knowledge -, Tomcat itself does not contain components to 
perform Windows Domain authentication.


Can you enlighten me ?


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



Re: related to bad url encoding?...

2011-02-22 Thread André Warnier

alex wrote:
...



so, what do I do if I need to show error in this scenario and I run 
standalone tomcat?

...

It seems to me that by the 400 status code, the error is already shown, 
correctly.
Tomcat is doing the minimum, but it is doing it according to the RFC.

HTTP RFC 2616 says:

10.4 Client Error 4xx

The 4xx class of status code is intended for cases in which the client seems to 
have erred.
Except when responding to a HEAD request, the server SHOULD include an entity 
containing
an explanation of the error situation, and whether it is a temporary or 
permanent condition.
These status codes are applicable to any request method. User agents SHOULD display any 
included entity to the user.

...

(Notice "SHOULD", not "MUST").

10.4.1 400 Bad Request
The request could not be understood by the server due to malformed syntax.
The client SHOULD NOT repeat the request without modifications.

(This thus seems to be the appropriate status code. After all, the client /did/ send a 
malformed URL.)


(In any case, none of the other ones seems to fit.)

10.4.2 401 Unauthorized
10.4.3 402 Payment Required
10.4.4 403 Forbidden
10.4.5 404 Not Found
10.4.6 405 Method Not Allowed
10.4.7 406 Not Acceptable
10.4.8 407 Proxy Authentication Required
10.4.9 408 Request Timeout
10.4.10 409 Conflict
10.4.11 410 Gone
10.4.12 411 Length Required
10.4.13 412 Precondition Failed
10.4.14 413 Request Entity Too Large
10.4.15 414 Request-URI Too Long
10.4.16 415 Unsupported Media Type
10.4.17 416 Requested Range Not Satisfiable
10.4.18 417 Expectation Failed


Re: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html


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



Re: related to bad url encoding?...

2011-02-22 Thread Mark Thomas
On 22/02/2011 21:36, alex wrote:
> Mark Thomas wrote:
>> On 22/02/2011 17:26, Caldarale, Charles R wrote:
 From: alex [mailto:alex.alex.alex.9...@gmail.com] Subject: Re:
 related to bad url encoding?...
 shouldn't it be 404 error if tomcat can't map "this call"?
>>> Tomcat 7 has introduced revised handling for situations where there
>>> is no ROOT webapp; you might want to try that.  Regardless, you still
>>> can only use a custom error page on a mapping failure if you've got a
>>> default webapp (ROOT) and configure ROOT's WEB-INF/web.xml for it.
>>
>> It isn't going to help in this case. The URL is not valid so it is
>> correctly rejected by the connector with a 400 response. Since the URL
>> is invalid, it can't reliably be used to map it to a web application so
>> there is no opportunity to use an application generated/supplied error
>> page.
> 
> so, what do I do if I need to show error in this scenario and I run
> standalone tomcat?
> can I do it in custom filter/connector or the only solution to place
> tomcat behind apache?

A filter is too late in the chain, as is a valve. A custom connector
code seems like overkill for this. I would probably go with httpd myself.

There may be a way to get the request to be forwarded to the default
host where the default error handler could respond but I suspect that
approach could quickly get messy. One of the reasons for rejected the
requests in the connector was performance.

Mark

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



Re: Memory Leak in Tomcat

2011-02-22 Thread הילה
Hey,

I have used JProfiler to monitor the tomcat process, but haven't found
anything useful.
you can see that the tomcat process is the only one that increasing, and it
started to happen since i switched to windows authentication.. so I think
it's connected?
what is a heap analysis? how can i enable and analyze its results?

Thanks
Hila


2011/2/22 Christopher Schultz 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> הילה,
>
> On 2/20/2011 8:28 AM, הילה wrote:
> > I work in a company which we use Tomcat (5.5.26 and recently we've
> upgraded
> > it to 6.0.29) to run our application.
>
> Any chance you can move all the way up to 6.0.32?
>
> > since we changed
> > configuration to use [b]Windows Authentication [/b](the user that runs
> > tomcat is now a domain user with permissions on the DB + removed user and
> > password from xml configuration file), we observed a trend of memory
> leak,
> > where it comes to attention by the process of tomcat, which is increasing
> on
> > a daily basis.
>
> Have you done any heap analysis or memory profiling? It's possible that
> the memory leak is not related to the authentication.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk1kE6AACgkQ9CaO5/Lv0PAdEACgpRbs3MQv0T4Nfx/r7Jd0HVSA
> nRwAoJ7moo20hj6ioov5sVDepUkdXAjd
> =xTQV
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: related to bad url encoding?...

2011-02-22 Thread alex

Mark Thomas wrote:

On 22/02/2011 17:26, Caldarale, Charles R wrote:
From: alex [mailto:alex.alex.alex.9...@gmail.com] 
Subject: Re: related to bad url encoding?...

shouldn't it be 404 error if tomcat can't map "this call"?

Tomcat 7 has introduced revised handling for situations where there is no ROOT 
webapp; you might want to try that.  Regardless, you still can only use a 
custom error page on a mapping failure if you've got a default webapp (ROOT) 
and configure ROOT's WEB-INF/web.xml for it.


It isn't going to help in this case. The URL is not valid so it is
correctly rejected by the connector with a 400 response. Since the URL
is invalid, it can't reliably be used to map it to a web application so
there is no opportunity to use an application generated/supplied error page.


so, what do I do if I need to show error in this scenario and I run 
standalone tomcat?
can I do it in custom filter/connector or the only solution to place 
tomcat behind apache?






Mark

PS The change in 7 just returns a 404 rather than a 400 for requests to
/ when there is no ROOT web application defined.





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



Re: web application automatically goes to localhost

2011-02-22 Thread André Warnier

Caldarale, Charles R wrote:
From: ahmet temiz [mailto:ahmettemi...@gmail.com] 
Subject: web application automatically goes to localhost



My JSF web application automatically goes to localhost.


I'll bite: what does the above sentence actually mean?

I'll bite also. Using a bit of guesswork (Pid, can we borrow the crystal ball for a while 
?), I think it means something akin to "it calls back to mama".


Now I do agree that a bit more clarity in the formulation would be useful, if the purpose 
was to get some help.


Such as explaining how this relates to Tomcat, and if it does, to which Tomcat version, on 
which platform, with which URL it happens, what exactly happens, that kind of thing.




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



Re: AccessLogValve pattern (timestamp, bytes sent and time taken)

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Antonios,

On 2/21/2011 11:05 AM, Antonios Kogias wrote:
> If we use tomcat 7.0.8, the "timing for the whole request processing
> cycle" will incorporate transmit time?
> e.g. if using HTTP/1.0, will it represent the total time until the
> teardown of the connection? Or will it be the net processing time
> /before/ transmission starts (i.e. time to prepare the http response and
> push it to the network layer)?

(I'd like Konstantin to confirm the following, presuming it's true...)

The Valve terminates after the servlet (the code actually doing the
work) completed its work. For a simple request, the timing will include
any time blocking on response buffers but can't by definition include
any time waiting for the client to drain the buffer.

Depending on exactly where the Valve falls within the Valve chain and
how the RequestDispatcher works with Valves, it may or may not include
time to render the response at all. Let me explain:

Many servlets look like this:

public void doGet(...) {
  try {
// do some stuff

getRequestDispatcher("/result.jsp").forward(request, response);
  } catch (Exception e) {
// log the error, whatever
getRequestDispatcher("/error.jsp").forward(request, response);
  }
}

If the Valve wraps around only the original request (to, say, servlet
"/foo") then you're only timing the execution of the code shown above:
the processing of result.jsp (or error.jsp for that matter) will be
shown in a separate log message.

I don't believe Apache httpd has a notion of an internal request forward
the way that Java does, so I'm not sure there's an analog, there.

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

iEYEARECAAYFAk1kGKkACgkQ9CaO5/Lv0PA8WgCeP0uLrgXyT2sHkwRkbaVtsrkC
ZDsAoJQpc75Zl8iJYPzRPgKOhlOef/gw
=Ysn0
-END PGP SIGNATURE-

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



Re: connecting jsp with mysql

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Anup,

On 2/21/2011 10:20 AM, Anup Niroula wrote:
> Hi,
> out.println ("Cannot connect to database server message "+e.getMessage());
> "This gives following error msg:
> "Cannot connect to database server com.mysql.jdbc.Driver."

How about e.printStackTrace()? Post the entire message and full stack trace.

I can see a whole bunch of things wrong with your original code:

1. You re-register the driver for every request (Class.forName) which
   isn't that big of a deal... just a waste of time at least for the
   MySQL driver. It's mostly just bad coding practice.

2. You create a new Connection for every request. You would be much
   better off using pooled connections. Look at the Tomcat documentation
   for using JNDI DataSources.

3. You swallow nearly all exceptions. At least log them.
   System.err/System.out doesn't count.

4. You shouldn't have any Java code in a JSP (debatable).

5. Everything is hard-coded. Of course, this looks like a test page
   so you can be excused for that :)

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

iEYEARECAAYFAk1kFrEACgkQ9CaO5/Lv0PC62QCeIpgG7Wu3fZNcNKfsm+5Mxn4w
3RwAniITH/47q9NrkdiqZK2CgPJWUhFA
=+hIO
-END PGP SIGNATURE-

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



Re: Site Attack

2011-02-22 Thread Mark Thomas
On 22/02/2011 19:57, marketing wrote:
> I notice a high density of warming messages in a TC log file this morning.
> The message is "an attempt was made to authenticate the locked user
> 'admin'". I guess that a script was used to hack into the admin account.
> How the attack occurs? And how to have a good protection?

The ASF uses fail2ban for this sort of thing. To many login failures in
the logs and fail2ban configures the firewall to drop all packets from
the source IP address. You can configure fail2ban to respond pretty much
however you want.

Mark

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



Re: Tomcat log analysis

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ozgur,

On 2/21/2011 4:31 AM, Ozgur Ozdemircili wrote:
> Hi,
> 
> I am looking for a log analysis program to make sense of our application
> logs. We run Tomcat 5x in 9 servers and every server has the same
> application installed. Yet when we need to search for anything you can
> imagine the mess.
> 
> In that sense Sawmill seems to be a good alternative.
> 
> Any other thoughts? Software recomendations?

We've always used webalizer/awfful, but we have modest needs from our
log analysis.

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

iEYEARECAAYFAk1kFXYACgkQ9CaO5/Lv0PAXswCeOC0mvsq4GClGp5994+AY17Ba
BvoAoKDPFZZLZuaEWuyRgnPwtDymMBj6
=l+Oe
-END PGP SIGNATURE-

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



Site Attack

2011-02-22 Thread marketing
I notice a high density of warming messages in a TC log file this morning.
The message is "an attempt was made to authenticate the locked user
'admin'". I guess that a script was used to hack into the admin account.
How the attack occurs? And how to have a good protection?


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



Re: Reading a file in tomcathome/conf folder

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 2/17/2011 5:23 AM, Konstantin Kolinko wrote:
> 2011/2/17 Captain Cid :
>>
>> Yes ..got your point...using spring its easy though
>>
>> My only question is ,
>>
>> can it be accessed using classloader and getResource()
>>
> 
> Why? Just use:
> 
> new FileInputStream(new File(System.getProperty("catalina.base"),
> "conf/yourfile.properties"));

Heh. We always ride people for using the filesystem and here Konstantin
goes suggesting that someone use it :)

Cid, the short answer is that catalina.base isn't available via any
default ClassLoader. If you wanted to, you could place the file into
Tomcat's lib directory, but that has it's disadvantages, too.

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

iEYEARECAAYFAk1kFOkACgkQ9CaO5/Lv0PBMiwCeP4saNJjge0H4MNdGjmsj8GAX
B6QAoKCVtUtGi1thNck0t2/rCPxPdt1L
=sHvu
-END PGP SIGNATURE-

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



Re: datasource & persistenceUnit configuration

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

On 2/20/2011 1:51 PM, Martin Mucha wrote:
> Yes, I know I cannot use container managed EntityManager. Tomcat does
> not support JTA, ok. But I should be able, also the article points it
> out, to use application managed EntityManager with RESOURCE_LOCAL
> transaction type. Just like in SE java.
> 
> In SE java everything works just fine for me.

Good to know.

> Actually the code looks just as in that article:
> 
> EntityManagerFactory emf =
> Persistence.createEntityManagerFactory("insolvencePU");
> EntityManager em = emf.createEntityManager();
> em.getTransaction().begin();
> 
> //and the rest of transaction.
> 
> my persistence.xml looks like:

So, this persistence.xml file works fine in a standalone Java SE
program? You should be able to get it to work under Tomcat then. Where
is your persistence.xml file when you run your standalone Java SE test
program, and what is the effective CLASSPATH?

Where is your persistence.xml file when you deploy it along with your
webapp? I would expect that it should be in WEB-INF/classes (or at the
root of a JAR file found in WEB-INF/lib).

> Line
> EntityManagerFactory emf =
> Persistence.createEntityManagerFactory("insolvencePU");
> fires an Exception complaining about unability to build
> EntityManagerFactory. That leads me to suspicion that either the
> persistence.xml, the data source or "something-else" is wrong. But I'm
> quite to unable to find out what.

I'm guessing that the Persistence framework just can't find your
configuration file.

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

iEYEARECAAYFAk1kFHoACgkQ9CaO5/Lv0PBbBACgi5UegxQ/aplal11hRHnGI2z0
BjYAnRCl4gFqH8H1DqmwXlB1mwzUO5YJ
=6EHI
-END PGP SIGNATURE-

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



Re: Memory Leak in Tomcat

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

הילה,

On 2/20/2011 8:28 AM, הילה wrote:
> I work in a company which we use Tomcat (5.5.26 and recently we've upgraded
> it to 6.0.29) to run our application.

Any chance you can move all the way up to 6.0.32?

> since we changed
> configuration to use [b]Windows Authentication [/b](the user that runs
> tomcat is now a domain user with permissions on the DB + removed user and
> password from xml configuration file), we observed a trend of memory leak,
> where it comes to attention by the process of tomcat, which is increasing on
> a daily basis.

Have you done any heap analysis or memory profiling? It's possible that
the memory leak is not related to the authentication.

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

iEYEARECAAYFAk1kE6AACgkQ9CaO5/Lv0PAdEACgpRbs3MQv0T4Nfx/r7Jd0HVSA
nRwAoJ7moo20hj6ioov5sVDepUkdXAjd
=xTQV
-END PGP SIGNATURE-

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



RE: Updating Tomcate Windows Service

2011-02-22 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Subject: Re: Updating Tomcate Windows Service

> 'diff' is your friend. Some kind souls have ported it to win32:
> http://www.google.com/search?q=diff%20win32

For Windows, I prefer these:
http://www.grigsoft.com/

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



Re: how to caculate the PV,ip,PU according to the tomcat log

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

On 2/18/2011 7:38 PM, maven apache wrote:
> how to caculate the PV,ip,PU according to the tomcat log?

Good question. What are PV, ip, and PU?

>  For the ip I can use :
> 
> select count(distinct ip)...

Okay, that explains /one/ question. What about the others?

> But how about the pv and pu?
> 
> I have no idea, please do me a favor if you know.

If you can tell us what those abbreviations mean, perhaps we can write
your SQL statements for you.

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

iEYEARECAAYFAk1kEkUACgkQ9CaO5/Lv0PDPQwCeMGyWknG04hZ1v2xrH9B5WuHT
JBQAnjoe1/b0f3/hcSZOKfd0BuOI9WvE
=1KL4
-END PGP SIGNATURE-

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



Re: Updating Tomcate Windows Service

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 2/17/2011 2:37 PM, Caldarale, Charles R wrote:
>> From: spr...@gmx.eu [mailto:spr...@gmx.eu] 
>> Subject: RE: Updating Tomcate Windows Service
> 
>> I will save my conf dir and wars, reinstall tomcat and then copy the
>> conf and wars back to tomcat (and pray that server.xml & Co are still
>> compatible :)).
> 
> Bad idea.  Go through the configs and merge your changes to the old .xml 
> files into the new ones.  Blind copying *will* get you in trouble - as many 
> have discovered before you.

+1

'diff' is your friend. Some kind souls have ported it to win32:
http://www.google.com/search?q=diff%20win32

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

iEYEARECAAYFAk1kEYMACgkQ9CaO5/Lv0PBPkACdEYVekxH3x1dC8uhqboABmotw
hcIAn0COv3KuD+/NW8bfdqWAwn6Gf85g
=CkQi
-END PGP SIGNATURE-

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



Re: Tomcat Secuirty Problem

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jamana,

On 2/17/2011 12:42 AM, jamana ramesh wrote:
>> I am new to Tomcat server.

I agree with /all/ of Chuck's comments.

>> grant codeBase "http://localhost:8080/lanwan/-"; {

Your code is in a JAR, not being served from a URL, right? Or, are you
talking about an applet? I think your codeBase is wrong.

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

iEYEARECAAYFAk1kEH0ACgkQ9CaO5/Lv0PBXEQCfXt/u5K3uaIiH4bj50nHw8NqI
FKwAoMCxwpba42KGgBTcPokl0UcJa4/L
=7/gi
-END PGP SIGNATURE-

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



Re: CRLF in HTTP headers

2011-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Adrian,

On 2/17/2011 10:51 AM, Adrian Fretwell wrote:
> Thank you for your feedback, I have just confirmed CRLF is actually
> present by using http://www.askapache.com/online-tools/http-headers-tool/
> When I grab the headers myself in a hex dump, only LF is present. 
> Something must be stripping the CR out.

If your (or some library) code is using Reader.readline then it will
remove environment-specific newline characters (that would be CR on
older Mac OS, CRLF on DOS-based OSs including Microsoft Windows, and LF
on *NIX environments). Unless you're running Mac OS 9 or something, I
would be surprised if this is the cause.

It's a little unclear from your statement above: where can you observe
the correct CRLF separators and where can you observe the absence of the
CR characters?

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

iEYEARECAAYFAk1kEBoACgkQ9CaO5/Lv0PDc8gCgi/n+oVrvppujWSQ26oS0V7nz
bW4An1W60GanktsowfLOHlyJfDjZqESl
=TiFM
-END PGP SIGNATURE-

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



Re: Can datasource password be changed in jdbc-pool?

2011-02-22 Thread Filip Hanik - Dev Lists

hi Nicholas,
yes and no. You can change the password by simply doing
DataSource ds = 
PoolConfiguration pcf = (PoolConfiguration)ds;
pcf.setPassword(...);

however, this change would only take into effect for newly created 
connections, and not the ones already in the pool.
There is some needed support to refresh the pool with configuration 
changes.


I will open a Bugzilla enhancement request, and we can get this implemented.

best
Filip

On 02/22/2011 10:54 AM, Nicholas Sushkin wrote:

Hi,

I am checking out the new Tomcat's jdbc-pool. So far it's great. I like JMX
monitoring feature.

I searched lists and google for how to change database password in the JNDI
data source and couldn't find anything. Can it be done?

If not, then can JMX MBean be extended with an operation to set the password
(write only)?

Sometimes database passwords change while the application is deployed and it
would've been nice to update the passwords without redeploying. Also, it would
eliminate the need to store sensitive passwords in files. I am not sure what
the security implications of being able to set the password is, but I think
it's safe, since the JMX connection can be authenticated and secured.

Thanks
   



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



RE: web application automatically goes to localhost

2011-02-22 Thread Caldarale, Charles R
> From: ahmet temiz [mailto:ahmettemi...@gmail.com] 
> Subject: web application automatically goes to localhost

> My JSF web application automatically goes to localhost.

I'll bite: what does the above sentence actually mean?

http://www.catb.org/~esr/faqs/smart-questions.html

 - 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: JMX login error : java.lang.NullPointerException at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)

2011-02-22 Thread Dustin Chesterman
Thanks for the reply.

netstat -a | grep 9888 returned nothing.

netstat -an | grep 9888  returns :
tcp0  0 :::9888 :::*
LISTEN


Removing the -debug parameter has no effect.


-Dustin



On Tue, Feb 22, 2011 at 9:17 AM, Martin Gainty  wrote:
> netstat -a | grep 9888
> write down the listening host for 9888 e.g. (127.0.0.1)
>
> dont use the -debug parameter when starting jconsole
>
> jconsole listening-jost:9888
>
> Martin Gainty
> __

On Tue, Feb 22, 2011 at 8:58 AM, Dustin Chesterman  wrote:
> Hello all -
>  We are running Tomcat 6 on RHEL 5 and Oracle JDK 1.6_24 and I am
> having a problem loggin into the jmx services remotely through
> jconsole.
>
> Here is my setenv.sh :
>
> JAVA_OPTS="-Xms512m -Xmx1152m -XX:MaxPermSize=512m"
> CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=9888"
> CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false"
> CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.hostname=192.168.33.70"
> CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.logCalls=true"
>
>
> Here is the output from 'ps -elf | grep tomcat'  (I also see the 9888
> port listening when using netstat) :
>
> 0 S root      2930     1  1  85   0 - 500084 184466 20:47 ?
> 00:00:15 /usr/java/default/bin/java
> -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
> -Xms512m -Xmx1152m -XX:MaxPermSize=512m
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -server -Dbuild.compiler.emacs=true -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=9888
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
> -Djava.rmi.server.hostname=192.168.XX.XX
> -Djava.rmi.server.logCalls=true
> -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath
> /usr/local/tomcat/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat
> -Dcatalina.home=/usr/local/tomcat
> -Djava.io.tmpdir=/usr/local/tomcat/temp
> org.apache.catalina.startup.Bootstrap start
>
>
> Then when trying to connect through jconsole I am running the
> following command :
>
> jconsole -debug 192.168.XX.XX:9888
>
>
> It throws the following error:
>
> java.lang.NullPointerException
>    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)
>    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:228)
>    at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:334)
>    at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:296)
>    at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:281)
>
>
> I have run out of ideas for debugging this and can't seem to find any
> answers.  Any thought or ideas?
>
> As a second problem, shutting down tomcat does not stop the jmx
> process and i cannot restart tomcat since it is still listening on
> 9888.  Do I have to specify anything to stop the JMX process during
> shutdown?
>
>
> Thanks all
> --
> - Dustin Chesterman
>

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



web application automatically goes to localhost

2011-02-22 Thread ahmet temiz
hello

My JSF web application automatically goes to localhost.

what are possible reasons

I will appreciate if you give any idea.

kind regards

-- 
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Planlama ve Zarar Azaltma Dairesi Başkanlığı
Bilgi ve CBS grubu
Eskişehir Yolu 10. km.
Lodumlu / Ankara
Tel : 0 312 2872680 / 1535

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



Can datasource password be changed in jdbc-pool?

2011-02-22 Thread Nicholas Sushkin
Hi,

I am checking out the new Tomcat's jdbc-pool. So far it's great. I like JMX 
monitoring feature.

I searched lists and google for how to change database password in the JNDI 
data source and couldn't find anything. Can it be done? 

If not, then can JMX MBean be extended with an operation to set the password 
(write only)? 

Sometimes database passwords change while the application is deployed and it 
would've been nice to update the passwords without redeploying. Also, it would 
eliminate the need to store sensitive passwords in files. I am not sure what 
the security implications of being able to set the password is, but I think 
it's safe, since the JMX connection can be authenticated and secured.

Thanks
-- 
Nicholas Sushkin, Senior Software Engineer, Manager of IT Operations
Open Finance Aggregation eXchange 


smime.p7s
Description: S/MIME cryptographic signature


Re: related to bad url encoding?...

2011-02-22 Thread Mark Thomas
On 22/02/2011 17:26, Caldarale, Charles R wrote:
>> From: alex [mailto:alex.alex.alex.9...@gmail.com] 
>> Subject: Re: related to bad url encoding?...
> 
>> shouldn't it be 404 error if tomcat can't map "this call"?
> 
> Tomcat 7 has introduced revised handling for situations where there is no 
> ROOT webapp; you might want to try that.  Regardless, you still can only use 
> a custom error page on a mapping failure if you've got a default webapp 
> (ROOT) and configure ROOT's WEB-INF/web.xml for it.

It isn't going to help in this case. The URL is not valid so it is
correctly rejected by the connector with a 400 response. Since the URL
is invalid, it can't reliably be used to map it to a web application so
there is no opportunity to use an application generated/supplied error page.

Mark

PS The change in 7 just returns a 404 rather than a 400 for requests to
/ when there is no ROOT web application defined.


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



RE: related to bad url encoding?...

2011-02-22 Thread Caldarale, Charles R
> From: alex [mailto:alex.alex.alex.9...@gmail.com] 
> Subject: Re: related to bad url encoding?...

> shouldn't it be 404 error if tomcat can't map "this call"?

Tomcat 7 has introduced revised handling for situations where there is no ROOT 
webapp; you might want to try that.  Regardless, you still can only use a 
custom error page on a mapping failure if you've got a default webapp (ROOT) 
and configure ROOT's WEB-INF/web.xml for it.

 - 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: related to bad url encoding?...

2011-02-22 Thread alex

André Warnier wrote:

alex wrote:

Mark Thomas wrote:

On 22/02/2011 13:27, alex wrote:

alex wrote:

Mark Thomas wrote:

On 21/02/2011 04:25, alex wrote:

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if 
I add
%zD0 . I'm supposed to get bad request in this case. how do I fix 
this

problem?

Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you
using?

Mark

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


I used 6.0.24 .
http://localhost:8080/examples/servlets/%D0 returns 404
http://localhost:8080/examples/servlets/%zD0 returns blank page



Can anyone tell me if it's a bug or a problem on my side?
thanks.


Again, look at the response *headers*.

Mark

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



Mark,
it does return 400 code, but in my app I set:
...
   
400
/WEB-INF/error.jsp
  
   
404
/WEB-INF/error.jsp
  
.

and tomcat doesn't show it. this custom err page is shown for 404 
code, but not for 400...

Can you give me a hint why?
thanks again.


probably because :
because of the bad URL, Tomcat never even "maps" this call to your 
application, 


shouldn't it be 404 error if tomcat can't map "this call"?



so it sends its own 400 error page (as Konstantin already > explained, I 
believe).





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



Re: related to bad url encoding?...

2011-02-22 Thread André Warnier

alex wrote:

Mark Thomas wrote:

On 22/02/2011 13:27, alex wrote:

alex wrote:

Mark Thomas wrote:

On 21/02/2011 04:25, alex wrote:

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if I 
add
%zD0 . I'm supposed to get bad request in this case. how do I fix 
this

problem?

Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you
using?

Mark

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


I used 6.0.24 .
http://localhost:8080/examples/servlets/%D0 returns 404
http://localhost:8080/examples/servlets/%zD0 returns blank page



Can anyone tell me if it's a bug or a problem on my side?
thanks.


Again, look at the response *headers*.

Mark

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



Mark,
it does return 400 code, but in my app I set:
...
   
400
/WEB-INF/error.jsp
  
   
404
/WEB-INF/error.jsp
  
.

and tomcat doesn't show it. this custom err page is shown for 404 code, 
but not for 400...

Can you give me a hint why?
thanks again.


probably because :
because of the bad URL, Tomcat never even "maps" this call to your application, so it 
sends its own 400 error page (as Konstantin already explained, I believe).



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



Re: related to bad url encoding?...

2011-02-22 Thread alex

Mark Thomas wrote:

On 22/02/2011 13:27, alex wrote:

alex wrote:

Mark Thomas wrote:

On 21/02/2011 04:25, alex wrote:

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if I add
%zD0 . I'm supposed to get bad request in this case. how do I fix this
problem?

Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you
using?

Mark

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


I used 6.0.24 .
http://localhost:8080/examples/servlets/%D0 returns 404
http://localhost:8080/examples/servlets/%zD0 returns blank page



Can anyone tell me if it's a bug or a problem on my side?
thanks.


Again, look at the response *headers*.

Mark

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



Mark,
it does return 400 code, but in my app I set:
...
   
400
/WEB-INF/error.jsp
  
   
404
/WEB-INF/error.jsp
  
.

and tomcat doesn't show it. this custom err page is shown for 404 code, 
but not for 400...

Can you give me a hint why?
thanks again.








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



JMX login error : java.lang.NullPointerException at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)

2011-02-22 Thread Dustin Chesterman
Hello all -
  We are running Tomcat 6 on RHEL 5 and Oracle JDK 1.6_24 and I am
having a problem loggin into the jmx services remotely through
jconsole.

Here is my setenv.sh :

JAVA_OPTS="-Xms512m -Xmx1152m -XX:MaxPermSize=512m"
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9888"
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"
CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.hostname=192.168.33.70"
CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.logCalls=true"


Here is the output from 'ps -elf | grep tomcat'  (I also see the 9888
port listening when using netstat) :

0 S root  2930 1  1  85   0 - 500084 184466 20:47 ?
00:00:15 /usr/java/default/bin/java
-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
-Xms512m -Xmx1152m -XX:MaxPermSize=512m
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-server -Dbuild.compiler.emacs=true -Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9888
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=192.168.XX.XX
-Djava.rmi.server.logCalls=true
-Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath
/usr/local/tomcat/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat
-Dcatalina.home=/usr/local/tomcat
-Djava.io.tmpdir=/usr/local/tomcat/temp
org.apache.catalina.startup.Bootstrap start


Then when trying to connect through jconsole I am running the
following command :

jconsole -debug 192.168.XX.XX:9888


It throws the following error:

java.lang.NullPointerException
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:228)
at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:334)
at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:296)
at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:281)


I have run out of ideas for debugging this and can't seem to find any
answers.  Any thought or ideas?

As a second problem, shutting down tomcat does not stop the jmx
process and i cannot restart tomcat since it is still listening on
9888.  Do I have to specify anything to stop the JMX process during
shutdown?


Thanks all
-- 
- Dustin Chesterman

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



RE: 400 Errors while trying to deploy manager app.

2011-02-22 Thread Martin Gainty

this shared-build war sounds like you *might* want a base servlet webapp 
(portal) servicing n number of portals
checkout liferay, hippo and jetspeed (portal management systems) for those 
specific implementations...

follow konstantins advice to successfully deploy this webapp under tomcat
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Tue, 22 Feb 2011 10:56:30 -0500
> From: shev...@homeport.org
> To: users@tomcat.apache.org
> CC: knst.koli...@gmail.com
> Subject: Re: 400 Errors while trying to deploy manager app.
> 
> On 2/22/2011 3:37 AM, Konstantin Kolinko wrote:
> > Two steps:
> > 1. Remove path and docBase from the file.
> > 2. Rename the context file into "META-INF/context.xml" (exact name --
> > case of characters does matter!) and add it into your war file.  (That
> > is easy with Ant, or with `jar -uf`, I do not know about jenkins).
> > That file will be used by Tomcat when you deploy your application.
> > See "Context" page in the configuration reference for more details.
> 
> Sure, I understand that part of how Context works, the problem is this
> is a shared-build war file, and the Parameters are used to tell the
> deployed war file where to store it's config file and log configuration.
>  So I can't embed it into the .war file.
> 
> The goal is to have a mvn tomcat:deploy punch a war file via the manager
> into a running tomcat server, and having it's context there have
> Parameters associated with it.  I think this might be impossible since
> tomcat-deploy makes up it's own context upon deployment :-/
> 
>   -d
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
  

RE: server running website

2011-02-22 Thread Caldarale, Charles R
> From: Joel [mailto:felixtheratr...@gmail.com] 
> Subject: server running website

> But when I try to go to the page "localhost:8080" or "localhost:80"
> Safari says:
> "Safari can't open the page "http://function2.basiceng.umr.edu/view"; because
> Safari can't find the server "function2.basiceng.umr.edu"."

Looks like something is seriously askew in your hosts file.  The localhost id 
should always be mapped to 127.0.0.1, not some external DNS name.

> When I don't run the server as sudo I get things like
> Safari can't open the page "http://www.localhost.com:80/"; because the server
> unexpectedly dropped the connection. This sometimes occurs when the server
> is busy. Wait for a few minutes, and then try again.

Again, it looks like something's wrong with the hosts file.  Might be as simple 
as not having a hosts file, or not having an entry for localhost.

Another possibility is that you may have a webapp deployed that has hard-coded 
the original website address, and did a redirect with it - hard coding like 
that is a very, very bad practice.

 - 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: 400 Errors while trying to deploy manager app.

2011-02-22 Thread Dave Shevett
On 2/22/2011 3:37 AM, Konstantin Kolinko wrote:
> Two steps:
> 1. Remove path and docBase from the file.
> 2. Rename the context file into "META-INF/context.xml" (exact name --
> case of characters does matter!) and add it into your war file.  (That
> is easy with Ant, or with `jar -uf`, I do not know about jenkins).
> That file will be used by Tomcat when you deploy your application.
> See "Context" page in the configuration reference for more details.

Sure, I understand that part of how Context works, the problem is this
is a shared-build war file, and the Parameters are used to tell the
deployed war file where to store it's config file and log configuration.
 So I can't embed it into the .war file.

The goal is to have a mvn tomcat:deploy punch a war file via the manager
into a running tomcat server, and having it's context there have
Parameters associated with it.  I think this might be impossible since
tomcat-deploy makes up it's own context upon deployment :-/

-d

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



Re: server running website

2011-02-22 Thread David Smith
Check the logs to find out what happened when you attempted to start the
server.  Is there something else already running on the ports tomcat is
trying to use?  What does netstat list as listening ports with and
without tomcat running?  Also what connectors are configured in your
tomcat's server.xml?

As you can see way too many questions to offer any suggestions.

--David

On 2/22/2011 10:44 AM, Joel wrote:
> So my boss has a Tomcat folder that was running a website at his old job. I
> don't know how to determine the exact version but in the realease notes
> there is: "$Id: RELEASE-NOTES-4.1.txt,v 1.81 2003/10/27 13:40:27 remm Exp $"
> he wants to run it on a new machine, the OS is: Mac OS X Server 10.6.5
>
>  When I do "sudo bash startup.sh" I get:
> Using CATALINA_BASE:   /opt/Tomcat
> Using CATALINA_HOME:   /opt/Tomcat
> Using CATALINA_TMPDIR: /opt/Tomcat/temp
> Using JAVA_HOME:   /Library/Java/Home
>
> But when I try to go to the page "localhost:8080" or "localhost:80"
>
> Safari says:
>
> "Safari can’t open the page “http://function2.basiceng.umr.edu/view” because
> Safari can’t find the server “function2.basiceng.umr.edu”."
>
> When I don't run the server as sudo I get things like
>
> Safari can’t open the page “http://www.localhost.com:80/” because the server
> unexpectedly dropped the connection. This sometimes occurs when the server
> is busy. Wait for a few minutes, and then try again.
>
>
> Likewise when shutting down the server without sudo:
> Using CATALINA_BASE:   /opt/Tomcat
> Using CATALINA_HOME:   /opt/Tomcat
> Using CATALINA_TMPDIR: /opt/Tomcat/temp
> Using JAVA_HOME:   /Library/Java/Home
> Catalina.stop: java.net.ConnectException: Connection refused
> java.net.ConnectException: Connection refused
>  at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>  at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
> at java.net.Socket.connect(Socket.java:529)
>  at java.net.Socket.connect(Socket.java:478)
> at java.net.Socket.(Socket.java:375)
>  at java.net.Socket.(Socket.java:189)
> at org.apache.catalina.startup.Catalina.stop(Catalina.java:581)
>  at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
> at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
>  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>
> I don't mind running the server as root currently (I was just showing that
> to see if that was a symptom of another problem), but I was wondering how it
> can obviously find the correct previous web address but not find the server
> that is running it; is it for some reason trying to go to the previous
> website even though I told it to go to localhost? I tried changing all the
> files in the tomcat folder to being owned by my user name but that had no
> effect (that was impulsive hopefully that won't screw anything up later, let
> me know if so)
>
> I was wondering where I should start looking to resolve these problems.
> Thanks.


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



server running website

2011-02-22 Thread Joel
So my boss has a Tomcat folder that was running a website at his old job. I
don't know how to determine the exact version but in the realease notes
there is: "$Id: RELEASE-NOTES-4.1.txt,v 1.81 2003/10/27 13:40:27 remm Exp $"
he wants to run it on a new machine, the OS is: Mac OS X Server 10.6.5

 When I do "sudo bash startup.sh" I get:
Using CATALINA_BASE:   /opt/Tomcat
Using CATALINA_HOME:   /opt/Tomcat
Using CATALINA_TMPDIR: /opt/Tomcat/temp
Using JAVA_HOME:   /Library/Java/Home

But when I try to go to the page "localhost:8080" or "localhost:80"

Safari says:

"Safari can’t open the page “http://function2.basiceng.umr.edu/view” because
Safari can’t find the server “function2.basiceng.umr.edu”."

When I don't run the server as sudo I get things like

Safari can’t open the page “http://www.localhost.com:80/” because the server
unexpectedly dropped the connection. This sometimes occurs when the server
is busy. Wait for a few minutes, and then try again.


Likewise when shutting down the server without sudo:
Using CATALINA_BASE:   /opt/Tomcat
Using CATALINA_HOME:   /opt/Tomcat
Using CATALINA_TMPDIR: /opt/Tomcat/temp
Using JAVA_HOME:   /Library/Java/Home
Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
 at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:529)
 at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.(Socket.java:375)
 at java.net.Socket.(Socket.java:189)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:581)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

I don't mind running the server as root currently (I was just showing that
to see if that was a symptom of another problem), but I was wondering how it
can obviously find the correct previous web address but not find the server
that is running it; is it for some reason trying to go to the previous
website even though I told it to go to localhost? I tried changing all the
files in the tomcat folder to being owned by my user name but that had no
effect (that was impulsive hopefully that won't screw anything up later, let
me know if so)

I was wondering where I should start looking to resolve these problems.
Thanks.


Re: related to bad url encoding?...

2011-02-22 Thread Mark Thomas
On 22/02/2011 13:27, alex wrote:
> alex wrote:
>> Mark Thomas wrote:
>>> On 21/02/2011 04:25, alex wrote:
 hi all,
 I get 404 err, if I add %D0 to url, but I get just blank page if I add
 %zD0 . I'm supposed to get bad request in this case. how do I fix this
 problem?
>>>
>>> Check the response headers.
>>>
>>> If you don't see a 400 response, exactly which Tomcat version are you
>>> using?
>>>
>>> Mark
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>
>> I used 6.0.24 .
>> http://localhost:8080/examples/servlets/%D0 returns 404
>> http://localhost:8080/examples/servlets/%zD0 returns blank page
>>
>>
> Can anyone tell me if it's a bug or a problem on my side?
> thanks.

Again, look at the response *headers*.

Mark

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



Re: related to bad url encoding?...

2011-02-22 Thread alex

alex wrote:

Mark Thomas wrote:

On 21/02/2011 04:25, alex wrote:

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if I add
%zD0 . I'm supposed to get bad request in this case. how do I fix this
problem?


Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you 
using?


Mark

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



I used 6.0.24 .
http://localhost:8080/examples/servlets/%D0 returns 404
http://localhost:8080/examples/servlets/%zD0 returns blank page



Can anyone tell me if it's a bug or a problem on my side?
thanks.


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



Re: Tomcat won't serve newly created files

2011-02-22 Thread angelicos
>One possibility is that you have a ROOT.xml in conf/Catalina/localhost that
>defines a different docBase for your webapp.
Sorry there's no such file defined in that directory path.

There is only one version of tomcat on the system.
The web.xml is the one I found in the conf folder for tomcat and the login
is done programmatically. As for why the context element is missing in it I
don't know, but I've never had to touch it either, I'm also only using one
AccessLogValve I must've uncommented the other.
As for the possibility of proxy caching/firewall issues I'll test for that
later but I really doubt that is the issue. (I have emptied the webapp
folder and connected to the server. It served a blank page)

On 22 February 2011 04:23, Caldarale, Charles R
wrote:

> > From: angelicos [mailto:angeli...@gmail.com]
> > Subject: Re: Tomcat won't serve newly created files
>
> > the reason I know that tomcat is serving the wrong app
> > version is because the login page for the updated app is
> > different to the one tomcat is serving along with several
> > other pages served after logging in, and there are no
> > others apps deployed in the webapp folder.
>
> One possibility is that you have a ROOT.xml in conf/Catalina/localhost that
> defines a different docBase for your webapp.  (This was mentioned
> previously, but you didn't respond to it.)
>
> Are you sure you're using the same Tomcat that you place the updated webapp
> in?  (Don't laugh; it happens a lot.)
>
> You may also be encountering browser or proxy caching issues.  It might be
> useful to configure a non-proxied , and test with that directly
> from inside the firewall.
>
> > The following are the server and context.xml fies:
> > http://fpaste.org/uIsJ/
>
> You actually posted a (possibly partial) web.xml, not a  element.
>  Where does this web.xml come from?  If it's Tomcat's conf/web.xml, be aware
> that you really shouldn't be putting app-specific security constraints
> there; they belong in the webapp's WEB-INF/web.xml file.  Also, the security
> settings are incomplete: there's no indication that any form of login is
> required - but perhaps you're doing that programmatically.  If what you
> posted is the webapp's WEB-INF/web.xml, why did you duplicate so much from
> the default on in conf/web.xml?
>
> In your server.xml, you have both AccessLogValve and
> FastCommonAccessLogValve enabled; choose one or the other, not both.
>
>  - 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
>
>


-- 
A Hundred Elephants can knock down the walls of a fortress.
One diseased rat can kill everyone inside


Re: Regarding GSoC

2011-02-22 Thread Mark Thomas
On 22/02/2011 08:39, rukhsana afroz wrote:
> Hi,
> 
> I want to address the attention from the administrative people of this
> group. Are you participating in GSoC program this year? If so, which part of
> this project, you want to enhance? If you could give me a little bit idea
> about that, it would be great help for me. I am very interested to work on
> this project.

I'm not aware of any plans for the Tomcat committers to submit suggested
projects to GSoC this year but I assume the ASF will be participating as
it has previously.

If you have an idea for a Tomcat based GSoC project you would like to do
then I recommend that you discuss your idea here but keep in mind the
following:
- we won't know if the ASF is participating in GSoC until March 18
- the users list is the right place to discuss whether or not a feature
would be useful, the dev list is the place to discuss how to implement a
feature

Mark

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



Regarding GSoC

2011-02-22 Thread rukhsana afroz
Hi,

I want to address the attention from the administrative people of this
group. Are you participating in GSoC program this year? If so, which part of
this project, you want to enhance? If you could give me a little bit idea
about that, it would be great help for me. I am very interested to work on
this project.

Thanks
Ruby

-- 
Rukhsana Ruby
Phd Student
Department of Electrical & Computer Engineering
The University of British Columbia



Re: 400 Errors while trying to deploy manager app.

2011-02-22 Thread Konstantin Kolinko
2011/2/22 Dave Shevett :
> So in all honesty, this is now going back to a question I was trying to
> solve to begin with - this may hijack the thread, but here goes anyway.
>
> The other vhosts have fixed deployments.  They have ROOT.xml's that
> deploy the .war file for each vhost:
>
> 
>         value="/var/lib/congo/arisia.stonekeep.com/" override="false" />
>         value="file:/var/lib/congo/arisia.stonekeep.com/log4j.xml"
> override="false" />
> 
>
> The Parameter is needed for the vhost to specify where to write
> configuration files.
>
> If jenkins is forcing the deploy via the app manager, how do I specify
> parameters for the vhost context path
> "http://congov2.stonekeep.com/congo/";  ?
>
> (I've also been informed the 'path="/"' here is illegal.  It was left
> over by the first person who built this setup - haven't tried removing
> it yet :)

If your goal is to keep "Parameters" in your context file:

Two steps:
1. Remove path and docBase from the file.
2. Rename the context file into "META-INF/context.xml" (exact name --
case of characters does matter!) and add it into your war file.  (That
is easy with Ant, or with `jar -uf`, I do not know about jenkins).
That file will be used by Tomcat when you deploy your application.
See "Context" page in the configuration reference for more details.

Best regards,
Konstantin Kolinko

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