Fwd: Tomcat Thread Log

2015-04-08 Thread Mukundaraman Valakumaresan
Hi

I have deployed an application in Apache tomcat 7.59.

When I copy the war to webapps folder and start tomcat. Tomcat hangs and I
coudln't see the admin screen as well for the first 30 minutes. Without
this war, tomcat starts fine shows the admin screen immediately.

Through google, I check a posts, which asked me to take a thread dump. I
use Sprint, Hibernate and Mysql. From the thread dump, I could see that and
could also see that the problem with the connectivity to MySQL.

But I am not sure where exactly the problem lies and what needs to be
fixed. Any help is appreciated!! Thanks



"http-bio-8080-exec-1" daemon prio=10 tid=0x7fa11400c800 nid=0xa49
runnable [0x7fa124c87000]
   java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at
com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
at
com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
at
com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
- locked <0xbaadb0d0> (a com.mysql.jdbc.util.ReadAheadInputStream)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2428)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2882)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2871)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3414)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
- locked <0xcfa6a1f8> (a java.lang.Object)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1383)
- locked <0xcfa6a1f8> (a java.lang.Object)
at
com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:823)
at
com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3350)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2045)
- locked <0xcfa6a1f8> (a java.lang.Object)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:718)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:173)
at
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:164)
at
org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:153)
at
org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
at
org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139)
at
org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:279)
at
org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:124)
at
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
at
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
at
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
at
org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1928)
at
org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:252)
at
org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:377)
at
org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:362)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
at
org.springframewor

RE: Rendering JSP files through Apache

2015-04-08 Thread Leggio, Andrew
This contains both HTML and JSP.  I would like the HTML to be handled through 
Apache and JSP pages to be handled by TOMCAT.  How do I accomplish this?

This is a Linux environment with Apache version 2.4.6 and Tomcat version 7.

Thanks

Andrew J. Leggio | MBIA Services Corporation | Assistant Vice President | Phone 
P (914) 765-3206 | Fax ( (914) 765-3095 |   andrew.leg...@mbia.com


-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Wednesday, April 08, 2015 5:34 PM
To: Tomcat Users List
Subject: Re: Rendering JSP files through Apache

Leggio, Andrew wrote:
> I have the following being used in my conf file:
> 
> 
>   ProxyPass / ajp://localhost:8009/
> 
> 
> Does this actually direct jsp files to use Tomcat?
> 

That is a funny way of putting it.
What the above does - if everything else is installed and configured correctly 
- is proxying *all* HTTP requests originally directed to Apache httpd 
(including requests for any JSP page), toward a Tomcat supposedly running on 
the same host, and supposedly listening on port 8009.
Now whether this is actually what is happening or not, is anyone's guess so far.
Chances are that this is not happening though, since otherwise you probably 
would not be asking what's wrong.

The question is also : if you are going to proxy all requests from Apache httpd 
to Tomcat anyway, then why do you think that you need Apache httpd ?


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



--
This e-mail, including any attachments, is intended only for use by the 
addressee(s) named herein and may contain legally privileged and/or 
confidential information.  If you are not the intended recipient of this 
e-mail, you are hereby notified any dissemination, distribution or copying of 
any part of this e-mail is strictly prohibited; please contact the sender and 
permanently delete the original and any copies of it.
--


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



External xml problem on Tomcat 6.0.41

2015-04-08 Thread Claudio Weiler
Hi,

I use a Debian Squeeze distro, with official Tomcat releases. Recently I
update to Tomcat 6.0.41 and a (not modified) application stopped to load.

I dig and found that on Tomcat 6.0.40 the context attribute
"xmlBlockExternal" was changed default value from false to true, then I
modified this attribute in context.xml.

Now, the application do not work, with the exception:

java.lang.IllegalStateException: Illegal class loader binding
at
org.apache.naming.resources.DirContextURLStreamHandler.get(DirContextURLStreamHandler.java:223)
at
org.apache.naming.resources.DirContextURLStreamHandler.openConnection(DirContextURLStreamHandler.java:88)
at java.net.URL.openConnection(URL.java:945)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:651)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1252)
at com.sun.org.apache.xerces.internal.impl.
*XMLDocumentFragmentScannerImpl.scanEntityReference*
(XMLDocumentFragmentScannerImpl.java:1906)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3032)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
at
org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:146)
at
org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:103)
at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:238)
at
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:294)
at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
com.googlecode.psiprobe.Tomcat60AgentValve.invoke(Tomcat60AgentValve.java:30)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
--

This stacktrace leads me to "fragment scanner" that is exactly what broke
my app on first place. What I use is a xml injection in web.xml as follow:
]>
and:
&certisign;

So, I tested to remove this reference and place the fragment inside web.xml
and this solved the exception and the application back to work.

I searched more infos but none so far. So my questions:

1. What additional modification on Tomcat could be the reason to a working
config stops to work?

2. There is any other context attribute (that I 

Re: Fedora 20 Yum and tomcat setup

2015-04-08 Thread André Warnier

André Warnier wrote:

Salam Y. Elias wrote:

Thanks Chuck, recommandation was great.

I downloaded 8.0.21, created three directories, each one with its own
Tomcat, chnaged some ports in server.xml and all 3 applications are
running like a charm.

However, I am trying to replace the Root with my application. I delete
the Root directory and create something like this

/opt/apache-tomcat-8-perfs/webapps/ROOT.war/my.war

I understand that when I start tomcat it should explode the war which is
not happening.

In my server.xml I have autoDeploy="true" as follows

 

but nothing happens, nothing is exploded and deployed to my webapps



this may help : 
http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F 



(the last section looks like it was written specially for you)

Errata : it is not the last section, it is the 2d section, about deploying your 
application as a war file.


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



RE: Fedora 20 Yum and tomcat setup

2015-04-08 Thread Caldarale, Charles R
> From: Salam Y. Elias [mailto:salamli...@free.fr] 
> Subject: Re: Fedora 20 Yum and tomcat setup

> However, I am trying to replace the Root with my application.

That's ROOT (case sensitive), also known as the default webapp.

> I delete the Root directory and create something like this
> /opt/apache-tomcat-8-perfs/webapps/ROOT.war/my.war

That's not correct - you need to rename your .war file to ROOT.war and place it 
in the webapps directory.  You should end up with just this:

/opt/apache-tomcat-8-perfs/webapps/ROOT.war

 - 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: Fedora 20 Yum and tomcat setup

2015-04-08 Thread André Warnier

Salam Y. Elias wrote:

Thanks Chuck, recommandation was great.

I downloaded 8.0.21, created three directories, each one with its own
Tomcat, chnaged some ports in server.xml and all 3 applications are
running like a charm.

However, I am trying to replace the Root with my application. I delete
the Root directory and create something like this

/opt/apache-tomcat-8-perfs/webapps/ROOT.war/my.war

I understand that when I start tomcat it should explode the war which is
not happening.

In my server.xml I have autoDeploy="true" as follows

 

but nothing happens, nothing is exploded and deployed to my webapps



this may help : 
http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F


(the last section looks like it was written specially for you)

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



Re: Rendering JSP files through Apache

2015-04-08 Thread André Warnier

Leggio, Andrew wrote:

I have the following being used in my conf file:


  ProxyPass / ajp://localhost:8009/


Does this actually direct jsp files to use Tomcat?



That is a funny way of putting it.
What the above does - if everything else is installed and configured correctly - is 
proxying *all* HTTP requests originally directed to Apache httpd (including requests for 
any JSP page), toward a Tomcat supposedly running on the same host, and supposedly 
listening on port 8009.

Now whether this is actually what is happening or not, is anyone's guess so far.
Chances are that this is not happening though, since otherwise you probably would not be 
asking what's wrong.


The question is also : if you are going to proxy all requests from Apache httpd to Tomcat 
anyway, then why do you think that you need Apache httpd ?



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



Re: Configure Tomcat 7 using Apache 2.4.6

2015-04-08 Thread André Warnier

Leggio, Andrew wrote:

I am trying to get tomcat to work under Apache.  I have verified that tomcat is 
listening on port 8009.

I tried doing the following:
Apache Web Server Settings
Add the following to the /etc/httpd/conf.d/proxy_ajp.conf file or if that file 
does not exist you can add it to the end of the /etc/httpd/conf/httpd.conf file 
instead:


  ProxyPass / ajp://localhost:8009/


Once I put this in my html pages will not render:
[cid:image001.png@01D07202.009EC2D0]

What am I doing wrong?  Any help would be greatly appreciated.  Thanks.



Andrew, you are really not providing enough information for anyone to be able 
to help.
Your inline image did not make it to the forum, so we have really no idea what result you 
are trying to show us.
Nor do we know if your Apache httpd configuration is correct.  The configuration lines 
above are not all that you need to do in order to properly load and run the mod_proxy_ajp 
connector module in Apache httpd.
I don't know exactly on which kind of OS platform you are running this, but it kinda looks 
like RedHat or similar.  For a start, as user root, try entering the command "a2enmod" and 
paste here what it displays.

Also tell us what is the content of the Tomcat webapps/ROOT/ directory.


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



Re: Fedora 20 Yum and tomcat setup

2015-04-08 Thread Salam Y. Elias
Thanks Chuck, recommandation was great.

I downloaded 8.0.21, created three directories, each one with its own
Tomcat, chnaged some ports in server.xml and all 3 applications are
running like a charm.

However, I am trying to replace the Root with my application. I delete
the Root directory and create something like this

/opt/apache-tomcat-8-perfs/webapps/ROOT.war/my.war

I understand that when I start tomcat it should explode the war which is
not happening.

In my server.xml I have autoDeploy="true" as follows

 

but nothing happens, nothing is exploded and deployed to my webapps

Thanks again

Salam


On Tue, 2015-04-07 at 17:07 +, Caldarale, Charles R wrote:
> > From: Salam Y. Elias [mailto:salamli...@free.fr] 
> > Subject: Fedora 20 Yum and tomcat setup
> 
> > I used Yum to setup which installed Apache Tomcat/7.0.52.
> 
> You should probably stop right there and undo that.  The 3rd-party mangled 
> versions of Tomcat tend to scatter files all over the place to the point 
> where the installation isn't anything at all like a standard setup.  I would 
> strongly suggest you download the desired Tomcat version (why not 8.0.21?) 
> from tomcat.apache.org and install that.  That will provide all the necessary 
> scripts and use a known directory layout that corresponds to the Tomcat 
> documentation.
> 
> Once a real Tomcat is installed, you should be able to update the 
> configuration per the documentation.  If you have questions after that, 
> please come back and ask again.
> 
>  - 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
> 



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



Rendering JSP files through Apache

2015-04-08 Thread Leggio, Andrew
I have the following being used in my conf file:


  ProxyPass / ajp://localhost:8009/


Does this actually direct jsp files to use Tomcat?


Andrew J. Leggio | MBIA Services Corporation | Assistant Vice President | Phone 
* (914) 765-3206 | Fax * (914) 765-3095 | * 
andrew.leg...@mbia.com



--
This e-mail, including any attachments, is intended only for use by the 
addressee(s) named herein and may contain legally privileged and/or 
confidential information.  If you are not the intended recipient of this 
e-mail, you are hereby notified any dissemination, distribution or copying of 
any part of this e-mail is strictly prohibited; please contact the sender and 
permanently delete the original and any copies of it.
--


RE: Configure Tomcat 7 using Apache 2.4.6

2015-04-08 Thread Leggio, Andrew
Andy,
Thank you for responding.  I changed the mod_proxy_ajp.c to 
mod_proxy_ajp.so which is the module that is being loaded.  Now my html pages 
are rendering fine; however, when I go the jsp pages it's not even putting an 
entry in the tomcat access log.
 Any ideas?

Andy 

Andrew J. Leggio | MBIA Services Corporation | Assistant Vice President | Phone 
P (914) 765-3206 | Fax ( (914) 765-3095 |   andrew.leg...@mbia.com


-Original Message-
From: Andy Wang [mailto:aw...@ptc.com] 
Sent: Wednesday, April 08, 2015 2:07 PM
To: users@tomcat.apache.org
Subject: Re: Configure Tomcat 7 using Apache 2.4.6



On 04/08/2015 12:43 PM, Leggio, Andrew wrote:
> I am trying to get tomcat to work under Apache.  I have verified that 
> tomcat is listening on port 8009.
>
> I tried doing the following:
>
> *Apache Web Server Settings*
>
> Add the following to the */etc/httpd/conf.d/proxy_ajp.conf* file or if 
> that file does not exist you can add it to the end of the
> */etc/httpd/conf/httpd.conf* file instead:
>
> 
>
>ProxyPass / ajp://localhost:8009/
>
> 
>

Did you actually load the mod_proxy_ajp module?
Given the directory structure of the configuration files you're likely using a 
distribution bundled apache httpd.  Given that you'd probably get a bit more 
help from the resources for that distribution.  But it's most likely that you 
need to ensure that the module is loaded.

Andy


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



--
This e-mail, including any attachments, is intended only for use by the 
addressee(s) named herein and may contain legally privileged and/or 
confidential information.  If you are not the intended recipient of this 
e-mail, you are hereby notified any dissemination, distribution or copying of 
any part of this e-mail is strictly prohibited; please contact the sender and 
permanently delete the original and any copies of it.
--


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



Re: Performance question...

2015-04-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Tony,

On 4/7/15 12:54 PM, PerfGuru wrote:
> Hi All,We are noticing when running a simple load test of 25
> virtual users that our Tomcat server is running at 40% CPU and
> transactions are taking over 40 seconds. We setup a test where we
> focused (in a loop) one of the longer response time requests. The
> access logs show the log response time and the developers have
> monitoring via their own logs where they record response times for
> queries and other things but do not show the response times as
> being nearly as long as the access logs indicate.
> 
> We connected up visualvm 1.3.7 remotely and using the sampler the
> only method response time above 2 seconds on average was the
> TaskQuery.take() which was over 100 seconds for some reason.

What is the stack trace for TaskQuery.take()? I've never heard of
"TaskQuery"; is that some component you wrote yourselves?

> We are using some version of 7.x for tomcat and also for the jdk.

Specific versions, please.

> The tomcat config file is shown below. We are in the process of 
> setting up visualvm on the unix server where Tomcat is running so
> we can use local mode for visualvm instead of remote.
> 
>  compressableMimeType="text/html,text/xml" 
> noCompressionUserAgents="gozilla, traviata" compression="on" 
> disableUploadTimeout="true" connectionTimeout="2" 
> acceptCount="100" redirectPort="8443" enableLookups="false" 
> minSpareThreads="25" maxThreads="512" maxHttpHeaderSize="8192"/>

You are using the default protocol ("HTTP/1.1") which will auto-select
the implementation based upon whether APR/native is available or not.
Can you tell us which connector is actually being used?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVJXn7AAoJEBzwKT+lPKRYZGIP/ibwVWj8LzprNBdcxVeHl64V
2U/4LClsA+SRdzxNomd18WLfavVKas9DVZHAVEDH7RIJguSi68QxH9Sv39usMSU8
MrVYvR76DD4vOR7rQNpqXcplfp+NP3bVgPWiOW3F9UqFBHTZiUmD8A6/4VvdXxPa
qRDMeQ8HXDWUbmG423dolachHHCwCAX8JLaIped3twuE+TKmvVbbRCLWvGgFA10q
UNLamqbZ8Z6i6NOPrDY709hSp6Cc06fBpIUldiu5gGIQHTPISmXRVeXEofbJ5wBL
T21N6HdU5RZetPaNtNUSOQbV1awR7l89LZBfFI/OAWHyIeVSqojogE9MvoieaJ9N
Urg1EqLp9FeqLbS3YiwiV7aZyIMCKaRlY4lwsNoqNOklk7RKqmwr9VKYgbtHsH7x
Gjx5ed5G7fVFwKH1x+Ny0d8Jsl2pzgqzoKjE8LG712maGG9DU2dcZuIF+ZDBsOvz
wUcQvmFlnpV8yG8uaYgoWSGiQL2XlFLOJfnh9xrRQvFVu+1Ya/MLMpjtuImDb55v
85w6TvWkcn4jgqoejufCb/GhG/20k8Xew7UdmIttyoFb4/vKEsGRWs94s7hAae3s
vBcdjDshf35CRHTIlna5QhKH8d6jXyYqP8BDyBxeB0F4Sh0Rwiz/B9vkIARX2syy
0Usx55k35IC09422/Wap
=Dm02
-END PGP SIGNATURE-

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



Re: Configure Tomcat 7 using Apache 2.4.6

2015-04-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Andrew,

On 4/8/15 1:43 PM, Leggio, Andrew wrote:
> I am trying to get tomcat to work under Apache.  I have verified
> that tomcat is listening on port 8009.
> 
> 
> 
> I tried doing the following:
> 
> *Apache Web Server Settings*
> 
> Add the following to the */etc/httpd/conf.d/proxy_ajp.conf* file or
> if that file does not exist you can add it to the end of the 
> */etc/httpd/conf/httpd.conf* file instead:
> 
> 
> 
> 
> 
> ProxyPass / ajp://localhost:8009/
> 
> 
> 
> 
> 
> Once I put this in my html pages will not render:
> 
> cid:image001.png@01D07200.95E58D80

Your image attachment was stripped. Can you describe this in plain text?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVJXlBAAoJEBzwKT+lPKRY19YQALloRwgdGdONOkZ1qRzZyxIZ
RCuJj9Vf9vv8W+5vZFTL9vgj/R+OF1Ih5QdZbgWyneqRENe51lqAv2DAT2wgVXvn
iKQjcJm5xEeN6pm0X/MevkYSvUGm1x/hnYYPPHiAsgW1/PBw7pU5JH0+B4gYAWvr
VQzK+3uMN/3XLInS5pO6IzAEpf3AIEZpZ7RIASLATzCy8Aw3CpDTY9T+bFMccFH5
0eFAuPZZogZMfdNdiUd0/Rorla3PlP164aD3M0xqCDkdHXOtYibnPMYkEUwamtEG
c/pz26dPAtDI3ZPGEqnbXnkuhvQCAGuJXMGvN42CkbgKH+UYmC1SyYTPtHFZ1iJj
8AWDH0yts7gP9MwfcS9yHnchCBgYBxRRIMSVwMMW4bULiQ4XV07076oC8tCV2hvh
8LJvme4+5loNjpRi5aK66r3Cy7nJyVoJMDaWQbAk1/dHlkxKzc76lrDa7VRpKYip
mCfzOcFKVGdHq//U33znmZWkM6cF5JecO1HvrZjWtLp57MGU/+84Qxe0w6xO04zi
arAdB2zi6BWnuf7e0aTX4Lh782Ok4OCIy4pxv5V08KstrobtN/TELa257lQ23RPd
S53X+fDHIZIGwGxZS+M7Grm1xlWa3DXiGDCEcsRJcE3pwXAKbOKdfDM7wvhTSrOq
RlNDUHgrESflfh3mdgjO
=8se/
-END PGP SIGNATURE-

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



Re: Configure Tomcat 7 using Apache 2.4.6

2015-04-08 Thread Andy Wang



On 04/08/2015 12:43 PM, Leggio, Andrew wrote:

I am trying to get tomcat to work under Apache.  I have verified that
tomcat is listening on port 8009.

I tried doing the following:

*Apache Web Server Settings*

Add the following to the */etc/httpd/conf.d/proxy_ajp.conf* file or if
that file does not exist you can add it to the end of the
*/etc/httpd/conf/httpd.conf* file instead:



   ProxyPass / ajp://localhost:8009/





Did you actually load the mod_proxy_ajp module?
Given the directory structure of the configuration files you're likely 
using a distribution bundled apache httpd.  Given that you'd probably 
get a bit more help from the resources for that distribution.  But it's 
most likely that you need to ensure that the module is loaded.


Andy


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



Configure Tomcat 7 using Apache 2.4.6

2015-04-08 Thread Leggio, Andrew
I am trying to get tomcat to work under Apache.  I have verified that tomcat is 
listening on port 8009.

I tried doing the following:
Apache Web Server Settings
Add the following to the /etc/httpd/conf.d/proxy_ajp.conf file or if that file 
does not exist you can add it to the end of the /etc/httpd/conf/httpd.conf file 
instead:


  ProxyPass / ajp://localhost:8009/


Once I put this in my html pages will not render:
[cid:image001.png@01D07202.009EC2D0]

What am I doing wrong?  Any help would be greatly appreciated.  Thanks.


Andrew J. Leggio | MBIA Services Corporation | Assistant Vice President | Phone 
* (914) 765-3206 | Fax * (914) 765-3095 | * 
andrew.leg...@mbia.com



--
This e-mail, including any attachments, is intended only for use by the 
addressee(s) named herein and may contain legally privileged and/or 
confidential information.  If you are not the intended recipient of this 
e-mail, you are hereby notified any dissemination, distribution or copying of 
any part of this e-mail is strictly prohibited; please contact the sender and 
permanently delete the original and any copies of it.
--


Re: Problem with SimpleTcpCluster and nodes temporarily dropping out of cluster

2015-04-08 Thread Mark Thomas
On 07/04/2015 21:46, Linus Brimstedt wrote:
> Hello,
> 
> We have a problem with SimpleTcpCluster and session replication.
> We have tested this in Tomcat 7 and 8 (latest versions) on Windows Server
> using latest revision of Hotspot JDK version 7, but checking the code it
> seems like this is not covered anyway.
> 
> The problem:
> Replication works well when servers start up, they get missing sessions and
> new sessions are replicated to all servers.
> If one server temporarily drops out of the cluster, for example because it
> gets unresponsive during deployment of new application, the sessions
> created during this time are not replicated.
> 
> We remove servers from load balancer several times a day to upgrade
> different applications, so this has become a big problem for us.
> 
> Once the server joins the cluster again, new sessions are replicated
> properly. Only sessions created during the unresponsive window are lost.
> 
> 
> I see two solutions:
> 1) Switch to a different session sharing  setup (redis, memcached, or
> similar). We would like to avoid this if possible, to avoid maintaining
> more services.
> 
> 2) Improve SimpleTcpCluster to resend lost sessions.
> We had a brief look at the code and realize it's a bit of work. Before we
> dig deeper into this, it'd be good to see if someone has any thoughts on
> this, other suggestions or ideas to remedy the situation.

1. Use the BackupManager rather than the DeltaManager. It also scales
better.

Mark


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



Re: Multiple login/home pages within a tomcat app

2015-04-08 Thread Neill Lima
Andre,

Excellent reply given the context.

I would add the following:

Given a webapp paradigm why would you need two different login pages to
different resources? Usually what is done is change what the logged user
sees/is able to see. For example:

Scenario 1:

WHEN a administrator logs in to the app XYZ /login URL
THEN the basic option menu is displayed
AND the "Manage users" option is displayed.

WHEN a administrator goes to app XYZ /manage-users URL
THEN "Manage users" page is dislayed

Scenario 2:

WHEN a regular user logs in to the app XYZ /login URL
WHEN the basic option menu is displayed
AND the "Manage users" option is hidden.

WHEN a regular user goes to app XYZ /manage-users URL
THEN "Access not allowed" page is displayed

Of course there is a bit of servlet and security under hood, but I just
wanted to show how the "ACL" would change based on the user-role, not the
URL in question.

On Wed, Apr 8, 2015 at 11:17 AM, André Warnier  wrote:

> Olayemi Olatunji wrote:
>
>> Hello Guys,
>>
>>
>>
>> I’m sort of a newbie to this but I need to know if its achievable.
>>
>>
>>
>> I want to create multiple login pages within a single web app e.g
>> www.tomcat.org/login1, /login2
>>
>>
>>
>> How can I achieve this?
>>
>>
>>
>>  Hi.
> Since you claim to be a newbie at this, I'll try to provide a "learning
> answer".
>
> 1) the simple answer to your question would be : no (or at least not when
> using the standard built-in authentication mechanisms).
> But do not be too disappointed, because a more complete answer might be
> "perhaps, but it depends on the circumstances and on what you want to
> achieve exactly".
>
> 2) a basic and generic explanation of how WWW authentication works :
>
> a) the browser sends a request to the server, for some server resource
> (e.g. a specific HTML page)
> b) the server receives this request, and checks in its configuration, if
> this resource is "protected" and requires some form of
> authentication/permission.
> If not, the server returns the requested page and things stop here.
> So the rest below, is in the case where the requested resource is
> protected.
> c) the server then checks if the browser request already contained some
> form of user authentication. (This can be various things, and i will not
> elaborate at this stage).
> If the request contained such an authentication, the server verifies it,
> and if it is ok, the server returns the requested resource (e.g. the
> desired HTML page), and things again stop here.
> d) if the request did not contain ditto valid authentication, instead of
> returning the requested resource, the server sends back something, to let
> the browser/user know that an authentication is required.  This can also be
> various things, and I will again not elaborate, but let's suppose that in
> your case what is returned is a login page.
> e) the user/browser gets and sees the login page.  The user fills it in,
> with user-id and password, and sends this info back to the server.
> f) the server verifies the submitted user-id/password, and if it is ok,
> returns the desired resource to the browser/user.  At the same time as
> sending that requested page, the server also sends some "token" to the
> browser (for example a cookie), containing the proof that this browser/user
> is now authenticated.
> g) for subsequent requests to the same server, the browser now always
> sends this token along with the next requests.  This will fulfill the check
> that happens at (c) above, so that for these following requests, the server
> will be happy and will return the requested pages, without asking again for
> authentication.
>
> There are many variations possible in the details, but in rough terms, all
> forms of WWW authentication follow more or less the above scheme.
>
> Your question relates to step (d) above.
> The server has to return a login page, but you say that it should return a
> specific one among several possible login pages.
> The question thus becomes : how does the server know /which/ login page to
> return ?
> (The user is not yet known/authenticated, so the server cannot use the
> user-id or any other user-related information in order to choose.)
> So what other criteria can the server use then ?
>
> Possibilities would be :
> - the login page changes depending on the time of day (that's kind of
> unusual, but it is just to illustrate the point)
> - the login page changes depending on the user's IP address
> - the login page changes depending on something else which the browser
> sends along with the initial request
>
> So, what is your use case precisely, and what are you trying to achieve ?
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Multiple login/home pages within a tomcat app

2015-04-08 Thread André Warnier

Olayemi Olatunji wrote:

Hello Guys,



I’m sort of a newbie to this but I need to know if its achievable.



I want to create multiple login pages within a single web app e.g
www.tomcat.org/login1, /login2



How can I achieve this?




Hi.
Since you claim to be a newbie at this, I'll try to provide a "learning answer".

1) the simple answer to your question would be : no (or at least not when using the 
standard built-in authentication mechanisms).
But do not be too disappointed, because a more complete answer might be "perhaps, but it 
depends on the circumstances and on what you want to achieve exactly".


2) a basic and generic explanation of how WWW authentication works :

a) the browser sends a request to the server, for some server resource (e.g. a specific 
HTML page)
b) the server receives this request, and checks in its configuration, if this resource is 
"protected" and requires some form of authentication/permission.

If not, the server returns the requested page and things stop here.
So the rest below, is in the case where the requested resource is protected.
c) the server then checks if the browser request already contained some form of user 
authentication. (This can be various things, and i will not elaborate at this stage).
If the request contained such an authentication, the server verifies it, and if it is ok, 
the server returns the requested resource (e.g. the desired HTML page), and things again 
stop here.
d) if the request did not contain ditto valid authentication, instead of returning the 
requested resource, the server sends back something, to let the browser/user know that an 
authentication is required.  This can also be various things, and I will again not 
elaborate, but let's suppose that in your case what is returned is a login page.
e) the user/browser gets and sees the login page.  The user fills it in, with user-id and 
password, and sends this info back to the server.
f) the server verifies the submitted user-id/password, and if it is ok, returns the 
desired resource to the browser/user.  At the same time as sending that requested page, 
the server also sends some "token" to the browser (for example a cookie), containing the 
proof that this browser/user is now authenticated.
g) for subsequent requests to the same server, the browser now always sends this token 
along with the next requests.  This will fulfill the check that happens at (c) above, so 
that for these following requests, the server will be happy and will return the requested 
pages, without asking again for authentication.


There are many variations possible in the details, but in rough terms, all forms of WWW 
authentication follow more or less the above scheme.


Your question relates to step (d) above.
The server has to return a login page, but you say that it should return a specific one 
among several possible login pages.

The question thus becomes : how does the server know /which/ login page to 
return ?
(The user is not yet known/authenticated, so the server cannot use the user-id or any 
other user-related information in order to choose.)

So what other criteria can the server use then ?

Possibilities would be :
- the login page changes depending on the time of day (that's kind of unusual, but it is 
just to illustrate the point)

- the login page changes depending on the user's IP address
- the login page changes depending on something else which the browser sends along with 
the initial request


So, what is your use case precisely, and what are you trying to achieve ?






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



Multiple login/home pages within a tomcat app

2015-04-08 Thread Olayemi Olatunji
Hello Guys,



I’m sort of a newbie to this but I need to know if its achievable.



I want to create multiple login pages within a single web app e.g
www.tomcat.org/login1, /login2



How can I achieve this?



*Regards,*

*Olayemi Olatunji*

 *Learning Consultant*

[image: cid:image004.png@01CFE929.EA150210]

Mobile: +234 (0)7036583697 | +234 (0)8137061701
Skype: yemiolat
4th Floor, UBA House, Marina, Lagos
www.phillipsconsulting.net

[image: cid:image005.jpg@01CFE929.EA150210] 


Re: Need configuration example for Tomcat 7.0.55 TLS configuration

2015-04-08 Thread Ognjen Blagojevic

On 7.4.2015 15:23, Christopher Schultz wrote:

After a weekend of ripping out clumps of my hair and swearing at my
computer, nothing had worked.   In desperation, before upgrading
Java and Tomcat, I tried regenerating my self-signed certificate
with new settings (SHA256 instead of SHA1) and that seems to have
solved the problem.Moral of the story:   Take browser error
messages with a large grain of salt.


The cipher-mismatch was probably solved by something you changed in
your configuration. Re-generating the TLS certificate might have ended
some of the warnings about certs with a SHA-1 signature, but the
cipher-mismatch is a different beast and probably more important.


+1

I just tested Firefox connecting to server that serves SHA-1 
certificates, and Firefox issues no warning (except in a web console), 
let alone to refuse the connection.


-Ognjen

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