sso integration with tomcat
Hi all, We are trying to implement a single sign on tool with our website. Our architecture is as follows. httpd 2.2 (front end) + mod_jk + apache_tomcat 7.0.53 (back end) we have 5 web applications in the webapps we are using centos 5.4 We are currently testing with josso. (if you know something better please let me know) we are testing with josso's inbuilt sample app. in tomcat/lib/*josso-gateway-stores.xml* I have configured as follows. But I can see db-sstore and db-astore do I need to configure these too? I have followed this tutorial http://www.josso.org/confluence/display/JOSSO1/Database+Setup it doesnt have schema for session and other tables. in josso-gateway-config.xml I have added as we are using plain text for testing I have configured *josso-gateway-auth.xml as follows:* but the problem is when we try to login using the partner app(In this parter app i have configured web.xml and redirect pages accordingly) it is not taking the credentials from the database. it is taking the default ones only. Kindly advice. Please let me know if I have to provide any other details. -- Randeep Mob: +919880050349[B'lore] http://twitter.com/Randeeppr http://in.linkedin.com/in/randeeppr [image: --] Randeep Raman [image: http://]about.me/Randeeppr <http://about.me/Randeeppr>
Re: tomcat-native libraries
Chris,Martin, On Wed, Mar 19, 2014 at 12:59 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Randeep, > > On 3/18/14, 10:27 AM, Randeep wrote: > >> I'm not sure about what kind of connector I'm using. This is my > >> configuration. > > > >> httpd-2.2.3-65.el5.centos + tomcat-connectors-1.2.28-src + > >> tomcat-connectors-1.2.28-src > > > >> [root@server tomcat-connectors-1.2.28-src]# cat > >> /etc/httpd/conf.d/mod_jk.conf JkWorkersFile > >> /etc/httpd/conf.d/workers.properties JkLogFile > >> /var/log/httpd/mod_jk.log JkLogLevel info JkLogStampFormat "[%a > >> %b %d %H:%M:%S %Y] " JkOptions +ForwardKeySize +ForwardURICompat > >> -ForwardDirectories JkRequestLogFormat "%w %V %T" JkMount /* > >> worker1 JkShmFile /etc/httpd/logs/jk-runtime-status > > Assuming that this is the only configuration you have in httpd.conf, > then you are using mod_jk (and not mod_proxy_ajp or mod_proxy_http). > > >> [root@server tomcat-connectors-1.2.28-src]# cat > >> /etc/httpd/conf.d/workers.properties > >> workers.tomcat_home=/usr/share/apache-tomcat-6.0.37/ > >> workers.java_home=/usr/java/default > > You don't need "java_home". > > >> ps=/ > > You don't need "ps". > > I have removed both. Its working without them. > >> worker.list=worker1 worker.default.port=8009 > >> worker.default.host=localhost worker.default.type=ajp13 > > > >> Is there anyway to check which type is this NIO or BIO? > > The from Tomcat's server.xml will tell you that, unless > you have left the default in which case it depends upon whether you > have APR available or not. Since the whole thread started with you > saying you didn't have APR, it's likely that it's /not/ available and > therefore you likely have the default BIO connector. > > - -chris > These are the connectors I can see in my server.xml - Randeep > -BEGIN PGP SIGNATURE- > Version: GnuPG v1 > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJTKJ6dAAoJEBzwKT+lPKRYpi8QAKrcux1ROhOTnlB4zhnobLFK > BjYrggkOddrzQoncePN/4vcZeKssBlzNNNu2JD6OzDmax3vhms/y6Fhn9x3dYwFm > MKDySqHdNiPqe5b33n/vIPg5gqiZlHDh+AzOwW3mG83rI0S8NFt2zIq3EY5pX915 > uu31kISNWR7/W4nFGqngg8lGT6VH0qLXOpjLKCe+AwMIhtgIarfoZ1UZkZbbgBXq > wE0gKC7xO+nCs+nC0Rovadne9nQRLIBjxtqfl8w2+YfuSmanpZ/ar+utAh51xi7X > XCeJP6gKXh+gYZLcauHEyKKVwdHPquJn/p0k8HMNoEkNTYauykwIBcU2GPxlqcPI > 4rE80edoCkIth+RuccnD9xG5Db8QiYDT9Q5Fea9klbs3VwK36FXeLAHiKo3UV4Xg > yZDO2yqEDTdQwNXI1IldMUh9yA7jatvYUg83vL1C11W45dCm7ZHmKeb3GBIF6ze6 > mmmd0aBQ6xle9ghEU57ComPKxcJke+XST7UybIu24Ug29ig9UvgjoortMTmKJaQY > 8kwwPLkfRJKsf3XZa4pMwpY3bhb2o5u6ugz7qcQz318hZUnaWi5kRsS3BJzl4H1u > IXCaD1cVm8sPNWFWJexnJvwY+bLgjCI/zvyz21BwGYqkc4Z8OgQdzGkwPAzPBj9G > DFQAkuNV4BK29jwuRWnl > =onNP > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Re: [Off Topic] Forwarding tomcat logs
Chris, On Wed, Mar 19, 2014 at 1:01 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Dan, > > On 3/18/14, 10:40 AM, Daniel Mikusa wrote: > > On Mar 18, 2014, at 10:13 AM, Randeep > > wrote: > > > >> Hi, > >> > >> I have servers in Amazon Web Services Platform. > >> > >> My servers are Centos 5.4 > >> > >> I have httpd-2.2+mod_jk+tomcat-6.0.37 stack on them > I'm using httpd as front end because I have a few redirection rules set. Also I was using httpd for handling ssl certificates. > >> > >> I'm using elastic load balancer with autoscaling, so, many > >> instances can spawn and terminate anytime. But once the instance > >> is terminated tomcat logs of that instance is no more available. > >> > >> I was trying to forward httpd > > > > ErrorLog supports sending logs to syslog. > > > > http://httpd.apache.org/docs/2.2/mod/core.html#errorlog > > +1 > > Syslog is pretty much the answer to the whole question. > I have configured my httpd.conf as below ErrorLog syslog:local7 And syslog.conf as local7.* @ ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com local1.* @ ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com But I'm not getting any log in error_log or syslog central server. Is it possible to get logs to both error_log file and central syslog server? > > I'm not sure about CustomLog. That might take a little more work. > > Are you trying to send access logs as well? > > > >> and Apache tomcat logs > > > > First thing that comes to mind here is using Log4j and it's syslog > > appender. > > +1 > > I believe there is a syslog plug-in for JULI as well. Not supported > here but I believe it works. > Currently my log4j.properties looks like this. log4j.rootLogger=WARN, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=[%d] %5p%6.6r[%t]%x - %C.%M(%F:%L) - %m%n log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender log4j.appender.SYSLOG.syslogHost=localhost log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout log4j.appender.SYSLOG.layout.conversionPattern=%d{ISO8601} %-5p [%t] %c{2} %x - %m%n log4j.appender.SYSLOG.Facility=LOCAL1 log4j.appender.SYSLOG.Threshold=debug log4j.appender.SYSLOG.FacilityPrinting=true But for this also I'm not getting any logs on any server. Do I need to add any jar files? -Randeep > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1 > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJTKJ8vAAoJEBzwKT+lPKRY088QAKwvUu4Tm3Mbf+VDMScpHdDe > gvJBRmpNgBxEYUh3FC5TUyngrQGiKy24jxeMSvBbcsipZQRPb56n1/G1SoFVewYm > +ty6XPngdTLtU8SylLTlB0rKOB/VaZGccmXgiY6wAwRjJwoEMBT/OYXaAfJdCRNV > Jnrr2SaDidLxMpdiIC2Wh5lDdPeOtMAadLB3Q7dUGM0SY63a3MXKfHxx+f8VDy/t > 57VzGc125U4f9HGyA7JFHcb1cxi6OJjJ8SwwkGtwpGKlPmk8Ut6qcn5zR5D73M+5 > R6YHPcMN804n7M/8mgbVYCKVmkLnmT/eE5wPfxX9ucJDRSZ1CHLBWr828/2BkA/e > JhEsh85tNqOkWbZ8G7VglA3NhHoIPiy2/Isr9Ig+kPR8HxoenQ9yrRxsEs38Y02P > DVP53wx0QxuTYpraFkvPROl1riY2U18tglPZBRjaAg84lKq9RsiIhLPLKY9DM/PS > GeDfa/MZZUJZLv1iBsO6COIiHdfwZ11S0aXGVB0BsH9vbUR4i1Se9CYxXCq8ph6G > Ki5CU1HJ3NaF4gQU8eIP3U+BZRe4gxQkfFQISTQ5++w9qIQZ/yW9LGbwFdRaZ9tG > /EyF8cLM6RD/uqLk6Dp3MZN8iyB+LZ3MRwode5ndZd8M41SIwcTuGXDw6cA0hwO0 > ZajYkHWhEcjx+bIYrUfx > =KVxw > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Re: tomcat-native libraries
On Tue, Mar 18, 2014 at 7:29 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Randeep, > > On 3/18/14, 9:46 AM, Randeep wrote: > > On Tue, Mar 18, 2014 at 7:13 PM, Christopher Schultz < > > ch...@christopherschultz.net> wrote: > > > > John, > > > > On 3/17/14, 9:52 AM, John Smith wrote: > >>>>> > >>>>> > >>>>> Installing the native library will make a difference. > >>>>> Whether the difference is large enough to notice depends > >>>>> very much on your application. If you want to improve your > >>>>> application's performance I suspect your time would be > >>>>> better spent with a profiler to see where the bottlenecks > >>>>> are in your application. > >>>>> > >>>>> Mark > >>>>> > >>>> > >>>> +1 I had the native APR installed and ended up removing it in > >>>> favor of keeping things simple. The NIO connector often > >>>> recommended by Chris S. and others works very well. > > > > It's also a big "safer" in that obscure problems rarely bring-down > > the JVM, whereas a bug in tcnative/apr/openssl can kill the entire > > JVM without warning. > > > > Using APR really only makes sense if you are using Tomcat directly > > as a web server that uses SSL, since there is a measurable > > difference between OpenSSL's performance and JSSE's performance. > > > > -chris > > > > > >> Thank you Chris, In that case, I'm not going to use it. I was > >> using httpd as front end to server ssl certificates. Now load > >> balancer is handling it. > > Stick with the NIO connector. If you are using AJP to connect httpd to > Tomcat, you will probably be better off with the BIO connector, > actually. It's simpler and basically bug-free given its maturity. > Since there is a 1:1 map between Tomcat and httpd connections, there's > no really good reason to switch to another connector IMO. > > - -chris > Chris, I'm not sure about what kind of connector I'm using. This ismy configuration. httpd-2.2.3-65.el5.centos + tomcat-connectors-1.2.28-src + tomcat-connectors-1.2.28-src [root@server tomcat-connectors-1.2.28-src]# cat /etc/httpd/conf.d/mod_jk.conf JkWorkersFile /etc/httpd/conf.d/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat "%w %V %T" JkMount /* worker1 JkShmFile /etc/httpd/logs/jk-runtime-status [root@server tomcat-connectors-1.2.28-src]# cat /etc/httpd/conf.d/workers.properties workers.tomcat_home=/usr/share/apache-tomcat-6.0.37/ workers.java_home=/usr/java/default ps=/ worker.list=worker1 worker.default.port=8009 worker.default.host=localhost worker.default.type=ajp13 Is there anyway to check which type is this NIO or BIO? -BEGIN PGP SIGNATURE- > Version: GnuPG v1 > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJTKFFMAAoJEBzwKT+lPKRYS74P/1UkDakuqDz6LyLUaBeTzcXl > R/2eliStJMAE146C6QpE2YBV4w2dyh/xEnndRmbE3R3NE9cD3yUom+VO7x1OOgL9 > ODM8Ry5AWXBXqhjx2k4hjRM43Hza6Z+GJYb9RutdLj71GCU4fEFrTX23sCAkUKbx > nzCGMG4robj7l6TDSdK6uZpmisV7LGBWsUIjkJnTX5AvxFhU5QsFOISE/osFAy6I > ukw840t57BCJ0mlIV/EBORa+0BCO+lz7ZBk+kkwHG5mSXFapTqNcySKfYGEzkVmD > 8OHBJehmkqHfBuqgiavIwpLZ3wZnLcrJpsMzdxGUG1wuuFVtr1aRZ+h/L+/diUnE > B37m9fOuwd3RfY7uhJXATiYo8oW5nB/EOIYuKDsfgMi7eY/NBg2r8Rw7MHYLJUuN > lXtHJTyyBLQcgw5twnTbdA5MPbdgjZ2A2uw6sKCf5/vNyZBkGky+6Fush9cMRIL/ > zdmNyJCCP9jzBOltFl0NNW/bpI1UKpMk8bScJZvAC3JNvMt1FCu3e4rQmqJXlzwG > yBIQeqoIHpogLbF5CxGcOUJGV80O0o5vq+N2qt7TArqOHEifGhroVAQPEOtYmI/K > x7u4Xv+VPg19YmRS6PJCYkYw082vFbmanXjt7BgmUWNs3WD1ooe66bmWPzKX3btA > HcuHDQFgyaGQu0z55MYP > =Vqt8 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
[Off Topic] Forwarding tomcat logs
Hi, I have servers in Amazon Web Services Platform. My servers are Centos 5.4 I have httpd-2.2+mod_jk+tomcat-6.0.37 stack on them I'm using elastic load balancer with autoscaling, so, many instances can spawn and terminate anytime. But once the instance is terminated tomcat logs of that instance is no more available. I was trying to forward httpd and Apache tomcat logs to a central logging server (splunk/graylog2). But was not able to. http://stackoverflow.com/questions/22293195/forwarding-logs-to-splunk-gralog-from-syslog-ng Has anyone done this? What is the best way to do it? Kindly advise. -- Randeep
Re: tomcat-native libraries
On Tue, Mar 18, 2014 at 7:13 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > John, > > On 3/17/14, 9:52 AM, John Smith wrote: > >> > >> > >> Installing the native library will make a difference. Whether > >> the difference is large enough to notice depends very much on > >> your application. If you want to improve your application's > >> performance I suspect your time would be better spent with a > >> profiler to see where the bottlenecks are in your application. > >> > >> Mark > >> > > > > +1 I had the native APR installed and ended up removing it in favor > > of keeping things simple. The NIO connector often recommended by > > Chris S. and others works very well. > > It's also a big "safer" in that obscure problems rarely bring-down the > JVM, whereas a bug in tcnative/apr/openssl can kill the entire JVM > without warning. > > Using APR really only makes sense if you are using Tomcat directly as > a web server that uses SSL, since there is a measurable difference > between OpenSSL's performance and JSSE's performance. > > - -chris > Thank you Chris, In that case, I'm not going to use it. I was using httpd as front end to server ssl certificates. Now load balancer is handling it. -Randeep -BEGIN PGP SIGNATURE- > Version: GnuPG v1 > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJTKE1nAAoJEBzwKT+lPKRYtq8P/2VBOytTaDZ7Tg7jDWXkBYl3 > nky5nQB1YqMiFnMaSEFuy7z84CEEPKOclQd1qU7GSbvdTL2pKUXhkYo5UCgUxElb > prsiaoMqx4YjCF3XY3231TKCE1v9MgkcGsdFbDu9m4eeyUP+U+R9obh02CsfeHqP > zs+/5eglbfYLeTfxKoJviE+uWOqAbkPD/j9hHJNG2TNme+ognYMshFiAjyEVI0AN > kz+8eoTMabL3mM6echZwwZhfGtMx7xM7oVL+kgdFvwE93iw/JopUyQa0O0znFJ9S > mITnnmjnuFH9J7Ktm96STcJ0VCFy+qmM3+/p0wZOFlh5EWczomcvTMtQIjh2nVzK > CWeLxQlifZoSqIO/zADg79PCJHPnpT8p3woV7Q4Dwb7PmTToKvpZLhday84U7mQG > ue6f3jWaqb93zN8K3qJJll8MT/WqTR84lEeKaVfW3hJevWB0Ym70kGLAcRGgC9fk > f3necQBAhg9B5a0OAPc/+W2b3RrPmQ9NnTTBBzDWxRBmXeBvpkZMLzTZPnZ42VvW > z2HMucc+izlv/43Iz1afeXJI0CyJ+ATtVjfwJdC4/jHYk8p7kjcD61QVjPqh0MtH > Aoa8IvsDBl6K+dOyJ3qOzDpfCMc60491TNGLTojtvNAgNwXOKijLYUTwnqzt5I2F > 8MDbrI2Mj7LYnlPGsIHA > =mCrR > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Re: tomcat-native libraries
On Mon, Mar 17, 2014 at 1:51 PM, Mark Thomas wrote: > On 17/03/2014 08:10, Randeep wrote: > > On Mon, Mar 17, 2014 at 12:35 PM, Mark Thomas wrote: > > > >> On 17/03/2014 04:52, Randeep wrote: > >>> Hi, > >>> > >>> I have a httpd-2.2.3-82.el5.centos.x86_64+mod_jk+apache-tomcat-6.0.37 > >> stack > >>> > >>> Whenever I restart the server it shows the following warning. > >>> INFO: The APR based Apache Tomcat Native library which allows optimal > >>> performance in production environments was not found on the > >>> java.library.path: > >>> /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib > >> > >> That isn't a warning. Warnings start "WARN: ...". > >> > >> It is an informational message. It informs you that that the native > >> library is not installed and that the native library typically has > >> better performance. > >> > > > > Yes. Its an informational message. Sorry about it. > > > >> > >>> Then I tried to install tomcat-native-1.1.27-src > >> > >> Why? To get rid of the log message or to solve a performance problem? > >> > >> Mark > >> > > > > Actually I'm getting this error on production server. > > Again, this is not an error. They start "ERROR: ..." or "FATAL: ..." > > > > I didn't know about > > tomcat native libraries. If it increase performance then I felt that It > > should be implemented. > > Why should you install it? > What performance problem are you trying to solve? > Why do you think that installing the native libraries will solve it? > > While the native library does - generally - perform better, it is not a > magic "make it faster" library. > > > Dear Mark, I was mentioning compilation error. I'm not getting any performance issues. But reading that information in logs I thought by installing the native libraries may improve the performance. So I tried to install it and while compiling I got error. My apologies if I asked something wrong. Mark > > > > That is why I tired to install it. > > > > > >> > > > >>> > >>> But I'm getting the following error. > >>> > >>> #./configure --with-apr=/usr/bin/apr-1-config > >>> --with-java-home=/usr/java/jdk1.7.0_25 > >>> then > >>> #make > >>> make[1]: Entering directory > >>> > `/usr/share/apache-tomcat-6.0.37/bin/tomcat-native-1.1.27-src/jni/native' > >>> /bin/sh /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc > >> -pthread > >>> -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > >> -fstack-protector > >>> --param=ssp-buffer-size=4 -m64 -mtune=generic -DHAVE_CONFIG_H -DLINUX=2 > >>> -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL > >>> > >> > -I/usr/share/apache-tomcat-6.0.37/bin/tomcat-native-1.1.27-src/jni/native/include > >>> -I/usr/java/jdk1.7.0_25/include -I/usr/java/jdk1.7.0_25/include/linux > >>> -I/usr/include/apr-1 -o src/poll.lo -c src/poll.c && touch > src/poll.lo > >>> src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_create': > >>> src/poll.c:112: error: 'APR_POLLSET_NOCOPY' undeclared (first use in > this > >>> function) > >>> src/poll.c:112: error: (Each undeclared identifier is reported only > once > >>> src/poll.c:112: error: for each function it appears in.) > >>> src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_poll': > >>> src/poll.c:306: warning: implicit declaration of function > >> 'APR_RING_FOREACH' > >>> src/poll.c:306: error: expected expression before 'tcn_pfde_t' > >>> src/poll.c:307: error: expected ';' before '{' token > >>> src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_maintain': > >>> src/poll.c:399: warning: implicit declaration of function > >>> 'APR_RING_FOREACH_SAFE' > >>> src/poll.c:399: error: expected expression before 'tcn_pfde_t' > >>> src/poll.c:400: error: expected ';' before '{' token > >>> src/poll.c:392: warning: unused variable 'now' > >>> src/poll.c:391: warning: unused variable 'num' > >>> src/poll.c:391: warning: unused variable 'i' > >>> src/poll.c: In
Re: tomcat-native libraries
On Mon, Mar 17, 2014 at 12:35 PM, Mark Thomas wrote: > On 17/03/2014 04:52, Randeep wrote: > > Hi, > > > > I have a httpd-2.2.3-82.el5.centos.x86_64+mod_jk+apache-tomcat-6.0.37 > stack > > > > Whenever I restart the server it shows the following warning. > > INFO: The APR based Apache Tomcat Native library which allows optimal > > performance in production environments was not found on the > > java.library.path: > > /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib > > That isn't a warning. Warnings start "WARN: ...". > > It is an informational message. It informs you that that the native > library is not installed and that the native library typically has > better performance? > Yes. Its an informational message. Sorry about it. > > > Then I tried to install tomcat-native-1.1.27-src > > Why? To get rid of the log message or to solve a performance problem? > > Mark > Actually I'm getting this error on production server. I didn't know about tomcat native libraries. If it increase performance then I felt that It should be implemented. That is why I tired to install it. > > > > > But I'm getting the following error. > > > > #./configure --with-apr=/usr/bin/apr-1-config > > --with-java-home=/usr/java/jdk1.7.0_25 > > then > > #make > > make[1]: Entering directory > > `/usr/share/apache-tomcat-6.0.37/bin/tomcat-native-1.1.27-src/jni/native' > > /bin/sh /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc > -pthread > > -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector > > --param=ssp-buffer-size=4 -m64 -mtune=generic -DHAVE_CONFIG_H -DLINUX=2 > > -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL > > > -I/usr/share/apache-tomcat-6.0.37/bin/tomcat-native-1.1.27-src/jni/native/include > > -I/usr/java/jdk1.7.0_25/include -I/usr/java/jdk1.7.0_25/include/linux > > -I/usr/include/apr-1 -o src/poll.lo -c src/poll.c && touch src/poll.lo > > src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_create': > > src/poll.c:112: error: 'APR_POLLSET_NOCOPY' undeclared (first use in this > > function) > > src/poll.c:112: error: (Each undeclared identifier is reported only once > > src/poll.c:112: error: for each function it appears in.) > > src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_poll': > > src/poll.c:306: warning: implicit declaration of function > 'APR_RING_FOREACH' > > src/poll.c:306: error: expected expression before 'tcn_pfde_t' > > src/poll.c:307: error: expected ';' before '{' token > > src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_maintain': > > src/poll.c:399: warning: implicit declaration of function > > 'APR_RING_FOREACH_SAFE' > > src/poll.c:399: error: expected expression before 'tcn_pfde_t' > > src/poll.c:400: error: expected ';' before '{' token > > src/poll.c:392: warning: unused variable 'now' > > src/poll.c:391: warning: unused variable 'num' > > src/poll.c:391: warning: unused variable 'i' > > src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_pollset': > > src/poll.c:471: error: expected expression before 'tcn_pfde_t' > > src/poll.c:472: error: expected ';' before '{' token > > make[1]: *** [src/poll.lo] Error 1 > > make[1]: Leaving directory > > `/usr/share/apache-tomcat-6.0.37/bin/tomcat-native-1.1.27-src/jni/native' > > make: *** [all-recursive] Error 1 > > > > This is my version of ap > > Package apr-1.2.7-11.el5_6.5.x86_64 already installed and latest version > > Package apr-devel-1.2.7-11.el5_6.5.x86_64 already installed and latest > > version > > Package apr-util-1.2.7-11.el5_5.2.x86_64 already installed and latest > > version > > > > Cant I install this version in centos 5? > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
tomcat-native libraries
Hi, I have a httpd-2.2.3-82.el5.centos.x86_64+mod_jk+apache-tomcat-6.0.37 stack Whenever I restart the server it shows the following warning. INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib Then I tried to install tomcat-native-1.1.27-src But I'm getting the following error. #./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/usr/java/jdk1.7.0_25 then #make make[1]: Entering directory `/usr/share/apache-tomcat-6.0.37/bin/tomcat-native-1.1.27-src/jni/native' /bin/sh /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -DHAVE_OPENSSL -I/usr/share/apache-tomcat-6.0.37/bin/tomcat-native-1.1.27-src/jni/native/include -I/usr/java/jdk1.7.0_25/include -I/usr/java/jdk1.7.0_25/include/linux -I/usr/include/apr-1 -o src/poll.lo -c src/poll.c && touch src/poll.lo src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_create': src/poll.c:112: error: 'APR_POLLSET_NOCOPY' undeclared (first use in this function) src/poll.c:112: error: (Each undeclared identifier is reported only once src/poll.c:112: error: for each function it appears in.) src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_poll': src/poll.c:306: warning: implicit declaration of function 'APR_RING_FOREACH' src/poll.c:306: error: expected expression before 'tcn_pfde_t' src/poll.c:307: error: expected ';' before '{' token src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_maintain': src/poll.c:399: warning: implicit declaration of function 'APR_RING_FOREACH_SAFE' src/poll.c:399: error: expected expression before 'tcn_pfde_t' src/poll.c:400: error: expected ';' before '{' token src/poll.c:392: warning: unused variable 'now' src/poll.c:391: warning: unused variable 'num' src/poll.c:391: warning: unused variable 'i' src/poll.c: In function 'Java_org_apache_tomcat_jni_Poll_pollset': src/poll.c:471: error: expected expression before 'tcn_pfde_t' src/poll.c:472: error: expected ';' before '{' token make[1]: *** [src/poll.lo] Error 1 make[1]: Leaving directory `/usr/share/apache-tomcat-6.0.37/bin/tomcat-native-1.1.27-src/jni/native' make: *** [all-recursive] Error 1 This is my version of ap Package apr-1.2.7-11.el5_6.5.x86_64 already installed and latest version Package apr-devel-1.2.7-11.el5_6.5.x86_64 already installed and latest version Package apr-util-1.2.7-11.el5_5.2.x86_64 already installed and latest version Cant I install this version in centos 5? -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Getting Apache Tomcat logs in mail
Hi, Is there any way to get exceptions mailed? I have an apache tomcat 6.0.37 with httpd as front end connected with mod_jk. I have 5-6 web applications hosted in my tomcat. So I get a lot of logs. And the applications are big so tracking each and everything is a little bit tiring. Is there anyway I can get exceptions mailed? We are using log4j logger. Is there anything I can set in log4j.properties to achive this? I had gone through some posts but none of them are clear and I wanted to know which is the best and right way. -- Best Regards, Randeep Mob: +919880050349[B'lore] A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Re: Error redirection settings
On Wed, Feb 19, 2014 at 7:37 PM, André Warnier wrote: > Randeep wrote: > >> Hi, >> >> I'm using tomcat apache-tomcat-6.0.37 >> I have a few web applications in webapps directory. >> >> portal >> sms >> crm >> >> I'm creating custom error pages. >> >> inside the webapplication "portal" under WEB-INF in web.xml I have given >> the following. >> >> >> 400 >> /lp/404.html >> >> >> 404 >> /lp/404.html >> >> >> 500 >> /lp/oops.html >> >> >> java.lang.Throwable >> /lp/oops.html >> >> >> And is working fine for the errors like >> >> domain.com/portal/sdgggdhsh >> >> But for other web applications, obviously it wont work. because I haven't >> configured in their web.xml files. >> >> Is there any way I can give common error pages? >> I can see that there is a web.xml file under conf directory. And I have >> given the settings in it. As below. >> >> >> 400 >> /404.html >> >> >> 404 >> /404.html >> >> >> 500 >> /oops.html >> >> >> java.lang.Throwable >> /oops.html >> >> >> Path I changed. starting from "/" and put the files in webapps directory. >> But it is not working. >> >> How can I do this? >> > > After a search in Google for "tomcat error-page location", I found this : > http://stackoverflow.com/questions/3856145/empty-page- > instead-of-custom-tomcat-error-page > > which seems to say that Tomcat will always prefix the given > with the > context path of the application where the error happens. > (For example, if you have /oops.html error happens in your app "/MyApp", then Tomcat will be looking for the > file ...webapps/MyApp/oops.html). > > So you cannot have one "generic" location for these error pages, and share > them for all applications. You have to add the error page to each deployed > application, separately. > > More precisely : you can *define* the error pages, as you have done, in > the generic conf/web.xml. But you still have to put a copy of the pages > themselves in each application separately. > I suppose that this obeys the general principle according to which each > application should be self-contained. > > Maybe in later Tomcat versions, there would be a way around this via > aliases or the likes, but it is probably still not recommended. > > > Note also, separately : the URL path "/" resolves to ".../webapps/ROOT/", > not to ".../webapps/". > > Thank you for the reply Andre. I'll add in all the webapps separately. > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Error redirection settings
Hi, I'm using tomcat apache-tomcat-6.0.37 I have a few web applications in webapps directory. portal sms crm I'm creating custom error pages. inside the webapplication "portal" under WEB-INF in web.xml I have given the following. 400 /lp/404.html 404 /lp/404.html 500 /lp/oops.html java.lang.Throwable /lp/oops.html And is working fine for the errors like domain.com/portal/sdgggdhsh But for other web applications, obviously it wont work. because I haven't configured in their web.xml files. Is there any way I can give common error pages? I can see that there is a web.xml file under conf directory. And I have given the settings in it. As below. 400 /404.html 404 /404.html 500 /oops.html java.lang.Throwable /oops.html Path I changed. starting from "/" and put the files in webapps directory. But it is not working. How can I do this? -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Re: SEVERE: Servlet.service() for servlet [action] in context with path [/portal] threw exception
On Thu, Jan 30, 2014 at 1:13 PM, Cédric Couralet wrote: > Hi, > > 2014/1/30 Randeep : > > Hi, > > > > I'm getting the following exception. I'm running it in Netbeans IDE. With > > tomcat 7.50.0 > > > > Am I missing some libraries here? Jar files? Developers says its not > their > > code problem its server problem. But i'm not able to get it. > > > > Struts core jar is present and in web.xml i have following lines. > > Which version of Struts are you using? > > > > > > > action > > > > org.apache.struts.action.ActionServlet > > > > config > > /WEB-INF/struts-config.xml > > > > > > debug > > 2 > > > > > > detail > > 2 > > > > 1 > > > > > > > > action > > *.do > > > > > > Jan 30, 2014 12:22:39 PM org.apache.catalina.core.StandardWrapperValve > > invoke > > SEVERE: Servlet.service() for servlet [action] in context with path > > [/portal] threw exception > > java.lang.NullPointerException > > at java.lang.Class.isAssignableFrom(Native Method) > > at > > > org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506) > > at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459) > > at > > > org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:823) > > at > > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:194) > > It looks like an issue known with struts 1.3.10, did you check on struts > jira? > https://issues.apache.org/jira/browse/STR-3173 > (there is a snapshot of struts 1.3.11 available on that ticket). > > That said , struts1 is EOL, > (http://struts.apache.org/struts1eol-announcement.html ) you really > should change the framework. > > -- > > Cédric > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > Thanks a lot Cédric. I changed the version its working now. -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
SEVERE: Servlet.service() for servlet [action] in context with path [/portal] threw exception
Hi, I'm getting the following exception. I'm running it in Netbeans IDE. With tomcat 7.50.0 Am I missing some libraries here? Jar files? Developers says its not their code problem its server problem. But i'm not able to get it. Struts core jar is present and in web.xml i have following lines. action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml debug 2 detail 2 1 action *.do Jan 30, 2014 12:22:39 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [action] in context with path [/portal] threw exception java.lang.NullPointerException at java.lang.Class.isAssignableFrom(Native Method) at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:823) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:194) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Please help me. -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Re: Out of memory exception
I have added -XX:+HeapDumpOnOutOfMemoryError also. Thanks. On Thu, Jan 23, 2014 at 10:49 PM, Randeep wrote: > I mean i'd to give full path. > > like this > export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc > -Xloggc:/usr/share/apache-tomcat-6.0.37/logs/heap.log' > > > > On Thu, Jan 23, 2014 at 10:47 PM, Randeep wrote: > >> Thanks. That worked. Anything unusual? Garbage collection is happening >> too often? >> >> [root@server logs]# cat /usr/share/apache-tomcat-6.0.37/logs/heap.log >> 1.910: [GC 16192K->1923K(260160K), 0.0150080 secs] >> 2.454: [GC 18115K->3151K(260160K), 0.0137140 secs] >> 2.760: [GC 19343K->3309K(260160K), 0.0058220 secs] >> 3.648: [GC 19501K->4446K(260160K), 0.0062870 secs] >> 4.000: [GC 20638K->5063K(260160K), 0.0080940 secs] >> 4.305: [GC 21255K->6302K(260160K), 0.0060890 secs] >> 4.598: [GC 22494K->6323K(260160K), 0.0062020 secs] >> 5.664: [GC 22515K->7098K(260160K), 0.0055070 secs] >> 6.980: [GC 23290K->8708K(260160K), 0.0176410 secs] >> 7.332: [GC 24900K->12045K(260160K), 0.0179400 secs] >> 7.794: [Full GC 24591K->12864K(260160K), 0.2538960 secs] >> 8.476: [GC 29184K->14200K(260288K), 0.0080560 secs] >> 8.939: [GC 30520K->15401K(260288K), 0.0407000 secs] >> 9.379: [GC 31721K->16897K(260288K), 0.0099850 secs] >> 9.603: [GC 33217K->16652K(260288K), 0.0649140 secs] >> 10.498: [GC 32972K->17768K(260288K), 0.0068540 secs] >> 10.885: [GC 34088K->18538K(260288K), 0.0084330 secs] >> 11.225: [GC 34858K->19584K(260288K), 0.0071730 secs] >> 11.466: [GC 35904K->20313K(260288K), 0.0050570 secs] >> 12.128: [GC 36633K->20565K(260288K), 0.0042210 secs] >> 12.385: [Full GC 26015K->20204K(260288K), 0.2847340 secs] >> 13.817: [GC 36524K->22174K(260288K), 0.0155690 secs] >> 14.127: [GC 38494K->25303K(260288K), 0.0816490 secs] >> 14.671: [GC 41623K->27150K(260288K), 0.0436660 secs] >> 15.173: [GC 43470K->28757K(260288K), 0.0140720 secs] >> 15.414: [Full GC 32030K->28926K(260288K), 0.3071990 secs] >> 65.004: [GC 45310K->31775K(260352K), 0.0105440 secs] >> [root@server logs]# >> >> >> On Thu, Jan 23, 2014 at 10:33 PM, André Warnier wrote: >> >>> Randeep wrote: >>> >>>> Hi all, >>>> Thanks a lot for valuable points. Here the information you guys asked >>>> and >>>> the changes I made. >>>> >>>> OS : CentOS release 5.4 (Final) >>>> httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37 >>>> >>>> I installed httpd using yum. >>>> Downloaded tomcat from Apache as compressed archive(tar.gz) >>>> >>>> I'm using following startup script. >>>> [root@server ~]# cat /etc/init.d/tomcat6 >>>> #!/bin/bash >>>> # description: Tomcat Start Stop Restart >>>> # processname: tomcat >>>> # chkconfig: 234 20 80 >>>> JAVA_HOME=/usr/java/default >>>> export JAVA_HOME >>>> PATH=$JAVA_HOME/bin:$PATH >>>> export PATH >>>> CATALINA_HOME=/usr/share/apache-tomcat-6.0.37 >>>> case $1 in >>>> start) >>>> sh $CATALINA_HOME/bin/startup.sh >>>> ;; >>>> stop) >>>> sh $CATALINA_HOME/bin/shutdown.sh >>>> ;; >>>> restart) >>>> sh $CATALINA_HOME/bin/shutdown.sh >>>> sh $CATALINA_HOME/bin/startup.sh >>>> ;; >>>> esac >>>> exit 0 >>>> >>>> As you said, I removed the JAVA_OPTS declaration from .bash_profile and >>>> I >>>> have created setenv.sh and set JAVA_OPTS in it. >>>> [root@server bin]# pwd >>>> /usr/share/apache-tomcat-6.0.37/bin >>>> >>>> [root@server bin]# cat setenv.sh >>>> export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc >>>> -Xloggc:heap.log' >>>> >>>> Now it shows in grep. >>>> [root@server bin]# ps aux | grep Bootstrap >>>> root 1100 33.7 5.4 707052 95240 pts/0Sl 11:29 0:06 >>>> /usr/java/default/bin/java >>>> -Djava.util.logging.config.file=/usr/share/apache-tomcat- >>>> 6.0.37/conf/logging.properties >>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager >>>> -Xms256m >>>> -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log >>>> -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed >>>> -classpat
Re: Out of memory exception
I mean i'd to give full path. like this export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:/usr/share/apache-tomcat-6.0.37/logs/heap.log' On Thu, Jan 23, 2014 at 10:47 PM, Randeep wrote: > Thanks. That worked. Anything unusual? Garbage collection is happening too > often? > > [root@server logs]# cat /usr/share/apache-tomcat-6.0.37/logs/heap.log > 1.910: [GC 16192K->1923K(260160K), 0.0150080 secs] > 2.454: [GC 18115K->3151K(260160K), 0.0137140 secs] > 2.760: [GC 19343K->3309K(260160K), 0.0058220 secs] > 3.648: [GC 19501K->4446K(260160K), 0.0062870 secs] > 4.000: [GC 20638K->5063K(260160K), 0.0080940 secs] > 4.305: [GC 21255K->6302K(260160K), 0.0060890 secs] > 4.598: [GC 22494K->6323K(260160K), 0.0062020 secs] > 5.664: [GC 22515K->7098K(260160K), 0.0055070 secs] > 6.980: [GC 23290K->8708K(260160K), 0.0176410 secs] > 7.332: [GC 24900K->12045K(260160K), 0.0179400 secs] > 7.794: [Full GC 24591K->12864K(260160K), 0.2538960 secs] > 8.476: [GC 29184K->14200K(260288K), 0.0080560 secs] > 8.939: [GC 30520K->15401K(260288K), 0.0407000 secs] > 9.379: [GC 31721K->16897K(260288K), 0.0099850 secs] > 9.603: [GC 33217K->16652K(260288K), 0.0649140 secs] > 10.498: [GC 32972K->17768K(260288K), 0.0068540 secs] > 10.885: [GC 34088K->18538K(260288K), 0.0084330 secs] > 11.225: [GC 34858K->19584K(260288K), 0.0071730 secs] > 11.466: [GC 35904K->20313K(260288K), 0.0050570 secs] > 12.128: [GC 36633K->20565K(260288K), 0.0042210 secs] > 12.385: [Full GC 26015K->20204K(260288K), 0.2847340 secs] > 13.817: [GC 36524K->22174K(260288K), 0.0155690 secs] > 14.127: [GC 38494K->25303K(260288K), 0.0816490 secs] > 14.671: [GC 41623K->27150K(260288K), 0.0436660 secs] > 15.173: [GC 43470K->28757K(260288K), 0.0140720 secs] > 15.414: [Full GC 32030K->28926K(260288K), 0.3071990 secs] > 65.004: [GC 45310K->31775K(260352K), 0.0105440 secs] > [root@server logs]# > > > On Thu, Jan 23, 2014 at 10:33 PM, André Warnier wrote: > >> Randeep wrote: >> >>> Hi all, >>> Thanks a lot for valuable points. Here the information you guys asked and >>> the changes I made. >>> >>> OS : CentOS release 5.4 (Final) >>> httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37 >>> >>> I installed httpd using yum. >>> Downloaded tomcat from Apache as compressed archive(tar.gz) >>> >>> I'm using following startup script. >>> [root@server ~]# cat /etc/init.d/tomcat6 >>> #!/bin/bash >>> # description: Tomcat Start Stop Restart >>> # processname: tomcat >>> # chkconfig: 234 20 80 >>> JAVA_HOME=/usr/java/default >>> export JAVA_HOME >>> PATH=$JAVA_HOME/bin:$PATH >>> export PATH >>> CATALINA_HOME=/usr/share/apache-tomcat-6.0.37 >>> case $1 in >>> start) >>> sh $CATALINA_HOME/bin/startup.sh >>> ;; >>> stop) >>> sh $CATALINA_HOME/bin/shutdown.sh >>> ;; >>> restart) >>> sh $CATALINA_HOME/bin/shutdown.sh >>> sh $CATALINA_HOME/bin/startup.sh >>> ;; >>> esac >>> exit 0 >>> >>> As you said, I removed the JAVA_OPTS declaration from .bash_profile and I >>> have created setenv.sh and set JAVA_OPTS in it. >>> [root@server bin]# pwd >>> /usr/share/apache-tomcat-6.0.37/bin >>> >>> [root@server bin]# cat setenv.sh >>> export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc >>> -Xloggc:heap.log' >>> >>> Now it shows in grep. >>> [root@server bin]# ps aux | grep Bootstrap >>> root 1100 33.7 5.4 707052 95240 pts/0Sl 11:29 0:06 >>> /usr/java/default/bin/java >>> -Djava.util.logging.config.file=/usr/share/apache-tomcat- >>> 6.0.37/conf/logging.properties >>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager >>> -Xms256m >>> -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log >>> -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed -classpath >>> /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar >>> -Dcatalina.base=/usr/share/apache-tomcat-6.0.37 >>> -Dcatalina.home=/usr/share/apache-tomcat-6.0.37 >>> -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp >>> org.apache.catalina.startup.Bootstrap start >>> root 1158 0.0 0.0 3932 692 pts/0R+ 11:29 0:00 grep >>> Bootstrap >>> [root@server bin]# >>> >>> But nothing came in heap.log. So I better monitor this and if I get the >>> OOM >>> again I have to incr
Re: Out of memory exception
Thanks. That worked. Anything unusual? Garbage collection is happening too often? [root@server logs]# cat /usr/share/apache-tomcat-6.0.37/logs/heap.log 1.910: [GC 16192K->1923K(260160K), 0.0150080 secs] 2.454: [GC 18115K->3151K(260160K), 0.0137140 secs] 2.760: [GC 19343K->3309K(260160K), 0.0058220 secs] 3.648: [GC 19501K->4446K(260160K), 0.0062870 secs] 4.000: [GC 20638K->5063K(260160K), 0.0080940 secs] 4.305: [GC 21255K->6302K(260160K), 0.0060890 secs] 4.598: [GC 22494K->6323K(260160K), 0.0062020 secs] 5.664: [GC 22515K->7098K(260160K), 0.0055070 secs] 6.980: [GC 23290K->8708K(260160K), 0.0176410 secs] 7.332: [GC 24900K->12045K(260160K), 0.0179400 secs] 7.794: [Full GC 24591K->12864K(260160K), 0.2538960 secs] 8.476: [GC 29184K->14200K(260288K), 0.0080560 secs] 8.939: [GC 30520K->15401K(260288K), 0.0407000 secs] 9.379: [GC 31721K->16897K(260288K), 0.0099850 secs] 9.603: [GC 33217K->16652K(260288K), 0.0649140 secs] 10.498: [GC 32972K->17768K(260288K), 0.0068540 secs] 10.885: [GC 34088K->18538K(260288K), 0.0084330 secs] 11.225: [GC 34858K->19584K(260288K), 0.0071730 secs] 11.466: [GC 35904K->20313K(260288K), 0.0050570 secs] 12.128: [GC 36633K->20565K(260288K), 0.0042210 secs] 12.385: [Full GC 26015K->20204K(260288K), 0.2847340 secs] 13.817: [GC 36524K->22174K(260288K), 0.0155690 secs] 14.127: [GC 38494K->25303K(260288K), 0.0816490 secs] 14.671: [GC 41623K->27150K(260288K), 0.0436660 secs] 15.173: [GC 43470K->28757K(260288K), 0.0140720 secs] 15.414: [Full GC 32030K->28926K(260288K), 0.3071990 secs] 65.004: [GC 45310K->31775K(260352K), 0.0105440 secs] [root@server logs]# On Thu, Jan 23, 2014 at 10:33 PM, André Warnier wrote: > Randeep wrote: > >> Hi all, >> Thanks a lot for valuable points. Here the information you guys asked and >> the changes I made. >> >> OS : CentOS release 5.4 (Final) >> httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37 >> >> I installed httpd using yum. >> Downloaded tomcat from Apache as compressed archive(tar.gz) >> >> I'm using following startup script. >> [root@server ~]# cat /etc/init.d/tomcat6 >> #!/bin/bash >> # description: Tomcat Start Stop Restart >> # processname: tomcat >> # chkconfig: 234 20 80 >> JAVA_HOME=/usr/java/default >> export JAVA_HOME >> PATH=$JAVA_HOME/bin:$PATH >> export PATH >> CATALINA_HOME=/usr/share/apache-tomcat-6.0.37 >> case $1 in >> start) >> sh $CATALINA_HOME/bin/startup.sh >> ;; >> stop) >> sh $CATALINA_HOME/bin/shutdown.sh >> ;; >> restart) >> sh $CATALINA_HOME/bin/shutdown.sh >> sh $CATALINA_HOME/bin/startup.sh >> ;; >> esac >> exit 0 >> >> As you said, I removed the JAVA_OPTS declaration from .bash_profile and I >> have created setenv.sh and set JAVA_OPTS in it. >> [root@server bin]# pwd >> /usr/share/apache-tomcat-6.0.37/bin >> >> [root@server bin]# cat setenv.sh >> export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log' >> >> Now it shows in grep. >> [root@server bin]# ps aux | grep Bootstrap >> root 1100 33.7 5.4 707052 95240 pts/0Sl 11:29 0:06 >> /usr/java/default/bin/java >> -Djava.util.logging.config.file=/usr/share/apache-tomcat- >> 6.0.37/conf/logging.properties >> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager >> -Xms256m >> -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log >> -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed -classpath >> /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar >> -Dcatalina.base=/usr/share/apache-tomcat-6.0.37 >> -Dcatalina.home=/usr/share/apache-tomcat-6.0.37 >> -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp >> org.apache.catalina.startup.Bootstrap start >> root 1158 0.0 0.0 3932 692 pts/0R+ 11:29 0:00 grep >> Bootstrap >> [root@server bin]# >> >> But nothing came in heap.log. So I better monitor this and if I get the >> OOM >> again I have to increase Max limit! >> > > Maybe you should provide a full path for the -Xloggc option ? > > > >> >> On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz < >> ch...@christopherschultz.net> wrote: >> >> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA256 >>> >>> Randeep, >>> >>> On 1/23/14, 7:43 AM, Randeep wrote: >>> >>>> I'm getting out of memory exception errors. >>>> >>> :( >>> >>> Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap >>>> space at java
Re: Do some research before blogging (was: Out of memory exception)
Hi, I assume you are talking about my blog posts in http://www.linuxhelp.in/ I'm sorry. I'll correct it. I test everything as root user. So while writing also it came like that. On Thu, Jan 23, 2014 at 6:40 PM, KD wrote: > Randeep writes: > > > I blog here: > > http://www.randeeppr.me/ > > Great, but recommending to run Tomcat as root is dangerous nonsense. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Re: Out of memory exception
Hi all, Thanks a lot for valuable points. Here the information you guys asked and the changes I made. OS : CentOS release 5.4 (Final) httpd-2.2.3-65.el5.centos(front_end) +(mod_jk)+ apache-tomcat-6.0.37 I installed httpd using yum. Downloaded tomcat from Apache as compressed archive(tar.gz) I'm using following startup script. [root@server ~]# cat /etc/init.d/tomcat6 #!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 234 20 80 JAVA_HOME=/usr/java/default export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH CATALINA_HOME=/usr/share/apache-tomcat-6.0.37 case $1 in start) sh $CATALINA_HOME/bin/startup.sh ;; stop) sh $CATALINA_HOME/bin/shutdown.sh ;; restart) sh $CATALINA_HOME/bin/shutdown.sh sh $CATALINA_HOME/bin/startup.sh ;; esac exit 0 As you said, I removed the JAVA_OPTS declaration from .bash_profile and I have created setenv.sh and set JAVA_OPTS in it. [root@server bin]# pwd /usr/share/apache-tomcat-6.0.37/bin [root@server bin]# cat setenv.sh export JAVA_OPTS='-Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log' Now it shows in grep. [root@server bin]# ps aux | grep Bootstrap root 1100 33.7 5.4 707052 95240 pts/0Sl 11:29 0:06 /usr/java/default/bin/java -Djava.util.logging.config.file=/usr/share/apache-tomcat-6.0.37/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log -Djava.endorsed.dirs=/usr/share/apache-tomcat-6.0.37/endorsed -classpath /usr/share/apache-tomcat-6.0.37/bin/bootstrap.jar -Dcatalina.base=/usr/share/apache-tomcat-6.0.37 -Dcatalina.home=/usr/share/apache-tomcat-6.0.37 -Djava.io.tmpdir=/usr/share/apache-tomcat-6.0.37/temp org.apache.catalina.startup.Bootstrap start root 1158 0.0 0.0 3932 692 pts/0R+ 11:29 0:00 grep Bootstrap [root@server bin]# But nothing came in heap.log. So I better monitor this and if I get the OOM again I have to increase Max limit! On Thu, Jan 23, 2014 at 8:50 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Randeep, > > On 1/23/14, 7:43 AM, Randeep wrote: > > I'm getting out of memory exception errors. > > :( > > > Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap > > space at java.util.Arrays.copyOf(Arrays.java:2882) at > > > java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) > > > > > at > > java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572) > > > > > at java.lang.StringBuffer.append(StringBuffer.java:320) > > at org.json.JSONArray.toString(JSONArray.java:834) at > > org.json.JSONObject.valueToString(JSONObject.java:1359) at > > org.json.JSONObject.toString(JSONObject.java:1233) at > > com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503) at > > com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414) at > > java.util.TimerThread.mainLoop(Timer.java:512) at > > java.util.TimerThread.run(Timer.java:462) > > If you are trying to serialize huge JSON objects, this is going to > happen. I'm not sure if JSON is as smart as the Java Serialization > engine, but if you have a circular-reference in your object graph, I'd > be willing to bet that the JSON serializer will run forever and > exhaust your heap. > > It's also possible that you simply have a tiny heap and need more, > especially if you aren't currently setting any heap parameters. > > > Is there anyway to see currently set jvm heap size details? Any > > linux commands. > > You can attach any profiler to your app. Good luck catching this in > the act, though, in production. > > You can also use "jmap -heap" which comes with the JDK. Just point it > at a process and you'll get a heap summary from a running JVM. Make > sure your JVM and jmap version match. > > > I have tried creating setenv.sh and putting the new parameters in > > it. but echo $JAVA_OPTS was not giving any value. > > setenv.sh is run during Tomcat startup. Running "echo $JAVA_OPTS" from > the command-line isn't going to reveal anything. What you want to do > is modify setenv.sh, re-launch Tomcat, and then look at the process > command line... something like this: > > $ ps aux | grep Bootstrap > > This should give you the whole command-line for Tomcat, and you can > verify that your heap options have been set. > > > So I have put in .bash_profile and run it. Then restarted tomcat6. > > Don't do that: it will only work if you login using bash, and it won't > work for other users you may have to restart Tomcat. > > > this is the line I added in .bash_profile. JAVA_OPTS="-Xms256
Out of memory exception
Hi, I'm getting out of memory exception errors. Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572) at java.lang.StringBuffer.append(StringBuffer.java:320) at org.json.JSONArray.toString(JSONArray.java:834) at org.json.JSONObject.valueToString(JSONObject.java:1359) at org.json.JSONObject.toString(JSONObject.java:1233) at com.xxx.xxx.servlet.WServlet.writeProgramJson(WServlet.java:503) at com.xxx.xxx.servlet.WServlet$1.run(WServlet.java:414) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Is there anyway to see currently set jvm heap size details? Any linux commands. I have tried creating setenv.sh and putting the new parameters in it. but echo $JAVA_OPTS was not giving any value. So I have put in .bash_profile and run it. Then restarted tomcat6. this is the line I added in .bash_profile. JAVA_OPTS="-Xms256m -Xmx512m -Xss512k -verbose:gc -Xloggc:heap.log" Also I checked in heap.log where catelina.out can be found. But its not created. Then I touched and restarted. But that also didn't work. What is the right way to do this? -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Re: ssl on tomcat
Chris, Yes. I have so many http links as some of our old submitted apps used non secured http links. as the apps are in use we cannot change it. I cannot use any redirect rules to convert all the http to https because of that. We use struts for framework. And normal jsp pages. I'm not a developer so cant say much about it. This is in my server.xml [root@server conf.d]# cat mod_jk.conf # Where to find workers.properties JkWorkersFile /etc/httpd/conf.d/workers.properties # Where to put jk logs JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send servlet for context /examples to worker named worker1 #JkMount /examples worker1 # Send JSPs for context /examples/* to worker named worker1 JkMount /* worker1 JkShmFile /etc/httpd/logs/jk-runtime-status [root@server conf.d]# cat /etc/httpd/conf.d/workers.properties #workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.26 #workers.tomcat_home=/usr/share/tomcat5 workers.tomcat_home=/usr/share/apache-tomcat-6.0.37/ workers.java_home=/usr/java/default ps=/ worker.list=worker1 worker.default.port=8009 worker.default.host=localhost worker.default.type=ajp13 #worker.default.lbfactor=1 Let me know if there is anything else i need to provide Thanks. On Wed, Dec 4, 2013 at 11:18 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Randeep, > > On 12/4/13, 12:22 PM, Randeep wrote: > > I'm using apacche 2.2 as front end and apache tomcat 6.0.37 as > > backend. I'm using mod_jk for connecting them. > > > > The problem is. I'm using ssl certificates. I'v configured ssl on > > apache. when I connect the site with https. it works. but when I > > click on an link it goes. I mean its not secure browsing anymore. > > Do you mean that links on your https:// pages are http:// (i.e. > non-secure) links? > > What does the code look like that produced your pages (e.g. static > file, JSP, or servlet)? > > > My requirement is as follows. > > > > If user connects as https all the links should work as https. If > > the user connects as http all the links should work as http. is > > such thing is possible? > > Absolutely. You just need to supply more information. > > Give us the following and we can help: > > 1. configuration for all connectors. Remember to remove > any sensitive information you may have in that configuration. > > 2. Explain how your webapp produces link URLs. An example would be great. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.15 (Darwin) > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJSn2rmAAoJEBzwKT+lPKRYejMP+wcKlv7ap7c2D4gU/tO2jEru > 7hRmaJO9wYHaM6WGCPA4tRzqEwBw3vrUBLIu7roGSqLiqecK/uDxa0IqEFi9uvEc > N4ba9BA+khHftEw5xPaSmZjtsQ/al0eTpaej6s4FgTS7EOUxK1yvAz84aZZlA3aA > ArAjz9VhNZZ49/KWjYEHSdL59bOvwn9uvnKUxTRIrrJoj1LKj26R85OPV6nnPDPT > y7Vo8XsCSxnqPTTkOW4goNrIP4LjyuKES1HjtWIolbCOLYBSVUaaTr1NXZcB6eX/ > UKvb0uDTYxyLXgrGwJbE2XK/oZUsbr9lMIy65o3acrTyuBR4JBx4bL0HMTbpvZz9 > dOPmQPaxpJ0uIttfnlk1rshCO8mfMhWv6L1yzuPOZy42KObwYmvV1PA2jZy7V6wR > 3bv6T5lrDAJmU5kl1U67jcGLYGxjFGu8jHtsp56eP3ACV6ZbliVOmDK52mvuzBJr > TYal0brQZnIzrmUeP3By07y+rDJnHOwihNwRT+dOOUH1mwA4zXzTe6+rm41G7tbX > 7hDG4YNqBuxahqqdBBXZQnsPRa511o+IVlWS82IO0r08Yfk2Ki459Guv4qCkMg+y > QfWK/WeszLURnURaNUubkhWARUBkEds+ghh/wMAAVJ3wcbD74hjMhoah1y2vcOcQ > q/4Ny9yxlarj99aJ1wSe > =rdj7 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
ssl on tomcat
hi, I'm using apacche 2.2 as front end and apache tomcat 6.0.37 as backend. I'm using mod_jk for connecting them. The problem is. I'm using ssl certificates. I'v configured ssl on apache. when I connect the site with https. it works. but when I click on an link it goes. I mean its not secure browsing anymore. My requirement is as follows. If user connects as https all the links should work as https. If the user connects as http all the links should work as http. is such thing is possible? -- Randeep Mob: +919447831699[kerala] Mob: +919880050349[B'lore] I blog here: http://www.randeeppr.me/ Follow me Here: http://twitter.com/Randeeppr Poke me here! http://www.facebook.com/Randeeppr A little Linux Help http://www.linuxhelp.in/ Work profile: http://in.linkedin.com/in/randeeppr
Re: Parameter Map is null after Ajax Request
Thanks for the reply, guys. I am aware that the Servlet does not have the parameter map directly and that they must be accessed through the request object. I don't know if I said something to that effect to make you think otherwise, but yes, my program accesses the HTML form data via request.getParameter() And I don't believe this problem has much to do with the way or order in which things are being processed. To that end I think you were looking to see if it was an error in JavaScript logic and I don't think that is the case. One thing I forgot to mention is that I tested the same web application on my local (Windows) machine and it works there without problems using the exact same data input. As I stated earlier, I was using Prototype 1.4 to submit my AJAX request. I upgraded to 1.6, the current version, and found that this fixed the problem. Why? I have no idea. I thought the culprit might be the Form.serialize() method which I am using to pass the form data to the input into servlet but they seem to match perfectly. I will keep investigating and let you know if I find anything conclusive. Randeep - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Parameter Map is null after Ajax Request
Over a year ago, a user reported a problem with his Request parameter map showing up null sporadically on his application: http://mail-archives.apache.org/mod_mbox/tomcat-dev/200601.mbox/[EMAIL PROTECTED] I am suddenly seeing similar behavior with our AJAX-enabled web application. We are using RedHat Linux with Tomcat 5.5 and JDK 1.5. Our application loads sets of text area dynamically using AJAX (controlled by the Prototype library). The user can choose to open one or more sets of text data, edit them, and submit the changes using AJAX. It normally works well, but I am seeing a problem with certain sets. Say I have several sets of text data. I load the third set successfully and edit it. Saving Set 3 will demonstrate a problem whereby the servlet that processes this request has an empty Parameter map, despite their being a considerable amount of data being transmitted. A different set, say set 2, submits this data just fine. My first theory as to why this was happening was that some invalid character or too much data was causing the parsing to fail, but I found that loading both sets 2 and 3 together and then saving (which saves both sets) rather bizarrely caused the problem to vanish. What are the circumstances under which the Parameter map could come up null like this? I'm not sure what code to post since this is pretty standard stuff, but here is the Submit function which uses Prototype: function ajaxSend(inForm) { //If there is no input get the first form on the document var ajxForm = (inForm)?inForm:getAjxForm(); setAjaxStatus('Submitting'); var submitter = new Ajax.Request( 'EditPaper', { method: 'post', parameters: Form.serialize(ajxForm), onComplete: ajaxReportStatus, onFailure: ajaxReportError } ); return false; //Stops the form from submitting } - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]