Re: Tomcat 5.5 crashes after changing server IP

2011-12-12 Thread Pid
On 12/12/2011 00:29, sir...@8host.pl wrote:
 One more log:
 
 2011-12-12 00:52:15 org.apache.catalina.core.AprLifecycleListener init
 INFO: The APR based Apache Tomcat Native library which allows optimal
 performance in production environments was not found on the
 java.library.path:
 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1$
 
 2011-12-12 00:52:16 org.apache.tomcat.util.digester.Digester endElement
 WARNING:   No rules found matching 'Server/Service/Context'.

You can't define a Context directly under Service in server.xml, it must
be inside a Host.

You should avoid defining the Context in server.xml at all.  Instead,
put it in 'torun/META-INF/context.xml'

 2011-12-12 00:52:16 org.apache.tomcat.util.digester.SetPropertiesRule begin
 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting
 property 'debug' to '0' did not find a matching property.

There is no debug property on Host.

 2011-12-12 00:52:16 org.apache.tomcat.util.digester.SetPropertiesRule begin
 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
 property 'debug' to '0' did not find a matching property.

There is no debug property on Context.

 2011-12-12 00:52:16 org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on http-8080
 2011-12-12 00:52:16 org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 1020 ms
 2011-12-12 00:52:16 org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 2011-12-12 00:52:16 org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
 2011-12-12 00:52:17 org.apache.catalina.loader.WebappClassLoader
 validateJarFile
 INFO: validateJarFile(/var/www/torun/WEB-INF/lib/servletapi-2.2.jar) -
 jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
 javax/servlet/Servlet.class

You have a JAR in your application that you should not have.

If you have published /var/www/ (or /var/www/torun) as an Apache HTTPD
DocumentRoot you are increasing the risk of exposing data that should be
protected, because Apache HTTPD will bypass Tomcat controls.

 2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig deployDescriptor
 INFO: Deploying configuration descriptor host-manager.xml
 2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig deployDescriptor
 INFO: Deploying configuration descriptor manager.xml
 2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory docs
 2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory ROOT
 2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory examples
 2011-12-12 00:52:18 org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on http-8080
 2011-12-12 00:52:18 org.apache.jk.common.ChannelSocket init
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 2011-12-12 00:52:18 org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/10  config=null
 2011-12-12 00:52:18 org.apache.catalina.startup.Catalina start
 INFO: Server startup in 1976 ms
 2011-12-12 00:53:09 org.apache.coyote.http11.Http11Protocol pause
 INFO: Pausing Coyote HTTP/1.1 on http-8080
 2011-12-12 00:53:10 org.apache.catalina.core.StandardService stop
 INFO: Stopping service Catalina

This looks like a normal stop.

 2011-12-12 00:53:10 org.apache.catalina.core.StandardWrapper unload
 INFO: Waiting for 1 instance(s) to be deallocated
 2011-12-12 00:53:11 org.apache.catalina.core.StandardWrapper unload
 INFO: Waiting for 1 instance(s) to be deallocated
 2011-12-12 00:53:12 org.apache.catalina.core.StandardWrapper unload
 INFO: Waiting for 1 instance(s) to be deallocated
 2011-12-12 00:53:12 org.apache.catalina.loader.WebappClassLoader
 clearReferencesThreads
 SEVERE: The web application [] is still processing a request that has
 yet to finish. This is very likely to create a memory leak. You can
 control the time allowed for requests to finish by using the unloadDelay
 attribute of the standard$
 2011-12-12 00:53:12 org.apache.coyote.http11.Http11Protocol destroy
 INFO: Stopping Coyote HTTP/1.1 on http-8080

A request was taking a long time to process  was still running when the
server stopped.

 It is probly Tomcat + Xen (KVM) + Intel (?) releted problem.

I really have no idea how you come to that conclusion.


 I install
 tomcat from 5 to 7 on diferent VPS's, always have the same result but
 always i have Xen or KVM and Intel CPU, old serwer has AMD cpu and all
 works great (and some older version of Xen also), but on new Xen or KVM
 based VPS i always have the same problem. But when i run XEN machine
 with Windows 8 and run on it VirtuaBox and starts new 32 bit CentOS all
 work great (but i have virtualization on virtualized machine ;) ). Its
 realy strange problem, and have no idea how to solve it.

Fix one 

Re: Tomcat proxy configuration for serverside http requests

2011-12-12 Thread André Warnier

Dale Ogilvie wrote:

Hi,

 


Weird issue, perhaps someone can explain how this might be happening
from a tomcat perspective...

 


I have some CXF generated web service client code that calls a web
service that operates on an IP whitelist. If I run this code from the
shell as the tomcat owner user apache_tomcat on the app server (RHEL6)
the webservice reports that the client ip is the app server. This is as
expected, it is making a direct http connection to the web service.

 


If I wrap this exact same code in a jsp and deploy it to tomcat 7.0.20
on the app server, where tomcat is running as user apache_tomcat, the
client ip is reported as one of our internal proxy servers. This should
not be happening.

 


There are no http_proxy environment variables set for either
apache_tomcat or root. The tomcat jvm has no -Dhttp.proxy settings. But,
it seems that the code running in tomcat is pulling a proxy definition
from somewhere.

 


Any ideas where this proxy is coming from? We can't find anything at all
on the OS. Is tomcat or java itself proactively searching for available
proxies?

 


The only way to get the behaviour we want is to use -Dhttp.proxy and
-DnonProxyHosts statements on the tomcat jvm command line. If we do
this, we can at least get a proxy on the same continent J


Just to complete your report :
- is the JVM used in both cases exactly the same ?
- are either one of the Tomcats (or both) using the native APR library ?
  (although I have no idea really if this is relevant or not when a webapp makes its own 
connections)



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



Re: Tomcat 5.5 crashes after changing server IP

2011-12-12 Thread sirwiz

It is probly Tomcat + Xen (KVM) + Intel (?) releted problem.


I really have no idea how you come to that conclusion.


Like i said when i install Windows 8 on Xen machine, starts Virtuabox 
on it and new 32bit Centos, tomcat and my api works perfectly. It was 
running for a 2 years on AMD procesor (with the same config files) and 
it works like charm also. Problem starts when we switch to new Intel 
machine. I also try to install the same version of xen on AMD server and 
it works, that only dont work on xen or kvm. Also i dowload whole Xen 
disk image and run it on different intel procesor on virtuabox (Windoiws 
7) and the same error. Its realy strange situation when i have to 
virtualize 2 systems to make it work ;). When i convert working 
virtuabox machine to Xen image, i have the same error.




I install
tomcat from 5 to 7 on diferent VPS's, always have the same result 
but
always i have Xen or KVM and Intel CPU, old serwer has AMD cpu and 
all
works great (and some older version of Xen also), but on new Xen or 
KVM

based VPS i always have the same problem. But when i run XEN machine
with Windows 8 and run on it VirtuaBox and starts new 32 bit CentOS 
all
work great (but i have virtualization on virtualized machine ;) ). 
Its

realy strange problem, and have no idea how to solve it.


Fix one thing at a time.  Start with your config.


It was log from oryginal Tomcat instalation, on new install we have 
only AJP stops and Memory Leak.


Best wishes
Marcin


On 12.12.2011 09:03, Pid wrote:

On 12/12/2011 00:29, sir...@8host.pl wrote:

One more log:

2011-12-12 00:52:15 org.apache.catalina.core.AprLifecycleListener 
init
INFO: The APR based Apache Tomcat Native library which allows 
optimal

performance in production environments was not found on the
java.library.path:

/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1$

2011-12-12 00:52:16 org.apache.tomcat.util.digester.Digester 
endElement

WARNING:   No rules found matching 'Server/Service/Context'.


You can't define a Context directly under Service in server.xml, it 
must

be inside a Host.

You should avoid defining the Context in server.xml at all.  Instead,
put it in 'torun/META-INF/context.xml'

2011-12-12 00:52:16 
org.apache.tomcat.util.digester.SetPropertiesRule begin

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting
property 'debug' to '0' did not find a matching property.


There is no debug property on Host.

2011-12-12 00:52:16 
org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} 
Setting

property 'debug' to '0' did not find a matching property.


There is no debug property on Context.


2011-12-12 00:52:16 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2011-12-12 00:52:16 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1020 ms
2011-12-12 00:52:16 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2011-12-12 00:52:16 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
2011-12-12 00:52:17 org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO: validateJarFile(/var/www/torun/WEB-INF/lib/servletapi-2.2.jar) 
-
jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending 
class:

javax/servlet/Servlet.class


You have a JAR in your application that you should not have.

If you have published /var/www/ (or /var/www/torun) as an Apache 
HTTPD
DocumentRoot you are increasing the risk of exposing data that should 
be

protected, because Apache HTTPD will bypass Tomcat controls.

2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig 
deployDescriptor

INFO: Deploying configuration descriptor host-manager.xml
2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig 
deployDescriptor

INFO: Deploying configuration descriptor manager.xml
2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig 
deployDirectory

INFO: Deploying web application directory docs
2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig 
deployDirectory

INFO: Deploying web application directory ROOT
2011-12-12 00:52:18 org.apache.catalina.startup.HostConfig 
deployDirectory

INFO: Deploying web application directory examples
2011-12-12 00:52:18 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2011-12-12 00:52:18 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
2011-12-12 00:52:18 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/10  config=null
2011-12-12 00:52:18 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1976 ms
2011-12-12 00:53:09 org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
2011-12-12 00:53:10 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina


This looks like a normal stop.


2011-12-12 

Re: Tomcat 5.5 crashes after changing server IP

2011-12-12 Thread André Warnier

sir...@8host.pl wrote:

It is probly Tomcat + Xen (KVM) + Intel (?) releted problem.


I really have no idea how you come to that conclusion.


Like i said when i install Windows 8 on Xen machine, starts Virtuabox on 
it and new 32bit Centos, tomcat and my api works perfectly. It was 
running for a 2 years on AMD procesor (with the same config files) and 
it works like charm also. Problem starts when we switch to new Intel 
machine. I also try to install the same version of xen on AMD server and 
it works, that only dont work on xen or kvm. Also i dowload whole Xen 
disk image and run it on different intel procesor on virtuabox (Windoiws 
7) and the same error. Its realy strange situation when i have to 
virtualize 2 systems to make it work ;). When i convert working 
virtuabox machine to Xen image, i have the same error.


It seems really unclear what all of this has to do with Tomcat.
Tomcat is Java code. It runs under a JVM, and uses that JVM's code for anything to do with 
the interface to the underlying OS or hardware.  So it should not make an iota of 
difference to Tomcat under which OS and machine it is running.
On the other hand, the /JVM/ which you are using may have problems, but again that has 
nothing to do fundamentally with Tomcat.






I install
tomcat from 5 to 7 on diferent VPS's, always have the same result but
always i have Xen or KVM and Intel CPU, old serwer has AMD cpu and all
works great (and some older version of Xen also), but on new Xen or KVM
based VPS i always have the same problem. But when i run XEN machine
with Windows 8 and run on it VirtuaBox and starts new 32 bit CentOS all
work great (but i have virtualization on virtualized machine ;) ). Its
realy strange problem, and have no idea how to solve it.


Fix one thing at a time.  Start with your config.


It was log from oryginal Tomcat instalation, on new install we have 
only AJP stops and Memory Leak.




Then provide the new log, or do you just want us to keep guessing ?

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



Re: Tomcat 5.5 crashes after changing server IP

2011-12-12 Thread Pid
On 12/12/2011 12:02, André Warnier wrote:
 sir...@8host.pl wrote:
 It is probly Tomcat + Xen (KVM) + Intel (?) releted problem.

 I really have no idea how you come to that conclusion.

 Like i said when i install Windows 8 on Xen machine, starts Virtuabox
 on it and new 32bit Centos, tomcat and my api works perfectly. It was
 running for a 2 years on AMD procesor (with the same config files) and
 it works like charm also. Problem starts when we switch to new Intel
 machine. I also try to install the same version of xen on AMD server
 and it works, that only dont work on xen or kvm. Also i dowload whole
 Xen disk image and run it on different intel procesor on virtuabox
 (Windoiws 7) and the same error. Its realy strange situation when i
 have to virtualize 2 systems to make it work ;). When i convert
 working virtuabox machine to Xen image, i have the same error.

Correlation != causation

Have you fixed the other errors in your config?


p

 It seems really unclear what all of this has to do with Tomcat.
 Tomcat is Java code. It runs under a JVM, and uses that JVM's code for
 anything to do with the interface to the underlying OS or hardware.  So
 it should not make an iota of difference to Tomcat under which OS and
 machine it is running.
 On the other hand, the /JVM/ which you are using may have problems, but
 again that has nothing to do fundamentally with Tomcat.
 


 I install
 tomcat from 5 to 7 on diferent VPS's, always have the same result but
 always i have Xen or KVM and Intel CPU, old serwer has AMD cpu and all
 works great (and some older version of Xen also), but on new Xen or KVM
 based VPS i always have the same problem. But when i run XEN machine
 with Windows 8 and run on it VirtuaBox and starts new 32 bit CentOS all
 work great (but i have virtualization on virtualized machine ;) ). Its
 realy strange problem, and have no idea how to solve it.

 Fix one thing at a time.  Start with your config.

 It was log from oryginal Tomcat instalation, on new install we have
 only AJP stops and Memory Leak.

 
 Then provide the new log, or do you just want us to keep guessing ?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat proxy configuration for serverside http requests

2011-12-12 Thread Pid
On 12/12/2011 09:56, André Warnier wrote:
 Dale Ogilvie wrote:
 Hi,

  

 Weird issue, perhaps someone can explain how this might be happening
 from a tomcat perspective...

  

 I have some CXF generated web service client code that calls a web
 service that operates on an IP whitelist. If I run this code from the
 shell as the tomcat owner user apache_tomcat on the app server (RHEL6)
 the webservice reports that the client ip is the app server. This is as
 expected, it is making a direct http connection to the web service.

  

 If I wrap this exact same code in a jsp and deploy it to tomcat 7.0.20
 on the app server, where tomcat is running as user apache_tomcat, the
 client ip is reported as one of our internal proxy servers. This should
 not be happening.

  

 There are no http_proxy environment variables set for either
 apache_tomcat or root. The tomcat jvm has no -Dhttp.proxy settings. But,
 it seems that the code running in tomcat is pulling a proxy definition
 from somewhere.

  

 Any ideas where this proxy is coming from? We can't find anything at all
 on the OS. Is tomcat or java itself proactively searching for available
 proxies?

  

 The only way to get the behaviour we want is to use -Dhttp.proxy and
 -DnonProxyHosts statements on the tomcat jvm command line. If we do
 this, we can at least get a proxy on the same continent J

 Just to complete your report :
 - is the JVM used in both cases exactly the same ?
 - are either one of the Tomcats (or both) using the native APR library ?
   (although I have no idea really if this is relevant or not when a
 webapp makes its own connections)

Could the app contain code which uses a specific proxy?


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Compatability Problem OSX to Windows 7 Port

2011-12-12 Thread Glyn Thomas
 I am attempting to port a Tomcat/MySql application from OSX to Windows 7
(I previously ported it from Vista to OSX, so it shouldn't be as difficult
as it sounds), and am having problems with back-compatibity on some
queries.

The application works correctly on OSX, with Tomcat 5.5, JRE 1.5.0 R12,
Tomcat JDK 4 Compatibility Pack, J/Connector 5.1.14 and MySql 5.0.

On Windows 7, my configuration is Tomcat 5.5.34, JRE 1.6.0 R26, J/Connector
5.1.18, MySql 5.5.  (I tried both with and without the JDK 4 Compatibility
pack and it doesn't make a difference).

The following test JSP shows the problem:

%@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql %
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en
 head
  meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
  titleTest/title
/head
body
h1Results/h1
  sql:query var=rsImages dataSource=jdbc/Images
SELECT
i.imageID,i.DateDay,i.DateMonth,i.DateYear,i.Location1,i.Location2,i.ScannedYN,c.description
AS country,sd1.description AS Subject, sdt.fieldtypeid, sdt.lookuptablename
FROM image_tbl i, lu_country_tbl c, xrf_image_subject_tbl si, subject_tbl
s, subject_detail_tbl sd1, lu_subject_detail_type_tbl sdt
WHERE (i.countryID=c.CountryID) AND (si.SubjectID=s.SubjectID) AND
(si.ImageID=i.ImageID)
AND (s.SubjectID=sd1.subjectID) AND
(sd1.subjectdetailtypeid=sdt.subjectdetailtypeid) AND
(sd1.subjectdetailtypeid IN (1,2,6,8,9,13)) and i.imageid=20002
  /sql:query
ID: ${rsImages.rows[0].ImageID}br
Location: ${rsImages.rows[0].Location1}br
Country: ${rsImages.rows[0].country}br
Subject: ${rsImages.rows[0].subject}br
Description: ${rsImages.rows[0].Description}br
ID: ${rsImages.rows[1].ImageID}br
Location: ${rsImages.rows[1].Location1}br
Country: ${rsImages.rows[1].country}br
Subject: ${rsImages.rows[1].subject}br
Description: ${rsImages.rows[1].Description}br
/body
/html

When running this page, ID, Location and Description are all returned with
values.  However, country and Subject are not returned at all.  You will
note that country and Subject are both aliased in the query.  Description
is not a directly requested in the query, but is returning the contents of
sd1.description.

I seem to recall having a similar issue when first porting to OSX and
having to set backward compatibility somewhere, but can't find my records
for this anywhere.  Anyone got any ideas?

Thanks
Glyn Thomas


Re: Compatability Problem OSX to Windows 7 Port

2011-12-12 Thread Mikolaj Rydzewski

On Mon, 12 Dec 2011 08:07:31 -0500, Glyn Thomas wrote:


The following test JSP shows the problem:


Does the problem occur only in JSP? Are you able to run the query using 
regular SQL client?


--
Mikolaj Rydzewski m...@ceti.pl

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



Re: Compatability Problem OSX to Windows 7 Port

2011-12-12 Thread Glyn Thomas
Mikolaj,
if I run the same query in the MySql client it works correctly (column
names correctly aliased).

Thanks
Glyn

On Mon, Dec 12, 2011 at 8:18 AM, Mikolaj Rydzewski m...@ceti.pl wrote:

 On Mon, 12 Dec 2011 08:07:31 -0500, Glyn Thomas wrote:

 The following test JSP shows the problem:


 Does the problem occur only in JSP? Are you able to run the query using
 regular SQL client?

 --
 Mikolaj Rydzewski m...@ceti.pl

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




Re: Tomcat memory allocation

2011-12-12 Thread Mark H. Wood
On Fri, Dec 09, 2011 at 02:52:23PM -, Martin O'Shea wrote:
 Thanks for this Chuck. I realise now what is happening. I thought the
 PermGen space was used in the heap when now I see it as just storing class
 definitions. So I could reduce it below 128Mb if I choose. Is there a
 default value?

There are defaults for all of the settings, in Java not Tomcat.

But defaults are irrelevant in production.  Tuning is always with
respect to your workload, not someone else's averages.  You need to
give more resources to your application until it starts and runs under
modest load, then monitor its resource utilization and make further
adjustments to give it enough headroom for unexpected load spikes
without wasting resources which will never be used.  Then monitor
periodically to be sure you haven't missed anything.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Asking whether markets are efficient is like asking whether people are smart.


pgpdLXWljzavv.pgp
Description: PGP signature


Cannot create JDBC driver of class error occurs when upgrading from tomcat-6.0.33 to tomcat 6.0.35

2011-12-12 Thread Charlotte Binns
Hi,
 
I wonder if any one can offer me any assistance with a problem I am
having as I am struggling to find the resolution to my issue. I am
attempting to upgrade my tomcat version from tomcat 6.0.33 to tomcat
6.0.35.
 
My server build is:
Centos 5.5 32 bit
Apache web server 2.2.21
PHP 5.3.8
mysql 5.5.15
 
tomcat 6.0.35 
 
The problem is I keep getting a database exception for mysql databases
only. My oracle databases still work.
 
This is the error I get:
 
Cannot create JDBC driver of class '' for connect URL
'jdbc:mysql://hostname/dbname'
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:279)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(Basi
cDataSource.java:1437)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSo
urce.java:1371)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourc
e.java:1044)
at
org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.get
Connection(LocalDataSourceConnectionProvider.java:82)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
va:423)
at
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
a:144)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
at
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
at
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
at
uk.org.tate.roblib.hibernate.sequence.StandaloneHibernateSequenceGenerat
or.init(StandaloneHibernateSequenceGenerator.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414
)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
t(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
etSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:164)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re
solveReference(BeanDefinitionValueResolver.java:269)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re
solveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
t(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
etSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:164)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re

RE: Cannot create JDBC driver of class error occurs when upgrading from tomcat-6.0.33 to tomcat 6.0.35

2011-12-12 Thread Caldarale, Charles R
 From: Charlotte Binns [mailto:charlotte.bi...@tate.org.uk] 
 Subject: Cannot create JDBC driver of class error occurs when upgrading from 
 tomcat-6.0.33 to tomcat 6.0.35

 I added all my configuration to server.xml/web.xml

Exactly what did you change there?

 and tomcat-users.xml

Not suitable for a production environment.

 then copied in my web applications and /tomcat/conf/Catalina/localhost
 xml files required for my web applications.

And where did you put the MySQL driver jar?

 - 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: Tomcat memory allocation

2011-12-12 Thread Jeffrey Janner
 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Sent: Friday, December 09, 2011 10:35 AM
 To: Tomcat Users List
 Subject: RE: Tomcat memory allocation
 
  From: Martin O'Shea [mailto:app...@dsl.pipex.com]
  Subject: RE: Tomcat memory allocation
 
  I believe I should be looking in the Windows Registry
 
 DO NOT edit the Windows registry - you will break something.  Use the
 tomcat?w.exe utility; that's what it's for.
 
  - Chuck

Make all changes in the Java tab.  Set max  min heap settings in their little 
spaces at the bottom, and add any other Java options you desire, e.g. 
-XX:MaxPermSize=512m as separate lines in that great big box in the middle.
Jeff
__

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


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



RE: Cannot create JDBC driver of class error occurs when upgrading from tomcat-6.0.33 to tomcat 6.0.35

2011-12-12 Thread Charlotte Binns
Hi Chuck,

Thank you so much for you quick response.

For the server.xml I added quite a lot but this is exactly the same as
my server.xml from 6.0.33. I have added the server.xml file but edited
sensitive information from it.

For the web.xml all I have added extra are the following lines:

servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.html/url-pattern
/servlet-mapping

mime-mapping
extensionshtm/extension
mime-typetext/html/mime-type
/mime-mapping

 error-page
   exception-typejava.lang.Throwable/exception-type
   location/error.jsp/location
 /error-page

For the tomcat-users - this is for testing only for use with probe and
manager. Once everything is working this will be removed. 

The mysql jar file is located in $Catalina-home/lib directory for global
use.

I am using java-1.6.0-openjdk-1.6.0.0-1.23.1.9.10.el5_7
java-1.6.0-openjdk-devel-1.6.0.0-1.23.1.9.10.el5_7

And 
kernel-2.6.18-274.12.1.el5
kernel-devel-2.6.18-274.12.1.el5
kernel-headers-2.6.18-274.12.1.el5

Thanks again

Charlotte Binns 
IS Technical Architect
(020) 7887 8622 


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: 12 December 2011 14:49
To: Tomcat Users List
Subject: RE: Cannot create JDBC driver of class error occurs when
upgrading from tomcat-6.0.33 to tomcat 6.0.35

 From: Charlotte Binns [mailto:charlotte.bi...@tate.org.uk]
 Subject: Cannot create JDBC driver of class error occurs when 
 upgrading from tomcat-6.0.33 to tomcat 6.0.35

 I added all my configuration to server.xml/web.xml

Exactly what did you change there?

 and tomcat-users.xml

Not suitable for a production environment.

 then copied in my web applications and /tomcat/conf/Catalina/localhost

 xml files required for my web applications.

And where did you put the MySQL driver jar?

 - 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

?xml version='1.0' encoding='utf-8'?
Server port=8005 shutdown=complicatedPassword

  Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /

 Resource
name=jdbc/dbnameO
auth=Container
type=javax.sql.DataSource
driverClassName=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@servername:1521:dbnameO
username=username
password=passwordO
maxActive=100
maxIdle=10
minIdle=0
maxWait=1
validationQuery=select 1 from dual
timeBetweenEvictionRunsMillis=30 /
  
 Resource
name=jdbc/dbname1
auth=Container
type=javax.sql.DataSource
DriverClassName=com.mysql.jdbc.Driver
url=jdbc:mysql://hostname/dbname1
username=username
password=password
maxActive=10
maxIdle=5
minIdle=1
maxWait=15000 /

 Resource
name=jdbc/TatePaint
auth=Container
type=javax.sql.DataSource
DriverClassName=com.mysql.jdbc.Driver
url=jdbc:mysql://hostname/dbname2
username=username2
password=password2
maxActive=10
maxIdle=5
minIdle=1
maxWait=15000 /

Resource
name=mail/Session
auth=Container
type=javax.mail.Session
mail.smtp.host=mail.tate.org.uk /

Environment
name=application/filestore
type=java.lang.String
value=/folderpath/filestore /

Environment
name=application/filestorePrefix
type=java.lang.String
value=mg_ /

Environment
name=application/headIncludeUrl
  

path used for tc-natuve

2011-12-12 Thread André Warnier

Hi

On a Debian Linux system, was running a Debian-pre-packaged Tomcat 5.5.
We stopped this Tomcat 5.5, but did not remove the corresponding package(s).
Then we installed an official Tomcat 6, downloaded from the Tomcat website, in 
/opt/tomcat6 as CATALINA_HOME.
We then made a copy of the /etc/init.d startup script which used to start Tomcat 5.5, and 
modified it to start this new Tomcat6 instead.


Now when stopping and starting this Tomcat6, we are getting the message below (about APR) 
in the Tomcat6 logfile.


My question is : where could Tomcat6 find this APR tc-native of the wrong 
version ?
As far as I can tell, there is no unpacked tc-native anything in the Tomcat6 
directories.


Dec 12, 2011 12:37:14 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8180
12.12.2011 12:37:24 org.apache.catalina.core.AprLifecycleListener init
SCHWERWIEGEND: An incompatible version 1.1.12 of the APR based Apache Tomcat Native 
library is installed, while Tomcat requires version 1.1.17

12.12.2011 12:37:24 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180
12.12.2011 12:37:24 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2079 ms
12.12.2011 12:37:26 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
12.12.2011 12:37:26 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
12.12.2011 12:37:26 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory test
12.12.2011 12:37:27 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory dumpuser
12.12.2011 12:37:27 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory starweb
12.12.2011 12:37:27 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8180
12.12.2011 12:37:27 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
12.12.2011 12:37:27 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/55  config=null
12.12.2011 12:37:27 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2993 ms

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



Re: path used for tc-natuve

2011-12-12 Thread Francis GALIEGUE
On Mon, Dec 12, 2011 at 17:36, André Warnier a...@ice-sa.com wrote:
 Hi

 On a Debian Linux system, was running a Debian-pre-packaged Tomcat 5.5.
 We stopped this Tomcat 5.5, but did not remove the corresponding package(s).
 Then we installed an official Tomcat 6, downloaded from the Tomcat
 website, in /opt/tomcat6 as CATALINA_HOME.
 We then made a copy of the /etc/init.d startup script which used to start
 Tomcat 5.5, and modified it to start this new Tomcat6 instead.

 Now when stopping and starting this Tomcat6, we are getting the message
 below (about APR) in the Tomcat6 logfile.

 My question is : where could Tomcat6 find this APR tc-native of the wrong
 version ?
 As far as I can tell, there is no unpacked tc-native anything in the Tomcat6
 directories.


 Dec 12, 2011 12:37:14 PM org.apache.coyote.http11.Http11Protocol destroy
 INFO: Stopping Coyote HTTP/1.1 on http-8180
 12.12.2011 12:37:24 org.apache.catalina.core.AprLifecycleListener init
 SCHWERWIEGEND: An incompatible version 1.1.12 of the APR based Apache Tomcat
 Native library is installed, while Tomcat requires version 1.1.17

Can you:

perl -ple 's,\00,\n,g' /proc/$(pgrep java)/environ

and see what LD_LIBRARY_PATH is, if anything? (this is provided that
only one java process is running, otherwise adapt the pgrep command)

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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



Re: path used for tc-natuve

2011-12-12 Thread Pid *
On 12 Dec 2011, at 16:37, André Warnier a...@ice-sa.com wrote:

 Hi

 On a Debian Linux system, was running a Debian-pre-packaged Tomcat 5.5.
 We stopped this Tomcat 5.5, but did not remove the corresponding package(s).
 Then we installed an official Tomcat 6, downloaded from the Tomcat website, 
 in /opt/tomcat6 as CATALINA_HOME.
 We then made a copy of the /etc/init.d startup script which used to start 
 Tomcat 5.5, and modified it to start this new Tomcat6 instead.

 Now when stopping and starting this Tomcat6, we are getting the message below 
 (about APR) in the Tomcat6 logfile.

 My question is : where could Tomcat6 find this APR tc-native of the wrong 
 version ?
 As far as I can tell, there is no unpacked tc-native anything in the Tomcat6 
 directories.

$LD_LIBRARY_PATH

Or check the -Djava.library.path set by the script.


p




 Dec 12, 2011 12:37:14 PM org.apache.coyote.http11.Http11Protocol destroy
 INFO: Stopping Coyote HTTP/1.1 on http-8180
 12.12.2011 12:37:24 org.apache.catalina.core.AprLifecycleListener init
 SCHWERWIEGEND: An incompatible version 1.1.12 of the APR based Apache Tomcat 
 Native library is installed, while Tomcat requires version 1.1.17
 12.12.2011 12:37:24 org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on http-8180
 12.12.2011 12:37:24 org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 2079 ms
 12.12.2011 12:37:26 org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 12.12.2011 12:37:26 org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
 12.12.2011 12:37:26 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory test
 12.12.2011 12:37:27 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory dumpuser
 12.12.2011 12:37:27 org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory starweb
 12.12.2011 12:37:27 org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on http-8180
 12.12.2011 12:37:27 org.apache.jk.common.ChannelSocket init
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 12.12.2011 12:37:27 org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/55  config=null
 12.12.2011 12:37:27 org.apache.catalina.startup.Catalina start
 INFO: Server startup in 2993 ms

 -
 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



Detecting Mobile Device

2011-12-12 Thread Jerry Malcolm
What is the best/recommended way to determine if the request is coming from
a mobile device?  I have an alternate layout that I want to use for pages
going to a smart phone, etc.  I know there is client/browser info in the
request.  But it's more browser-specific info.  Is there one specific
string or something that I can look for that will catch all smart phones,
etc?

Recommendations?

Thanks.

Jerry


Deployment over a running webapp does not call session detroyed?

2011-12-12 Thread Gabriele Bulfon
Hi,
don't know if this is a problem of Tomcat integrated into NetBeans, but I 
noticed that rebuilding
my webapp (causing netbeans redeployment over the running webapp), older 
threads spawn by
running sessions are not killed, getting into exceptions because the real 
HttpSession objects
are killed and the jndi connections are closed.
I have a SessionListener in my webapp that kills this threads and cleanly exit 
the session, but
this is never called when redeployed.
On the other hand, the ContextListener contextDestroyed is called, but I have 
no way to
access my threads and kill them from there
Is this a bug or am I missing something?
Gabriele.

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

stderr

2011-12-12 Thread Jerry Malcolm
I have converted all of my logging to JULI stuff.  To meet my specific
requirements for outputs, etc, I ended up creating Loggers on the fly and
assigning handler file names as opposed to using logging.properties file.
Everything works like I expected except for one thing.  It appears that all
output from all loggers still gets copied to stderr log file.  I went in to
the conf/logging.properties file and changed everything to ERROR.  No
change.  (BTW... I'm on Tomcat 7).

This is not a big deal.  But the stderr file gets huge really fast.  And it
doesn't roll over at midnight.  I've got to bounce Tomcat in order to get
rid of it.

Is there something I can do to control whether or not the loggers all copy
log info to stdout (I'm certain I don't have a 2nd handler or anything like
that on the loggers.  Just the single handler that writes it out the file
as designed).

Thanks.

Jerry


RE: Deployment over a running webapp does not call session detroyed?

2011-12-12 Thread Caldarale, Charles R
 From: Gabriele Bulfon [mailto:gbul...@sonicle.com] 
 Subject: Deployment over a running webapp does not call session detroyed?

 the ContextListener contextDestroyed is called, but I have no way to
 access my threads and kill them from there

 Is this a bug or am I missing something?

Yes, it's a bug - yours.  By design, sessions are maintained across a webapp 
redeployment.  You'll need to make your code smarter about tracking auxiliary 
threads that you start and that Tomcat is completely unaware of.  For example, 
you could save the threads in some sort of list or array accessible to your 
context listener, and have it take care of shutting down your threads.

 - 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: Tomcat user roles

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

Bill,

On 12/8/11 7:33 PM, Bill Wang wrote:
 Thanks to all for the explanation.
 
 I have a new question regarding the admin role.
 
 With default setup, if I login as admin, I can start,stop, undeploy
 and deploy the application. Now, because the admin password has
 been shared by team, and I can't not share it with team.

Why not use a more elaborate user database that lets you manage lots
of users? There's no need to have shared passwords.

 So I plan to disable undeploy and deploy function from the web
 admin URL for the admin account. If anyone need deploy new version,
 they have to login the Unix box to do it manually. With that I can
 trace and have records easily.

Ok.

I would argue that letting people log into a web-based UI to do
restarts, etc. is safer than giving them shell access, but that's your
business.

 So I edit the file webapps/manager/WEB-INF/web.xml, and remove all
 the xml sessions for remove, install, undeploy, deploy and save.
 But after I restart the tomcat server, *I still can deploy and
 undeploy*.

I suspect you only removed the security-constraint sections: that
will open those operations to anyone who knows those URLs, which is
obviously not what you want.

If you have changed the admin password so nobody else knows it and you
will require them to login to a shell, then why do you have to modify
the manager configuration at all?

 Below are the lines I remove from the web.xml file.
 
 servlet-mapping servlet-nameManager/servlet-name 
 url-pattern/install/url-pattern /servlet-mapping

Are you sure you removed those lines? If you *have* removed them, then
you haven't properly re-deployed the webapp.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7mTykACgkQ9CaO5/Lv0PBiZQCfZkqMvu6AJeiXvhK+S4EPMdiI
PAcAnRt68Ybufzp12ZPODvvbnzbJifmu
=i/JX
-END PGP SIGNATURE-

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



Re: RemoteIpFilter not working

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

To whom it may concern,

On 12/9/11 4:48 AM, spr...@gmx.eu wrote:
 Can you send a dump of the HTTP headers received by the webapp
 and the return value of the various request.getXXX methods? That
 would be very helpful, here.
 
 
 getRemoteAddr(): 85.214.210.60 -- proxy IP x-forwarded-for:
 85.178.56.216 -- client IP x-forwarded-host: foobar.eu -- proxy 
 x-forwarded-server: foobar.eu -- proxy
 
 It looks like the Filter does not kick in.

I wonder if this has to do with (un)trusted proxies.

Have you enabled logging for the RemoteIpFilter class?

Also, the documentation on the class itself
(http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/RemoteIpFilter.html)
seems to be better than the documentation of the Filter in the Tomcat
user guide :(

I think you're going to need to provide an internalProxies
configuration parameter.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7mUfQACgkQ9CaO5/Lv0PBzPgCgj5dKsJY/yat3AXWGjjBbMixN
hWQAn264rtswBBvfRIH4tyLuhEe1Vjf3
=hnxR
-END PGP SIGNATURE-

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



Re: MVC or Model2 with Tomcat

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

Pid,

On 12/9/11 8:23 AM, Pid wrote:
 If you want Tomcat to find  serve index.jsp for a '/' request,
 then you need:
 
 welcome-file-list welcome-fileindex.jsp/welcome-file 
 /welcome-file-list

... which is the default , I might add. (Actually, the default is to
look for index.html, index.htm, and index.jsp in that order).

 If you have index.html and Servlets, either Tomcat can serve the
 HTML, or HTTPD.  In the latter case you'll need to ensure that
 requests for / and /index.html are not forwarded to Tomcat.

+1

This is why Andre said that you'll have a more complex configuration.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7mVKoACgkQ9CaO5/Lv0PBn8wCgn8yAJZSsk0szbCcfaAp4sDCG
QTAAoIA7aKm8VfgJNXEPTf8JApKNzZui
=wJCD
-END PGP SIGNATURE-

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



Re: upgrading from 6.0.20 to 6.0.35

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

Hassan,

On 12/9/11 11:38 AM, Hassan Schroeder wrote:
 On Thu, Dec 8, 2011 at 11:13 PM, Pid * p...@pidster.com wrote:
 
 Yes, but we still usually recommend starting afresh each time.
 It should relatively simple, just make a backup copy of each file
 you edit, first.
 
 Somewhat OT, but I would like to recommend git
 (http://git-scm.com/) as the *perfect* way to manage
 configurations.

Or, at least *some* revision-control-tracking mechanism: CVS,
Subversion, git, Mercurial, whatever.

Saunder Temme says that putting your server configuration under
revision control is a recommended security procedure:
http://people.apache.org/~sctemme/ApconNA2011/Hardening%20Enterprise%20Apache%202011.pdf

Hmm... that presentation doesn't say it, but he's definitely mentioned
it in the past.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7mWdUACgkQ9CaO5/Lv0PCODwCffOKuKRxJxnoT+bMLaXaaWWUN
pkYAn1vhEztP/X/FqvbYU1ahOJ+jawR5
=HhaS
-END PGP SIGNATURE-

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



Re: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

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

Warren,

On 12/9/11 4:47 PM, Warren Bell wrote:
 This makes me think I am on the right track and the exceptions I
 am getting seem to point to the wrong classes being loaded.

Maybe, but maybe not.

 My question is, is their a set of XML related jars that I should
 take out of my app and place in this endorsed directory or is there
 a different way of fixing this problem ?

What other JARs do you have in your webapp?

Also, what's the full stack trace of these exceptions? If you place
things into endorsed then they will plug-into JAXP which means that
Tomcat will use them internally to load things (like server.xml) and
so you'll need to have all dependencies (like xml-apis.jar for
instance) in that endorsed directory, too. Otherwise, you could get
weird stuff like this happening.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7mWskACgkQ9CaO5/Lv0PDaQQCfXcjKWsZqK5Pp6sZUnOb+2dq7
D1UAnRv36WhkUgmjbVs/PCKNZkjMTqOr
=8vuS
-END PGP SIGNATURE-

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



Re: Tomcat 5.5 crashes after changing server IP

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

SirWiz,

On 12/12/11 6:26 AM, sir...@8host.pl wrote:
 It is probly Tomcat + Xen (KVM) + Intel (?) releted problem.
 
 I really have no idea how you come to that conclusion.
 
 Like i said when i install Windows 8 on Xen machine, starts
 Virtuabox on it and new 32bit Centos, tomcat and my api works
 perfectly. It was running for a 2 years on AMD procesor (with the
 same config files) and it works like charm also.

So, you are running a doubly-virtualized environment? That seems ...
unnecessary.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7mXugACgkQ9CaO5/Lv0PCMSQCfd71oa1BjWJMrj3nmPC5lo3SL
wbYAoKz4/5McJD6sw7dWkDxzJOaM+cO/
=vdWF
-END PGP SIGNATURE-

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



Tomcat crashes after startup

2011-12-12 Thread Justin Larose
Group,

Can anyone help me with this error below from the catalina.log?
I have attached my server.xml as well. I have done some searches on the 
internet and cannot find much on this error.

SEVERE: Error initializing endpoint
java.io.IOException: AnyCert TrustManagerFactory not available
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:527)
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:156)
at 
org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
at 
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1022)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Dec 12, 2011 3:08:45 PM org.apache.catalina.core.StandardService 
initialize
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8543]]
LifecycleException:  Protocol handler initialization failed: 
java.io.IOException: AnyCert TrustManagerFactory not available
at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1024)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)



Server.xml .

Server port=8405 shutdown=Shutdown.SerenaCommonTomcat
!-- Listener 
className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on 
/ --
Listener className=org.apache.catalina.core.JasperListener/
Listener 
className=org.apache.catalina.mbeans.ServerLifecycleListener/
Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/

GlobalNamingResources
!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users
--
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
/GlobalNamingResources

Service name=Catalina

Connector connectionTimeout=2 port=18080 protocol=HTTP/1.1 
redirectPort=8443 server=Unknown Web Server/1.0/

!-- Define a SSL HTTP/1.1 Connector on port 8443, using only 128-bit+ 
encryption (remove ciphers attribute if not needed). --
!-- Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true 
maxThreads=150 scheme=https secure=true clientAuth=false 
sslProtocol=TLS ciphers=TLS_DHE_RSA_WITH_AES_128_CBC_SHA, 
SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, 
TLS_RSA_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA 
server=Unknown Web Server/1.0/ --

Connector SSLEnabled=true acceptCount=100 clientAuth=false 
disableUploadTimeout=true enableLookups=false keyAlias=tomcat 
keystoreFile=conf/sample-ssl.jks keystorePass=* 
maxHttpHeaderSize=8192 maxSpareThreads=75 maxThreads=150 
minSpareThreads=25 port=8443 scheme=https secure=true 
sslProtocol=TLS strategy=ms truststoreFile=conf/sample-ssl.jks 
truststorePass=*/

Connector SSLEnabled=true acceptCount=100 clientAuth=true 
disableUploadTimeout=true enableLookups=false keyAlias=tomcat 
keystoreFile=conf/sample-ssl.jks keystorePass=* 
maxHttpHeaderSize=8192 maxSpareThreads=75 maxThreads=150 
minSpareThreads=25 port=8543 scheme=https secure=true 
sslProtocol=TLS strategy=ms truststoreAlgorithm=AnyCert 
truststoreFile=conf/sample-ssl.jks truststorePass=*/

!-- Define an AJP 1.3 Connector on port 8409. --
Connector port=8409 protocol=AJP/1.3 redirectPort=8443 
server=Unknown Web 

Re: Tomcat crashes after startup

2011-12-12 Thread Mark Thomas
On 12/12/2011 20:20, Justin Larose wrote:
 Group,
 
 Can anyone help me with this error below from the catalina.log?
 I have attached my server.xml as well. I have done some searches on the 
 internet and cannot find much on this error.
 
 SEVERE: Error initializing endpoint
 java.io.IOException: AnyCert TrustManagerFactory not available

Seems pretty clear to me.

 Connector ... port=8543 ... truststoreAlgorithm=AnyCert .../

Fix your broken connector configuration or provide a JSSE implementation
that includes this custom truststoreAlgorithm.

Mark

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



Re: Tomcat crashes after startup

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

Justin,

Mark already answered your question, but ...

On 12/12/11 3:20 PM, Justin Larose wrote:
 Connector connectionTimeout=2 port=18080
 protocol=HTTP/1.1 redirectPort=8443 server=Unknown Web
 Server/1.0/

:(

Really? Masking the server name? At least say Apache Tomcat or
something like that. Security By Obscurity doesn't actually solve any
security problems.

Note that the default value for the server string is
Apache-Coyote/1.1 which doesn't really give an attacker any
meaningful information.

 Connector SSLEnabled=true acceptCount=100 clientAuth=false 
 disableUploadTimeout=true enableLookups=false keyAlias=tomcat
  keystoreFile=conf/sample-ssl.jks keystorePass=* 
 maxHttpHeaderSize=8192 maxSpareThreads=75 maxThreads=150 
 minSpareThreads=25 port=8443 scheme=https secure=true 
 sslProtocol=TLS strategy=ms
 truststoreFile=conf/sample-ssl.jks truststorePass=*/

Note: no server attribute, here... attackers can still see you are
using Apache-Coyote/1.1.

 Connector SSLEnabled=true acceptCount=100 clientAuth=true 
 disableUploadTimeout=true enableLookups=false keyAlias=tomcat
  keystoreFile=conf/sample-ssl.jks keystorePass=* 
 maxHttpHeaderSize=8192 maxSpareThreads=75 maxThreads=150 
 minSpareThreads=25 port=8543 scheme=https secure=true 
 sslProtocol=TLS strategy=ms truststoreAlgorithm=AnyCert 
 truststoreFile=conf/sample-ssl.jks truststorePass=*/

Same here.

 !-- Define an AJP 1.3 Connector on port 8409. -- Connector
 port=8409 protocol=AJP/1.3 redirectPort=8443 server=Unknown
 Web Server/1.0/

I'm not sure if the AJP connector will return a Server response
header to the web server. Most web servers will overwrite this value
so that the client sees the proxy server's Server response header.

 Engine defaultHost=localhost name=Catalina !-- This Realm
 uses the UserDatabase configured in the global JNDI resources under
 the key UserDatabase.  Any edits that are performed against this
 UserDatabase are immediately available for use by the Realm.  -- 
 Realm className=org.apache.catalina.realm.UserDatabaseRealm 
 resourceName=UserDatabase/

If you really are concerned about security, then you shouldn't be
using UserDatabaseRealm.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7maHkACgkQ9CaO5/Lv0PCv1QCfWTlqSbf79C0YW81G2FAXLbBK
T3UAnA3XgEwv9njrL2YyG8WNx7SKCA4x
=Jp6s
-END PGP SIGNATURE-

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



Re: Tomcat crashes after startup

2011-12-12 Thread Justin Larose
Thank you Mark,
I edited the connector with the information for the new certificate I just 
installed (not the old self signed one) and now I am seeing this error:
(I have attached the modified server.xml and the output for tomcat key 
entry cert below)

___

Dec 12, 2011 3:38:24 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-18080
Dec 12, 2011 3:38:24 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.io.IOException: Alias name tomcat does not identify a key entry
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:546)
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:481)
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:156)
at 
org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
at 
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1022)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Dec 12, 2011 3:38:24 PM org.apache.catalina.core.StandardService 
initialize
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8443]]
LifecycleException:  Protocol handler initialization failed: 
java.io.IOException: Alias name tomcat does not identify a key entry
at 
org.apache.catalina.connector.Connector.initialize(Connector.java:1024)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

___

F:\Serena\Dimensions 2009 R2\Common Tools\jre\6.0\binkeytool -list -v 
-keystore wcmdev-ssl.jks -alias tomcat
Enter keystore password:
Alias name: tomcat
Creation date: Nov 10, 2011
Entry type: trustedCertEntry

Owner: CN=wcmdev.nexweb.us, OU=USN, OU=PKI, OU=DoD, O=U.S. Government, 
C=US


___

Server port=8405 shutdown=Shutdown.SerenaCommonTomcat
!-- Listener 
className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on 
/ --
Listener className=org.apache.catalina.core.JasperListener/
Listener 
className=org.apache.catalina.mbeans.ServerLifecycleListener/
Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/

GlobalNamingResources
!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users
--
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
/GlobalNamingResources

Service name=Catalina

Connector connectionTimeout=2 port=18080 
protocol=HTTP/1.1 redirectPort=8443 server=Unknown Web Server/1.0/

!-- Define a SSL HTTP/1.1 Connector on port 8443, using only 
128-bit+ encryption (remove ciphers attribute if not needed). --
!-- Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true 
maxThreads=150 scheme=https secure=true clientAuth=false 
sslProtocol=TLS ciphers=TLS_DHE_RSA_WITH_AES_128_CBC_SHA, 
SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, 
TLS_RSA_WITH_AES_128_CBC_SHA, SSL_RSA_WITH   3DES_EDE_CBC_SHA 
server=Unknown Web Server/1.0/ --

Connector SSLEnabled=true acceptCount=100 clientAuth=false 

Re: stderr

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

Jerry,

On 12/12/11 12:59 PM, Jerry Malcolm wrote:
 I have converted all of my logging to JULI stuff.  To meet my
 specific requirements for outputs, etc, I ended up creating Loggers
 on the fly and assigning handler file names as opposed to using
 logging.properties file. Everything works like I expected except
 for one thing.  It appears that all output from all loggers still
 gets copied to stderr log file.

That may be the default behavior for java.util.logging when there is
no logging.properties file. (I really don't know, I don't use j.u.l).

 I went in to the conf/logging.properties file and changed
 everything to ERROR.  No change.  (BTW... I'm on Tomcat 7).

That changes the configuration at the server level. I think you want
to change the configuration at the webapp level. What happens if you
create a logging.properties in your webapp's WEB-INF/classes directory.

 This is not a big deal.  But the stderr file gets huge really fast.
 And it doesn't roll over at midnight.  I've got to bounce Tomcat in
 order to get rid of it.

:(

You could log to a named-pipe and use a logger that knows what that means.

Better not to log to stdout (stderr doesn't seem right... are you sure?).

- -chrs
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7maXoACgkQ9CaO5/Lv0PDRdQCePYVE2yxEm28/Gs5kWgKIrLP4
0dgAoLhaxUiYKNlIiR/nlQnNJ/ahjXi1
=WwgA
-END PGP SIGNATURE-

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



[OT] Re: Detecting Mobile Device

2011-12-12 Thread Pid
On 12/12/2011 17:52, Jerry Malcolm wrote:
 What is the best/recommended way to determine if the request is coming from
 a mobile device?  I have an alternate layout that I want to use for pages
 going to a smart phone, etc.  I know there is client/browser info in the
 request.  But it's more browser-specific info.  Is there one specific
 string or something that I can look for that will catch all smart phones,
 etc?

Have a look at: request.getHeader(User-agent)

You'll find that user agent strings are widely varied.  This isn't a
problem unique to mobile devices...


 Recommendations?

There's a few techniques, but they're all compromises  somewhat out of
scope for this mailing list...


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat crashes after startup

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

Justin,

On 12/12/11 3:49 PM, Justin Larose wrote:
 I edited the connector with the information for the new certificate
 I just installed (not the old self signed one) and now I am seeing
 this error:
 
 [snip]
 
 java.io.IOException: Alias name tomcat does not identify a key
 entry

You need to have a key in your keystore with the alias tomcat as well.

If you have been following
http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configuration,
you have either missed or misinterpreted a step.

 Connector SSLEnabled=true acceptCount=100 clientAuth=false 
 disableUploadTimeout=true enableLookups=false keyAlias=tomcat
  keystoreFile=conf/wcmdev-ssl.jks keystorePass= 
 maxHttpHeaderSize=8192 maxSpareThreads=75 maxThreads=150 
 minSpareThreads=25port=8443 scheme=https secure=true 
 sslProtocol=TLS strategy=ms
 truststoreFile=conf/wcmdev-ssl.jks truststorePass=/

I would advise against using the same keystore for both the keystore
and the truststore. The trust store is only used for validating
client certificates and, IMO, should be kept separate from the
certificates you use for the web service itself.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7mcdgACgkQ9CaO5/Lv0PBsDACfTjv3vJqiBMdl3v1TInDyRYku
gIsAnjVQNgh4eyeH2tSwyfSIeIN4GsDJ
=XlwU
-END PGP SIGNATURE-

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



Re: Detecting Mobile Device

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

Jerry,

On 12/12/11 12:52 PM, Jerry Malcolm wrote:
 
 Is there one specific string or something that I can look for that 
 will catch all smart phones, etc?

Not that I know. You just have to sniff the User-Agent header, hope
the device isn't lying, and respond appropriately.

If you aren't already, I highly recommend logging the User-Agent
string that comes-in with every request and running reports against
that log periodically.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7mceoACgkQ9CaO5/Lv0PCrvQCaAvjn8E2GMj3WOCZDUs3Yf1KC
J8QAmwSnqaTL5n/haMtjg17rWM0KDt2+
=vpb6
-END PGP SIGNATURE-

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



Re: Detecting Mobile Device

2011-12-12 Thread Hassan Schroeder
On Mon, Dec 12, 2011 at 9:52 AM, Jerry Malcolm 2ndgenfi...@gmail.com wrote:
 What is the best/recommended way to determine if the request is coming from
 a mobile device?

 Recommendations?

Trying to keep on top of all possible UserAgent strings is madness,
IMO. (Or a business plan, c.f. BrowserHawk.)   :-)

Use CSS3 media queries to adjust your layout according to screen
size/orientation.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: path used for tc-natuve

2011-12-12 Thread André Warnier

Pid * wrote:

On 12 Dec 2011, at 16:37, André Warnier a...@ice-sa.com wrote:


Hi

On a Debian Linux system, was running a Debian-pre-packaged Tomcat 5.5.
We stopped this Tomcat 5.5, but did not remove the corresponding package(s).
Then we installed an official Tomcat 6, downloaded from the Tomcat website, in 
/opt/tomcat6 as CATALINA_HOME.
We then made a copy of the /etc/init.d startup script which used to start 
Tomcat 5.5, and modified it to start this new Tomcat6 instead.

Now when stopping and starting this Tomcat6, we are getting the message below 
(about APR) in the Tomcat6 logfile.

My question is : where could Tomcat6 find this APR tc-native of the wrong 
version ?
As far as I can tell, there is no unpacked tc-native anything in the Tomcat6 
directories.


$LD_LIBRARY_PATH

Or check the -Djava.library.path set by the script.




Francis, thanks for the perl tip.
Pid, see following data.

1) these are the tomcat6 processes, as shown by ps :
(sorry for the format, I hope it is readable)

root 21245 1  0 21:19 ?00:00:00 /usr/bin/jsvc -user tomcat55 -cp 
/usr/share/java/commons-daemon.jar:/opt/tomcat6/bin/bootstrap.jar -outfile SYSLOG -errfile 
SYSLOG -pidfile /var/run/tomcat6.pid -Djava.awt.headless=true -Xms256M -Xmx256M 
-Djava.endorsed.dirs=/opt/tomcat6/common/endorsed -Dcatalina.base=/opt/tomcat6 
-Dcatalina.home=/opt/tomcat6 -Djava.io.tmpdir=/opt/tomcat6/temp 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/opt/tomcat6/conf/logging.properties 
org.apache.catalina.startup.Bootstrap


root 21246 21245  0 21:19 ?00:00:00 /usr/bin/jsvc -user tomcat55 -cp 
/usr/share/java/commons-daemon.jar:/opt/tomcat6/bin/bootstrap.jar -outfile SYSLOG -errfile 
SYSLOG -pidfile /var/run/tomcat6.pid -Djava.awt.headless=true -Xms256M -Xmx256M 
-Djava.endorsed.dirs=/opt/tomcat6/common/endorsed -Dcatalina.base=/opt/tomcat6 
-Dcatalina.home=/opt/tomcat6 -Djava.io.tmpdir=/opt/tomcat6/temp 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/opt/tomcat6/conf/logging.properties 
org.apache.catalina.startup.Bootstrap


tomcat55 21247 21245 15 21:19 ?00:00:01 /usr/bin/jsvc -user tomcat55 -cp 
/usr/share/java/commons-daemon.jar:/opt/tomcat6/bin/bootstrap.jar -outfile SYSLOG -errfile 
SYSLOG -pidfile /var/run/tomcat6.pid -Djava.awt.headless=true -Xms256M -Xmx256M 
-Djava.endorsed.dirs=/opt/tomcat6/common/endorsed -Dcatalina.base=/opt/tomcat6 
-Dcatalina.home=/opt/tomcat6 -Djava.io.tmpdir=/opt/tomcat6/temp 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/opt/tomcat6/conf/logging.properties 
org.apache.catalina.startup.Bootstrap


and this is the output for Francis' one-liner :

# perl -ple 's,\00,\n,g' /proc/21245/environ
SHELL=/bin/bash
TERM=xterm
SSH_CLIENT=84.158.8.209 1689 22
JSSE_HOME=/usr/lib/jvm/java-6-sun/jre/
SSH_TTY=/dev/pts/0
USER=root
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00
;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:
PATH=/bin:/usr/bin:/sbin:/usr/sbin
MAIL=/var/mail/root
PWD=/opt/tomcat6/temp
JAVA_HOME=/usr/lib/jvm/java-6-sun
LANG=en_US.UTF-8
HOME=/root
SHLVL=2
LS_OPTIONS=--color=auto
LOGNAME=root
SSH_CONNECTION=84.158.8.209 1689 212.85.38.202 22
EFSDIR=/mnt/NAS/MIRA/EFS
LC_CTYPE=de_DE.iso885915@euro
_=/usr/bin/jsvc
OLDPWD=/root

(I picked the first of the above processes)

Thus, it does not seem that there is either a $LD_LIBRARY_PATH set, nor an explicit 
-Djava.library.path on the tomcat (or jsvc) command-line.

(Or I am missing something).

So then, to repeat the question, where might this Tomcat Native library be, which Tomcat 
finds and is complaining about ?


Here follows a list of files from the tomcat6 installation dir. Apart from 
tomcat-native.tar.gz, I don't see anything there which looks like a tc-native library..


v2:/opt/tomcat6# ls -l
total 63
drwxrwxr-x 2 root root  1024 2011-12-09 16:33 bin
drwxr-xr-x 4 tomcat55 adm   1024 2011-12-12 21:19 conf

RE: path used for tc-natuve

2011-12-12 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com] 
 Subject: Re: path used for tc-natuve

 it does not seem that there is either a $LD_LIBRARY_PATH set, nor an 
 explicit -Djava.library.path on the tomcat (or jsvc) command-line.

 So then, to repeat the question, where might this Tomcat Native library
 be, which Tomcat finds and is complaining about ?

I wonder if dlopen() is defaulting to the ldconfig list?  Look in 
/etc/ld.so.conf for that.

 - 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: path used for tc-natuve

2011-12-12 Thread Francis GALIEGUE
On Mon, Dec 12, 2011 at 23:25, André Warnier a...@ice-sa.com wrote:
[...]

 1) these are the tomcat6 processes, as shown by ps :
 (sorry for the format, I hope it is readable)

 root     21245     1  0 21:19 ?        00:00:00 /usr/bin/jsvc -user tomcat55
 -cp /usr/share/java/commons-daemon.jar:/opt/tomcat6/bin/bootstrap.jar
 -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
 -Djava.awt.headless=true -Xms256M -Xmx256M
 -Djava.endorsed.dirs=/opt/tomcat6/common/endorsed
 -Dcatalina.base=/opt/tomcat6 -Dcatalina.home=/opt/tomcat6
 -Djava.io.tmpdir=/opt/tomcat6/temp
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=/opt/tomcat6/conf/logging.properties
 org.apache.catalina.startup.Bootstrap


Ah, jsvc... I though you invoked the JVM directly.

Does it have a configuration file? I have never used it, but I'd
definitely look there. There is no reason at all why the JVM alone
would play with shared objects unless you ask it to.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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



Re: path used for tc-natuve

2011-12-12 Thread Pid
On 12/12/2011 22:25, André Warnier wrote:
 Pid * wrote:
 On 12 Dec 2011, at 16:37, André Warnier a...@ice-sa.com wrote:

 Hi

 On a Debian Linux system, was running a Debian-pre-packaged Tomcat 5.5.
 We stopped this Tomcat 5.5, but did not remove the corresponding
 package(s).
 Then we installed an official Tomcat 6, downloaded from the Tomcat
 website, in /opt/tomcat6 as CATALINA_HOME.
 We then made a copy of the /etc/init.d startup script which used to
 start Tomcat 5.5, and modified it to start this new Tomcat6 instead.

 Now when stopping and starting this Tomcat6, we are getting the
 message below (about APR) in the Tomcat6 logfile.

 My question is : where could Tomcat6 find this APR tc-native of the
 wrong version ?
 As far as I can tell, there is no unpacked tc-native anything in the
 Tomcat6 directories.

 $LD_LIBRARY_PATH

 Or check the -Djava.library.path set by the script.


 
 Francis, thanks for the perl tip.
 Pid, see following data.
 
 1) these are the tomcat6 processes, as shown by ps :
 (sorry for the format, I hope it is readable)
 
 root 21245 1  0 21:19 ?00:00:00 /usr/bin/jsvc -user
 tomcat55 -cp
 /usr/share/java/commons-daemon.jar:/opt/tomcat6/bin/bootstrap.jar
 -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
 -Djava.awt.headless=true -Xms256M -Xmx256M
 -Djava.endorsed.dirs=/opt/tomcat6/common/endorsed
 -Dcatalina.base=/opt/tomcat6 -Dcatalina.home=/opt/tomcat6
 -Djava.io.tmpdir=/opt/tomcat6/temp
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=/opt/tomcat6/conf/logging.properties
 org.apache.catalina.startup.Bootstrap
 
 root 21246 21245  0 21:19 ?00:00:00 /usr/bin/jsvc -user
 tomcat55 -cp
 /usr/share/java/commons-daemon.jar:/opt/tomcat6/bin/bootstrap.jar
 -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
 -Djava.awt.headless=true -Xms256M -Xmx256M
 -Djava.endorsed.dirs=/opt/tomcat6/common/endorsed
 -Dcatalina.base=/opt/tomcat6 -Dcatalina.home=/opt/tomcat6
 -Djava.io.tmpdir=/opt/tomcat6/temp
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=/opt/tomcat6/conf/logging.properties
 org.apache.catalina.startup.Bootstrap
 
 tomcat55 21247 21245 15 21:19 ?00:00:01 /usr/bin/jsvc -user
 tomcat55 -cp
 /usr/share/java/commons-daemon.jar:/opt/tomcat6/bin/bootstrap.jar
 -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
 -Djava.awt.headless=true -Xms256M -Xmx256M
 -Djava.endorsed.dirs=/opt/tomcat6/common/endorsed
 -Dcatalina.base=/opt/tomcat6 -Dcatalina.home=/opt/tomcat6
 -Djava.io.tmpdir=/opt/tomcat6/temp
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=/opt/tomcat6/conf/logging.properties
 org.apache.catalina.startup.Bootstrap
 
 and this is the output for Francis' one-liner :
 
 # perl -ple 's,\00,\n,g' /proc/21245/environ
 SHELL=/bin/bash
 TERM=xterm
 SSH_CLIENT=84.158.8.209 1689 22
 JSSE_HOME=/usr/lib/jvm/java-6-sun/jre/
 SSH_TTY=/dev/pts/0
 USER=root
 LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=0
0
 
 ;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 MAIL=/var/mail/root
 PWD=/opt/tomcat6/temp
 JAVA_HOME=/usr/lib/jvm/java-6-sun
 LANG=en_US.UTF-8
 HOME=/root
 SHLVL=2
 LS_OPTIONS=--color=auto
 LOGNAME=root
 SSH_CONNECTION=84.158.8.209 1689 212.85.38.202 22
 EFSDIR=/mnt/NAS/MIRA/EFS
 LC_CTYPE=de_DE.iso885915@euro
 _=/usr/bin/jsvc
 OLDPWD=/root
 
 (I picked the first of the above processes)
 
 Thus, it does not seem that there is either a $LD_LIBRARY_PATH set, nor
 an explicit -Djava.library.path on the tomcat (or jsvc) command-line.
 (Or I am missing something).
 
 So then, to repeat the question, where might this Tomcat Native library
 be, which Tomcat finds and is complaining about ?
 
 Here follows a list of files from the tomcat6 installation dir. Apart
 from tomcat-native.tar.gz, I don't see anything there which looks like a
 tc-native library..
 
 v2:/opt/tomcat6# ls -l
 total 63
 

RE: path used for tc-natuve

2011-12-12 Thread Caldarale, Charles R
 From: Caldarale, Charles R 
 Subject: RE: path used for tc-natuve

  So then, to repeat the question, where might this Tomcat Native 
  library be, which Tomcat finds and is complaining about ?

 I wonder if dlopen() is defaulting to the ldconfig list?  Look in
 /etc/ld.so.conf for that.

According to the man page for dlopen(), /lib and /usr/lib are also searched, so 
the .so file might be hiding there.

 - 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: path used for tc-natuve

2011-12-12 Thread André Warnier

Caldarale, Charles R wrote:
From: Caldarale, Charles R 
Subject: RE: path used for tc-natuve


So then, to repeat the question, where might this Tomcat Native 
library be, which Tomcat finds and is complaining about ?



I wonder if dlopen() is defaulting to the ldconfig list?  Look in
/etc/ld.so.conf for that.


According to the man page for dlopen(), /lib and /usr/lib are also searched, so 
the .so file might be hiding there.



Yep :

v2:/usr/lib# ls -l libtc*
-rw-r--r-- 1 root root 244964 2008-06-12 22:18 libtcnative-1.a
-rw-r--r-- 1 root root901 2008-06-12 22:18 libtcnative-1.la
lrwxrwxrwx 1 root root 23 2011-04-13 08:40 libtcnative-1.so - 
libtcnative-1.so.0.1.12
lrwxrwxrwx 1 root root 23 2011-04-13 08:40 libtcnative-1.so.0 - 
libtcnative-1.so.0.1.12
-rw-r--r-- 1 root root 152008 2008-06-12 22:18 libtcnative-1.so.0.1.12

which still does not really explain (to me) why Tomcat looks for it there. Or 
is it jsvc ?

And another question then :

So one version of tcnative is thus in /usr/lib, and it is the version that was installed 
with tomcat5.5, which is still on the machine. And Tomcat6 also finds it, through whatever 
means.  And it complains about it, because it is too old.  But Tomcat5.5 is happy with it, 
and I want to keep Tomcat5.5 at least runnable for now, until I have Tomcat6 totally 
sorted out.


So how do I install a version of tcnative which will satisfy Tomcat6 (which lives in 
/opt/tomcat6), in such a way that Tomcat6 will find it before the ones listed above ?


And, will this new version of tcnative be happy with the current Apache APR library which 
 is also on that system ? Or does it not use it ?


To wit :
v2:/usr/lib# ls -l libapr*
lrwxrwxrwx 1 root root 18 2011-05-23 22:19 libapr-1.so.0 - 
libapr-1.so.0.2.12
-rw-r--r-- 1 root root 213512 2011-05-19 08:24 libapr-1.so.0.2.12
lrwxrwxrwx 1 root root 18 2011-01-01 19:47 libapreq2.so.3 - 
libapreq2.so.3.6.0
-rw-r--r-- 1 root root  53096 2008-05-04 12:12 libapreq2.so.3.6.0
lrwxrwxrwx 1 root root 22 2010-12-31 14:59 libaprutil-1.so.0 - 
libaprutil-1.so.0.2.12
-rw-r--r-- 1 root root 143912 2010-10-01 18:39 libaprutil-1.so.0.2.12


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



Re: path used for tc-natuve

2011-12-12 Thread André Warnier

Pid wrote:
...




It's often found under /usr/lib/apr or /usr/local/apr.


You could just build the new version from the one in tomcat/bin.
And if I do this, where do I put the result, in such a way that it doesn't overwrite the 
existing one used by tomcat5.5 ?

Or is that in the on-line docs ?



If you don't want to use it, then comment out the Listener at the start
of server.xml.


You mean this one ?
Listener className=org.apache.catalina.core.AprLifecycleListener /



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



RE: path used for tc-natuve

2011-12-12 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com] 
 Subject: Re: path used for tc-natuve

 And if I do this, where do I put the result, in such a way that 
 it doesn't overwrite the  existing one used by tomcat5.5 ?

One would normally place it in Tomcat's bin directory, and set LD_LIBRARY_PATH 
or -Djava.library.path to point there.  It's a bit scary (and rude) to put it 
in a public place.

  If you don't want to use it, then comment out the Listener at the 
  start of server.xml.

 You mean this one ?
 Listener className=org.apache.catalina.core.AprLifecycleListener /

That's the one.

 - 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: path used for tc-natuve

2011-12-12 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com] 
 Subject: Re: path used for tc-natuve


 which still does not really explain (to me) why Tomcat 
 looks for it there. Or is it jsvc ?

Neither - it's the Linux dynamic loader, required to do so by the Linux API 
contract for dlopen().

 So how do I install a version of tcnative which will satisfy 
 Tomcat6 (which lives in /opt/tomcat6), in such a way that 
 Tomcat6 will find it before the ones listed above ?

Put it in Tomcat's bin directory.  I would also remove the obnoxiously-placed 
older version, and place that in Tomcat 5.5's bin directory - assuming you can 
find it, given the corruption caused by installing ill-conceived 3rd party 
repackaged versions :-)

 will this new version of tcnative be happy with the current 
 Apache APR library which is also on that system ?

Shouldn't matter, since a real tcnative-1 from tomcat.apached.org is 
self-contained; use ldd to make sure.  Don't know what dependencies the 
3rd-party versions might have.

 - 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: upgrading from 6.0.20 to 6.0.35

2011-12-12 Thread Mark Eggers




- Original Message -
 From: Christopher Schultz ch...@christopherschultz.net
 To: Tomcat Users List users@tomcat.apache.org
 Cc: 
 Sent: Monday, December 12, 2011 11:45 AM
 Subject: Re: upgrading from 6.0.20 to 6.0.35
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hassan,
 
 On 12/9/11 11:38 AM, Hassan Schroeder wrote:
  On Thu, Dec 8, 2011 at 11:13 PM, Pid * p...@pidster.com wrote:
 
  Yes, but we still usually recommend starting afresh each time.
  It should relatively simple, just make a backup copy of each file
  you edit, first.
 
  Somewhat OT, but I would like to recommend git
  (http://git-scm.com/) as the *perfect* way to manage
  configurations.
 
 Or, at least *some* revision-control-tracking mechanism: CVS,
 Subversion, git, Mercurial, whatever.
 

I cannot add enough +1 to this. Security procedure or no, managing more than a 
few servers without version control and software release management is asking 
for disaster.

 Saunder Temme says that putting your server configuration under
 revision control is a recommended security procedure:
 http://people.apache.org/~sctemme/ApconNA2011/Hardening%20Enterprise%20Apache%202011.pdf
 
 Hmm... that presentation doesn't say it, but he's definitely mentioned
 it in the past.
 
 - -chris

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



Re: Cannot create JDBC driver of class error occurs when upgrading from tomcat-6.0.33 to tomcat 6.0.35

2011-12-12 Thread Mark Eggers

 From: Charlotte Binns charlotte.bi...@tate.org.uk
To: Tomcat Users List users@tomcat.apache.org 
Sent: Monday, December 12, 2011 7:16 AM
Subject: RE: Cannot create JDBC driver of class error occurs when upgrading 
from tomcat-6.0.33 to tomcat 6.0.35
 
Hi Chuck,

Thank you so much for you quick response.

For the server.xml I added quite a lot but this is exactly the same as
my server.xml from 6.0.33. I have added the server.xml file but edited
sensitive information from it.

For the web.xml all I have added extra are the following lines:

    servlet-mapping
    servlet-namejsp/servlet-name
    url-pattern*.html/url-pattern
    /servlet-mapping

    mime-mapping
        extensionshtm/extension
        mime-typetext/html/mime-type
    /mime-mapping

error-page
   exception-typejava.lang.Throwable/exception-type
   location/error.jsp/location
/error-page

For the tomcat-users - this is for testing only for use with probe and
manager. Once everything is working this will be removed. 

The mysql jar file is located in $Catalina-home/lib directory for global
use.

I am using java-1.6.0-openjdk-1.6.0.0-1.23.1.9.10.el5_7
java-1.6.0-openjdk-devel-1.6.0.0-1.23.1.9.10.el5_7

And 
kernel-2.6.18-274.12.1.el5
kernel-devel-2.6.18-274.12.1.el5
kernel-headers-2.6.18-274.12.1.el5

Thanks again

Charlotte Binns 
IS Technical Architect
(020) 7887 8622 


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: 12 December 2011 14:49
To: Tomcat Users List
Subject: RE: Cannot create JDBC driver of class error occurs when
upgrading from tomcat-6.0.33 to tomcat 6.0.35

 From: Charlotte Binns [mailto:charlotte.bi...@tate.org.uk]
 Subject: Cannot create JDBC driver of class error occurs when 
 upgrading from tomcat-6.0.33 to tomcat 6.0.35

 I added all my configuration to server.xml/web.xml

Exactly what did you change there?

 and tomcat-users.xml

Not suitable for a production environment.

 then copied in my web applications and /tomcat/conf/Catalina/localhost

 xml files required for my web applications.

And where did you put the MySQL driver jar?



Hmm - try switching DriverClassName to driverClassName in your server.xml file 
for the MySQL databases, unless that's a typo when you changed sensitive 
information.

just my two cents . . . .
/mde/

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



Re: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

2011-12-12 Thread Warren Bell
Here are all the jars in my app. There are a lot. The jars that came in
as dependencies of smooks are:

milyn-smooks-csv-1.5.jar
openscv-1.8.jar
milyn-smooks-flatfile-1.5.jar
milyn-smooks-javabean-1.5.jar
milyn-smooks-core-1.5.jar
milyn-commons-1.5.jar
freemaker-2.3.15.jar
javassist-3.10.0.GA.jar
xstream-1.4.1.jar
xmlpull-1.1.3.1.jar
xpp3_min-1.1.4c.jar
mvel2-2.0.17.jar
jaxen-1.1.1.jar
xercesImpl-2.6.2.jar
jta-1.1.jar

All of the other jars in my app:

activation-1.1.jar  mvel2-2.0.17.jar
antlr-2.7.2.jar opencsv-1.8.jar
aopalliance-1.0.jar oro-2.0.8.jar
aspectjrt-1.6.1.jar postgresql-8.3-603.jdbc3.jar
aspectjweaver-1.6.1.jar servlet-api-2.3.jar
cglib-nodep-2.1_3.jar   servlet-api-2.5.jar
commons-beanutils-1.7.0.jar slf4j-api-1.5.8.jar
commons-chain-1.1.jar   slf4j-log4j12-1.5.10.jar
commons-codec-20041127.091804.jar   spring-2.5.6.SEC01.jar
commons-collections-3.2.1.jar   spring-aspects-2.5.6.SEC01.jar
commons-dbcp-all-1.3-r699049.jarspring-beans-2.0.8.jar
commons-digester-1.8.jarspring-context-2.0.8.jar
commons-email-1.1.jar   spring-core-2.0.8.jar
commons-exec-1.0.jarspring-dao-2.0.8.jar
commons-io-1.4.jar  spring-ibatis-2.0.8.jar
commons-lang-2.4.jarspring-jdbc-2.0.8.jar
commons-logging-1.1.jar sslext-1.2-0.jar
commons-math-2.0.jarstruts-core-1.3.8.jar
commons-validator-1.3.1.jar struts-taglib-1.3.8.jar
cron4j-2.2.3.jarstruts-tiles-1.3.8.jar
dom4j-1.1.jar   swarm-1.4-rc1.jar
edtFTPj-2.0.4.jar   velocity-1.6.1.jar
freemarker-2.3.15.jar   velocity-tools-2.0-beta3.jar
hive-1.4-rc1.jarwasp-1.4-rc1.jar
ibatis-sqlmap-2.3.0.jar webservices-api.jar
inmethod-grid-1.4.2-SNAPSHOT.jarwebservices-extra-api.jar
javassist-3.10.0.GA.jar webservices-extra.jar
jaxen-1.1.1.jar webservices-rt.jar
jconn2-1.jarwicket-1.4.7.jar
joda-time-1.6.jar   wicket-datetime-1.4.7.jar
jta-1.1.jar wicket-extensions-1.4.7.jar
junit-3.8.1.jar wicket-ioc-1.4.7.jar
log4j-1.2.14.jarwicket-spring-1.4.7.jar
mail-1.4.jarwicket-spring-annot-1.3.5.jar
milyn-commons-1.5.jar   wicomsec-1.4-rc1.jar
milyn-smooks-core-1.5.jar   wiquery-1.0.1.jar
milyn-smooks-csv-1.5.jarxercesImpl-2.6.2.jar
milyn-smooks-flatfile-1.5.jar   xmlpull-1.1.3.1.jar
milyn-smooks-javabean-1.5.jar   xpp3_min-1.1.4c.jar
minis-1.4.1.jar xstream-1.4.1.jar

I am using Maven to manage my apps dependencies. My app does not depend
directly on some of these jars, like the struts jars. They got dragged
in as dependencies of something else. As for the exception:

java.lang.IncompatibleClassChangeError: Class org.jaxen.JaxenHandler
does not implement the requested interface org.jaxen.saxpath.XPathHandler
at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:98)
at
org.milyn.cdr.xpath.SelectorStepBuilder._buildSteps(SelectorStepBuilder.java:110)
at
org.milyn.cdr.xpath.SelectorStepBuilder.clinit(SelectorStepBuilder.java:43)
at
org.milyn.cdr.SmooksResourceConfiguration.setSelector(SmooksResourceConfiguration.java:447)
at
org.milyn.cdr.SmooksResourceConfiguration.init(SmooksResourceConfiguration.java:304)
at
org.milyn.cdr.SmooksResourceConfigurationStore.addHandlerFactoryConfig(SmooksResourceConfigurationStore.java:143)
at
org.milyn.cdr.SmooksResourceConfigurationStore.registerInstalledHandlerFactories(SmooksResourceConfigurationStore.java:139)
at
org.milyn.cdr.SmooksResourceConfigurationStore.init(SmooksResourceConfigurationStore.java:112)
at
org.milyn.container.standalone.StandaloneApplicationContext.init(StandaloneApplicationContext.java:59)
at org.milyn.Smooks.init(Smooks.java:118)
at org.milyn.Smooks.init(Smooks.java:170)
at
com.scanman.cron.task.ImportPriceChangesFromSupplier.executeTask(ImportPriceChangesFromSupplier.java:70)
at com.scanman.cron.task.ScanManTask.execute(ScanManTask.java:79)
at it.sauronsoftware.cron4j.TaskExecutor$Runner.run(Unknown Source)
at java.lang.Thread.run(Thread.java:680)

This is the first exception thrown before I started moving jars around
into the endorsed folder. The endorsed folder is empty when this
exception is thrown.

Thanks,

Warren Bell

On 12/12/11 11:49 AM, Christopher Schultz wrote:
 Warren,
 
 On 12/9/11 4:47 PM, Warren Bell wrote:
 This makes me think I am on the right track and the exceptions I
 am getting seem to point 

RE: Tomcat proxy configuration for serverside http requests

2011-12-12 Thread Dale Ogilvie
 André Warnier wrote: 
 Just to complete your report :
 - is the JVM used in both cases exactly the same ?
 - are either one of the Tomcats (or both) using the native APR library ?
   (although I have no idea really if this is relevant or not when a 
 webapp makes its own connections)

Could the app contain code which uses a specific proxy?

p

The same Sun 1.6.29 jvm is being used in both instances, and native APR is not 
involved here.

I don't believe app code is to blame as the proxy chosen is not a normal one 
for our environments. It looks more like it is being discovered to me. I have 
used CXF code to specifically set the proxy, and nonProxyHosts. If I do this, 
if the web service host defined in nonProxyHosts it will fall back through the 
alien proxy.

i.e. For Tomcat:

1. No known proxy set: Client IP at the web service appears as proxy A
2. CXF code to set to Proxy B: Client IP is proxy B
3. CXF code to set to Proxy B and App Server hostname in nonProxyhosts: Client 
IP is proxy A
4. Tomcat jvm -Dhttp.proxy=proxyA and -Dhttp.nonProxyHosts=appserver: Client IP 
is app server (desired outcome)
 
Whereas the same code running on the console as the tomcat user never uses 
proxy A, unless specifically asked to in CXF code.

I would like to know where that proxy is coming from.

Dale

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



Re: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

2011-12-12 Thread Mark Eggers
- Original Message -

 From: Warren Bell warrenbe...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Cc: 
 Sent: Monday, December 12, 2011 7:26 PM
 Subject: Re: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism
 
 Here are all the jars in my app. There are a lot. The jars that came in
 as dependencies of smooks are:
 
 milyn-smooks-csv-1.5.jar
 openscv-1.8.jar
 milyn-smooks-flatfile-1.5.jar
 milyn-smooks-javabean-1.5.jar
 milyn-smooks-core-1.5.jar
 milyn-commons-1.5.jar
 freemaker-2.3.15.jar
 javassist-3.10.0.GA.jar
 xstream-1.4.1.jar
 xmlpull-1.1.3.1.jar
 xpp3_min-1.1.4c.jar
 mvel2-2.0.17.jar
 jaxen-1.1.1.jar
 xercesImpl-2.6.2.jar
 jta-1.1.jar
 
 All of the other jars in my app:
 
 activation-1.1.jar            mvel2-2.0.17.jar
 antlr-2.7.2.jar                opencsv-1.8.jar
 aopalliance-1.0.jar            oro-2.0.8.jar
 aspectjrt-1.6.1.jar            postgresql-8.3-603.jdbc3.jar
 aspectjweaver-1.6.1.jar            servlet-api-2.3.jar
 cglib-nodep-2.1_3.jar            servlet-api-2.5.jar
 commons-beanutils-1.7.0.jar        slf4j-api-1.5.8.jar
 commons-chain-1.1.jar            slf4j-log4j12-1.5.10.jar
 commons-codec-20041127.091804.jar    spring-2.5.6.SEC01.jar
 commons-collections-3.2.1.jar        spring-aspects-2.5.6.SEC01.jar
 commons-dbcp-all-1.3-r699049.jar    spring-beans-2.0.8.jar
 commons-digester-1.8.jar        spring-context-2.0.8.jar
 commons-email-1.1.jar            spring-core-2.0.8.jar
 commons-exec-1.0.jar            spring-dao-2.0.8.jar
 commons-io-1.4.jar            spring-ibatis-2.0.8.jar
 commons-lang-2.4.jar            spring-jdbc-2.0.8.jar
 commons-logging-1.1.jar            sslext-1.2-0.jar
 commons-math-2.0.jar            struts-core-1.3.8.jar
 commons-validator-1.3.1.jar        struts-taglib-1.3.8.jar
 cron4j-2.2.3.jar            struts-tiles-1.3.8.jar
 dom4j-1.1.jar                swarm-1.4-rc1.jar
 edtFTPj-2.0.4.jar            velocity-1.6.1.jar
 freemarker-2.3.15.jar            velocity-tools-2.0-beta3.jar
 hive-1.4-rc1.jar            wasp-1.4-rc1.jar
 ibatis-sqlmap-2.3.0.jar            webservices-api.jar
 inmethod-grid-1.4.2-SNAPSHOT.jar    webservices-extra-api.jar
 javassist-3.10.0.GA.jar            webservices-extra.jar
 jaxen-1.1.1.jar                webservices-rt.jar
 jconn2-1.jar                wicket-1.4.7.jar
 joda-time-1.6.jar            wicket-datetime-1.4.7.jar
 jta-1.1.jar                wicket-extensions-1.4.7.jar
 junit-3.8.1.jar                wicket-ioc-1.4.7.jar
 log4j-1.2.14.jar            wicket-spring-1.4.7.jar
 mail-1.4.jar                wicket-spring-annot-1.3.5.jar
 milyn-commons-1.5.jar            wicomsec-1.4-rc1.jar
 milyn-smooks-core-1.5.jar        wiquery-1.0.1.jar
 milyn-smooks-csv-1.5.jar        xercesImpl-2.6.2.jar
 milyn-smooks-flatfile-1.5.jar        xmlpull-1.1.3.1.jar
 milyn-smooks-javabean-1.5.jar        xpp3_min-1.1.4c.jar
 minis-1.4.1.jar                xstream-1.4.1.jar
 
 I am using Maven to manage my apps dependencies. My app does not depend
 directly on some of these jars, like the struts jars. They got dragged
 in as dependencies of something else. As for the exception:
 
 java.lang.IncompatibleClassChangeError: Class org.jaxen.JaxenHandler
 does not implement the requested interface org.jaxen.saxpath.XPathHandler
     at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:98)
     at
 org.milyn.cdr.xpath.SelectorStepBuilder._buildSteps(SelectorStepBuilder.java:110)
     at
 org.milyn.cdr.xpath.SelectorStepBuilder.clinit(SelectorStepBuilder.java:43)
     at
 org.milyn.cdr.SmooksResourceConfiguration.setSelector(SmooksResourceConfiguration.java:447)
     at
 org.milyn.cdr.SmooksResourceConfiguration.init(SmooksResourceConfiguration.java:304)
     at
 org.milyn.cdr.SmooksResourceConfigurationStore.addHandlerFactoryConfig(SmooksResourceConfigurationStore.java:143)
     at
 org.milyn.cdr.SmooksResourceConfigurationStore.registerInstalledHandlerFactories(SmooksResourceConfigurationStore.java:139)
     at
 org.milyn.cdr.SmooksResourceConfigurationStore.init(SmooksResourceConfigurationStore.java:112)
     at
 org.milyn.container.standalone.StandaloneApplicationContext.init(StandaloneApplicationContext.java:59)
     at org.milyn.Smooks.init(Smooks.java:118)
     at org.milyn.Smooks.init(Smooks.java:170)
     at
 com.scanman.cron.task.ImportPriceChangesFromSupplier.executeTask(ImportPriceChangesFromSupplier.java:70)
     at com.scanman.cron.task.ScanManTask.execute(ScanManTask.java:79)
     at it.sauronsoftware.cron4j.TaskExecutor$Runner.run(Unknown Source)
     at java.lang.Thread.run(Thread.java:680)
 
 This is the first exception thrown before I started moving jars around
 into the endorsed folder. The endorsed folder is empty when this
 exception is thrown.
 
 Thanks,
 
 Warren Bell
 
 On 12/12/11 11:49 AM, Christopher Schultz wrote:
  Warren,
 
  On 12/9/11 4:47 PM, Warren Bell wrote:
  This makes me think I am on the right track and the exceptions I
  am getting seem to point to the wrong classes 

RE: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

2011-12-12 Thread Caldarale, Charles R
 From: Mark Eggers [mailto:its_toas...@yahoo.com] 
 Subject: Re: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

  servlet-api-2.3.jar
  servlet-api-2.5.jar

 If you're using Maven to manage the dependencies, how about 
 marking the offending jars scopeprovided/scope, and see
 if the later versions provided in the JRE (and in Tomcat for
 the servlet spec) meet the expected requirements.

At the very least, the OP _must_ remove the servlet-api*.jar files; they are 
provided by the container and can never be placed in WEB-INF/lib.  (But they're 
not the cause of the XML problem, just another symptom.)

 - 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: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

2011-12-12 Thread Konstantin Kolinko
2011/12/10 Warren Bell warrenbe...@gmail.com:
 Hello Tomcat Users,

 I am having a problem with xerces and other jars in the JDK or Tomcat
 conflicting with jars in my app. I am getting the following exception
 when instantiating Smooks, a csv library that usese xerces, in a web app
 running in Tomcat:

What exact version of Tomcat x.y.z you are running and on what JDK?

(IIRC several bugs wrt XML parser handling were fixed during the last
year. Though it might not be related to your issue).

Do you run single webapp there, or several complex ones?

I think the libs should stay in app's WEB-INF/lib folder. Do not put
them in endorsed for now. (That will affect Tomcat as a whole).

As others noted, your libraries list is a mess.

One blatant thing is that you have both Spring 2.0.8 and 2.5.6 jars.
They are not supposed to coexist.  Also note that there is SEC03
update of 2.5.6.

Best regards,
Konstantin Kolinko

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



Re: Compatability Problem OSX to Windows 7 Port

2011-12-12 Thread Glyn Thomas
All,
In case anyone has the same problem, here is the solution.  The behavior is
controlled by the J/Connector flag useOldAliasMetadataBehavior, which needs
to be set to 'true' for the query to work correctly on recent J/Connector
versions.  To set this parameter, use the following construct for the url
parameter on the resource tag in your context.xml:

url=jdbc:mysql://[hostname]/[dbname]?useOldAliasMetadataBehavior=true

Hope this helps.

Glyn

On Mon, Dec 12, 2011 at 8:18 AM, Mikolaj Rydzewski m...@ceti.pl wrote:

 On Mon, 12 Dec 2011 08:07:31 -0500, Glyn Thomas wrote:

 The following test JSP shows the problem:


 Does the problem occur only in JSP? Are you able to run the query using
 regular SQL client?

 --
 Mikolaj Rydzewski m...@ceti.pl

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




Re: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

2011-12-12 Thread Warren Bell
I was afraid I was going to get a reaction to my list like I did, it is
a mess. You get lazy and you just enter in a dependency and let Maven
drag everything in with it. As for the servlet jars, Tomcat just ignores
them and I never took the time to figure out where they were coming
from, that goes for the Struts jars too.

 INFO [main] -
validateJarFile(/Library/apache-tomcat-6.0.16/webapps/scanman/WEB-INF/lib/servlet-api-2.3.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
 INFO [main] -
validateJarFile(/Library/apache-tomcat-6.0.16/webapps/scanman/WEB-INF/lib/servlet-api-2.5.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class


How are you suppose to know what jars you really need when you let Maven
manage them ? I place just 2 dependencies in my pom.xml and 15 jars get
added to my project.

Thanks,

Warren Bell

On 12/12/11 8:25 PM, Konstantin Kolinko wrote:
 2011/12/10 Warren Bell warrenbe...@gmail.com:
 Hello Tomcat Users,

 I am having a problem with xerces and other jars in the JDK or Tomcat
 conflicting with jars in my app. I am getting the following exception
 when instantiating Smooks, a csv library that usese xerces, in a web app
 running in Tomcat:
 
 What exact version of Tomcat x.y.z you are running and on what JDK?
 
 (IIRC several bugs wrt XML parser handling were fixed during the last
 year. Though it might not be related to your issue).
 
 Do you run single webapp there, or several complex ones?
 
 I think the libs should stay in app's WEB-INF/lib folder. Do not put
 them in endorsed for now. (That will affect Tomcat as a whole).
 
 As others noted, your libraries list is a mess.
 
 One blatant thing is that you have both Spring 2.0.8 and 2.5.6 jars.
 They are not supposed to coexist.  Also note that there is SEC03
 update of 2.5.6.
 
 Best regards,
 Konstantin Kolinko
 
 -
 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: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

2011-12-12 Thread Warren Bell
Here the answers to your other questions.

Thanks,

Warren Bell

On 12/12/11 8:25 PM, Konstantin Kolinko wrote:
 2011/12/10 Warren Bell warrenbe...@gmail.com:
 Hello Tomcat Users,

 I am having a problem with xerces and other jars in the JDK or Tomcat
 conflicting with jars in my app. I am getting the following exception
 when instantiating Smooks, a csv library that usese xerces, in a web app
 running in Tomcat:
 
 What exact version of Tomcat x.y.z you are running and on what JDK?

Tomcat 6.0.16 JDK 1.6

 
 (IIRC several bugs wrt XML parser handling were fixed during the last
 year. Though it might not be related to your issue).
 
 Do you run single webapp there, or several complex ones?

Single

 
 I think the libs should stay in app's WEB-INF/lib folder. Do not put
 them in endorsed for now. (That will affect Tomcat as a whole).
 
 As others noted, your libraries list is a mess.
 
 One blatant thing is that you have both Spring 2.0.8 and 2.5.6 jars.
 They are not supposed to coexist.  Also note that there is SEC03
 update of 2.5.6.
 
 Best regards,
 Konstantin Kolinko
 
 -
 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: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

2011-12-12 Thread Caldarale, Charles R
 From: Warren Bell [mailto:warrenbe...@gmail.com] 
 Subject: Re: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

 Tomcat 6.0.16

Might want to upgrade - that's getting close to four years old.

 JDK 1.6

JDK 1.6.what?

 - 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: Compatability Problem OSX to Windows 7 Port

2011-12-12 Thread Pid *
On 13 Dec 2011, at 04:31, Glyn Thomas glynthoma...@gmail.com wrote:

 All,
 In case anyone has the same problem, here is the solution.  The behavior is
 controlled by the J/Connector flag useOldAliasMetadataBehavior, which needs
 to be set to 'true' for the query to work correctly on recent J/Connector
 versions.  To set this parameter, use the following construct for the url
 parameter on the resource tag in your context.xml:

 url=jdbc:mysql://[hostname]/[dbname]?useOldAliasMetadataBehavior=true

 Hope this helps.

Nice. Thanks for posting the solution.


p



 Glyn

 On Mon, Dec 12, 2011 at 8:18 AM, Mikolaj Rydzewski m...@ceti.pl wrote:

 On Mon, 12 Dec 2011 08:07:31 -0500, Glyn Thomas wrote:

 The following test JSP shows the problem:


 Does the problem occur only in JSP? Are you able to run the query using
 regular SQL client?

 --
 Mikolaj Rydzewski m...@ceti.pl

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@tomcat.**apache.orgusers-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: Tomcat xerces conflicts and Endorsed,Standards Override Mechanism

2011-12-12 Thread Pid *
On 13 Dec 2011, at 03:27, Warren Bell warrenbe...@gmail.com wrote:

 Here are all the jars in my app. There are a lot. The jars that came in
 as dependencies of smooks are:

 milyn-smooks-csv-1.5.jar
 openscv-1.8.jar
 milyn-smooks-flatfile-1.5.jar
 milyn-smooks-javabean-1.5.jar
 milyn-smooks-core-1.5.jar
 milyn-commons-1.5.jar
 freemaker-2.3.15.jar
 javassist-3.10.0.GA.jar
 xstream-1.4.1.jar
 xmlpull-1.1.3.1.jar
 xpp3_min-1.1.4c.jar
 mvel2-2.0.17.jar
 jaxen-1.1.1.jar
 xercesImpl-2.6.2.jar
 jta-1.1.jar

So I'd guess that anything with an X in its name would go in endorsed,
then I'd refine from there.



 All of the other jars in my app:

 activation-1.1.jarmvel2-2.0.17.jar
 antlr-2.7.2.jaropencsv-1.8.jar
 aopalliance-1.0.jaroro-2.0.8.jar
 aspectjrt-1.6.1.jarpostgresql-8.3-603.jdbc3.jar
 aspectjweaver-1.6.1.jarservlet-api-2.3.jar
 cglib-nodep-2.1_3.jarservlet-api-2.5.jar

Couple of servlet-api jars in there, that you don't want.

You may also be able to persuade Maven to not include some of the
others, if they're not needed.

You should consider upgrading Spring too.


p

 commons-beanutils-1.7.0.jarslf4j-api-1.5.8.jar
 commons-chain-1.1.jarslf4j-log4j12-1.5.10.jar
 commons-codec-20041127.091804.jarspring-2.5.6.SEC01.jar
 commons-collections-3.2.1.jarspring-aspects-2.5.6.SEC01.jar
 commons-dbcp-all-1.3-r699049.jarspring-beans-2.0.8.jar
 commons-digester-1.8.jarspring-context-2.0.8.jar
 commons-email-1.1.jarspring-core-2.0.8.jar
 commons-exec-1.0.jarspring-dao-2.0.8.jar
 commons-io-1.4.jarspring-ibatis-2.0.8.jar
 commons-lang-2.4.jarspring-jdbc-2.0.8.jar
 commons-logging-1.1.jarsslext-1.2-0.jar
 commons-math-2.0.jarstruts-core-1.3.8.jar
 commons-validator-1.3.1.jarstruts-taglib-1.3.8.jar
 cron4j-2.2.3.jarstruts-tiles-1.3.8.jar
 dom4j-1.1.jarswarm-1.4-rc1.jar
 edtFTPj-2.0.4.jarvelocity-1.6.1.jar
 freemarker-2.3.15.jarvelocity-tools-2.0-beta3.jar
 hive-1.4-rc1.jarwasp-1.4-rc1.jar
 ibatis-sqlmap-2.3.0.jarwebservices-api.jar
 inmethod-grid-1.4.2-SNAPSHOT.jarwebservices-extra-api.jar
 javassist-3.10.0.GA.jarwebservices-extra.jar
 jaxen-1.1.1.jarwebservices-rt.jar
 jconn2-1.jarwicket-1.4.7.jar
 joda-time-1.6.jarwicket-datetime-1.4.7.jar
 jta-1.1.jarwicket-extensions-1.4.7.jar
 junit-3.8.1.jarwicket-ioc-1.4.7.jar
 log4j-1.2.14.jarwicket-spring-1.4.7.jar
 mail-1.4.jarwicket-spring-annot-1.3.5.jar
 milyn-commons-1.5.jarwicomsec-1.4-rc1.jar
 milyn-smooks-core-1.5.jarwiquery-1.0.1.jar
 milyn-smooks-csv-1.5.jarxercesImpl-2.6.2.jar
 milyn-smooks-flatfile-1.5.jarxmlpull-1.1.3.1.jar
 milyn-smooks-javabean-1.5.jarxpp3_min-1.1.4c.jar
 minis-1.4.1.jarxstream-1.4.1.jar

 I am using Maven to manage my apps dependencies. My app does not depend
 directly on some of these jars, like the struts jars. They got dragged
 in as dependencies of something else. As for the exception:

 java.lang.IncompatibleClassChangeError: Class org.jaxen.JaxenHandler
 does not implement the requested interface org.jaxen.saxpath.XPathHandler
at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:98)
at
 org.milyn.cdr.xpath.SelectorStepBuilder._buildSteps(SelectorStepBuilder.java:110)
at
 org.milyn.cdr.xpath.SelectorStepBuilder.clinit(SelectorStepBuilder.java:43)
at
 org.milyn.cdr.SmooksResourceConfiguration.setSelector(SmooksResourceConfiguration.java:447)
at
 org.milyn.cdr.SmooksResourceConfiguration.init(SmooksResourceConfiguration.java:304)
at
 org.milyn.cdr.SmooksResourceConfigurationStore.addHandlerFactoryConfig(SmooksResourceConfigurationStore.java:143)
at
 org.milyn.cdr.SmooksResourceConfigurationStore.registerInstalledHandlerFactories(SmooksResourceConfigurationStore.java:139)
at
 org.milyn.cdr.SmooksResourceConfigurationStore.init(SmooksResourceConfigurationStore.java:112)
at
 org.milyn.container.standalone.StandaloneApplicationContext.init(StandaloneApplicationContext.java:59)
at org.milyn.Smooks.init(Smooks.java:118)
at org.milyn.Smooks.init(Smooks.java:170)
at
 com.scanman.cron.task.ImportPriceChangesFromSupplier.executeTask(ImportPriceChangesFromSupplier.java:70)
at com.scanman.cron.task.ScanManTask.execute(ScanManTask.java:79)
at it.sauronsoftware.cron4j.TaskExecutor$Runner.run(Unknown Source)
at java.lang.Thread.run(Thread.java:680)

 This is the first exception thrown before I started moving jars around
 into the endorsed folder. The endorsed folder is empty when this
 exception is thrown.

 Thanks,

 Warren Bell

 On 12/12/11 11:49 AM, Christopher Schultz wrote:
 Warren,

 On 12/9/11 4:47 PM, Warren Bell wrote:
 This makes