IRC log for #tomcat on 20110225

00:45.59*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
01:05.00*** join/#tomcat yassine (~yassine@cust.dyn.95-152-95-60.swisscomdata.ch)
01:05.00*** join/#tomcat yassine (~yassine@unaffiliated/yassine)
01:29.47*** join/#tomcat eckirchn (~eckirchn@174-24-62-11.clsp.qwest.net)
01:49.08*** join/#tomcat espeed (~espeed@63.246.231.57)
01:50.55*** join/#tomcat Guru (~Guru@ks312562.kimsufi.com)
03:00.59*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
03:17.03*** join/#tomcat yassine (~yassine@cust.dyn.95-152-118-222.swisscomdata.ch)
03:17.03*** join/#tomcat yassine (~yassine@unaffiliated/yassine)
03:17.51*** part/#tomcat Guru (~Guru@ks312562.kimsufi.com)
03:31.49*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
04:17.39*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
05:02.42*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
05:12.18*** join/#tomcat RDove (~rdove@pool-173-64-114-80.bltmmd.fios.verizon.net)
05:12.18*** join/#tomcat RDove (~rdove@unaffiliated/rdove)
06:00.59*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
06:01.18*** join/#tomcat pyroscope (~chatzilla@p5480E788.dip.t-dialin.net)
06:03.58*** join/#tomcat yassine (~yassine@cust.dyn.95-152-118-222.swisscomdata.ch)
06:03.58*** join/#tomcat yassine (~yassine@unaffiliated/yassine)
07:02.36*** join/#tomcat Briareos1 (~B@13-98-136-94.static.net4you.net)
07:03.25Briareos1I am trying to deploy a WAR so that it'll be available directly at http://www.example.org (instead of http://www.example.org/myapp)
07:03.35Briareos1how can I do that?
07:06.26stickyboyBriareos1: I have done this a bit... which version of Tomcat and which OS?
07:06.40Briareos1stickyboy: it's v6.0.20
07:06.55Briareos1stickyboy: on FreeBSD 6.3
07:13.23Briareos1my war needs ages to deploy - can you recommend any tiny webapp that I can use for testing the deployment?
07:24.10*** join/#tomcat ExtraSpice (XtraSpice@78-62-101-194.static.zebra.lt)
07:34.02Briareos1i wonder how hard this can actually be ... isn't that quite a standard thing to want an app in the root?
07:36.30Briareos1the doc's state something about a ROOT.xml
07:50.35*** join/#tomcat drindt (~drindt@g228048122.adsl.alicedsl.de)
07:50.57*** join/#tomcat loddafnir (~mike@91-64-106-43-dynip.superkabel.de)
08:13.57*** join/#tomcat kjkoster5489 (~kjkoster@csp4.waag.org)
08:15.42stickyboyBriareos1: Oops, got side tracked at work sorry. hehehe
08:16.15Briareos1stickyboy: np. so far i've created a ROOT.xml with these contents:
08:16.17stickyboyBriareos1: Yeah, I use Linux but I think I understand the deploying to / pretty well.
08:16.54Briareos1<Context docBase="/home/me/app.war" path="" reloadable="true"/>
08:17.11Briareos1now the app is accessible via /
08:17.12Briareos1BUT
08:17.14Briareos1:)
08:17.32Briareos1SEVERE: Exception fixing docBase: {0}
08:17.38stickyboyHmmm.
08:17.53Briareos1java.io.FileNotFoundException: /APPBASE/PATH/ROOT/META-INF/MANIFEST.MF (No such file or directory)
08:17.57stickyboyWell if it's ROOT.xml it implies it's at path="", so you can remove that.
08:18.55Briareos1stickyboy: removed ... problem persists
08:20.00stickyboyOk, there might be a problem with your appBase.  What's appBase= in your <Host ...>?
08:20.07Briareos1the server.xml might be at fault ... I'll pastebin ...
08:20.08stickyboyThey shouldn't overlap... I know that.
08:20.11stickyboyOk.
08:21.24Briareos1stickyboy:  http://pastebin.com/CzsWUYiw
08:22.20stickyboyOk, I think I see a problem.
08:22.51stickyboyWhat I learned the other is that if you're using an absolute path for docBase in your Context, you should leave appBase="webapps"
08:23.37*** join/#tomcat case_h99 (~case_h99@159.213.59.135)
08:27.01stickyboyLemme find the note in the documentation that hints at that...
08:27.59Briareos1Caused by: java.lang.OutOfMemoryError: PermGen space
08:28.08Briareos1can I garbage collect manually somehow? :)
08:28.33stickyboyNope, you gotta restart Tomcat for that one.
08:28.34stickyboyPain in the ass.
08:28.44stickyboyBut here's the note about the appBase / docBase relation: http://tomcat.apache.org/tomcat-6.0-doc/config/host.html
08:28.46Briareos1stickyboy: I restarted ... hmmmm
08:29.05stickyboy"The docBase attribute of this <Context> element must only be set if the docBase is outside the Host's appBase."
08:29.29stickyboyI had been sticking config stuff in server.xml but I understand now that behavior is deprecated.
08:30.26stickyboyI know only put Hosts and Connectors in server.xml, and keep Contexts in their own subdomains in conf/Catalina/myapp.net/ROOT.xml, etc.
08:30.29Briareos1stickyboy: I read that too ... I am basically just picking up where my hoster had left me alone on that issue ...
08:30.34stickyboyYah.
08:30.40stickyboyI had to do a lot of trial and error too hehehe
08:39.54Briareos1stickyboy: here's something completely new: http://tomcat.apache.org/tomcat-6.0-doc/config/host.html
08:39.55Briareos1:(
08:40.03Briareos1stickyboy: sorry wrong paste
08:40.03Briareos1:)
08:40.10Briareos1this one: java.lang.reflect.InvocationTargetException
08:46.35pyroscopeBriareos1: just deploy the war as ROOT.war
08:47.06pyroscopeany the permgen thing means you have a clasloader leak, or a bad heap space configuration
08:48.29Briareos1pyroscope: it seems that tomcat tries to deploy my app twice - judging by the stdout.log
08:48.54pyroscopewhich can be, if your root.xml sucks, avoid that
08:48.55Briareos1thus the heap space problem i suppose ....
08:49.24pyroscopejust rename the war, or use the manager to upload it to the root context
08:50.50Briareos1pyroscope: I had tried that before but then my app (ROOT.war) didn't get deployed at all ... I'll check once more
08:51.28*** join/#tomcat yassine (~yassine@cust.dyn.95-152-118-222.swisscomdata.ch)
08:51.28*** join/#tomcat yassine (~yassine@unaffiliated/yassine)
08:51.46*** join/#tomcat nodie (~josemaria@62.82.81.113.static.user.ono.com)
08:52.12stickyboyYeah, PermGen is a memory leak, which happens if your app sucks or if you redeploy too many times
08:52.14pyroscoperemove any residual .xml, and retsart the container
08:52.37pyroscopestickyboy: you can redeploy how often you want if you have no leaks
08:53.42stickyboypyroscope: Ah, I suppose if your app is garbage collecting properly, yeah.  You're right.
08:54.14pyroscopeit's more a resource mgmt thing, like stopping threads you started, on undeploy
08:54.43pyroscopeTC6 gives some hints if you add its listener for that
08:54.59pyroscopeand the manager has the "find leaks" button
08:56.03stickyboypyroscope: Hmm.  Yes, I have a Tomcat 5.5 and a Tomcat 6.x and I noticed the manager is much nicer in 6.
08:56.22stickyboySometimes my apps fail to stop in 5.5 and I have to restart Tomcat :(
08:57.10stickyboyFrom what I see Tomcat 6 is more reliable with stopping/starting contexts, though.  I want to upgrade my production to 6 if I can...
08:57.51pyroscopewell, if you want a REAL nice manager look at psi probe
08:57.56pyroscopeoff2work
08:58.19stickyboyAight, later.
08:58.21stickyboyThanks
08:59.12Briareos1could you have a look at that: http://pastebin.com/sEKQxYx3
09:00.35Briareos1this one I mean: http://pastebin.com/gXqcDE6a
09:01.13stickyboyOk... so still the PermGen error?
09:01.19*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
09:01.28stickyboyIs it a big app, or do you have many apps running?
09:01.31Briareos1yes - with that server.xmlhttp://pastebin.com/NAMvvnXc
09:01.36Briareos1http://pastebin.com/NAMvvnXc
09:02.09Briareos1stickyboy:  not a single one beside this one - (except /manager , /host-manger maybe)
09:02.14stickyboyHmmm.
09:02.26stickyboyHas it ever worked? :)
09:04.40Briareos1stickyboy: once ...
09:05.18*** join/#tomcat dvayanu (~another@p5B2346F8.dip0.t-ipconnect.de)
09:05.31Briareos1I've set Xmx and Xms to 512
09:05.44Briareos1so my server states memory: 618M Free (before tomcat launch)
09:07.04Briareos1and 64M Free afterwards
09:07.36Briareos1well that probably means that the memory isn't enough for the application
09:07.42*** join/#tomcat dvayanu_ (~another@p5B236265.dip.t-dialin.net)
09:07.45Briareos1which is still kind of unlikely
09:07.56stickyboyPermGen is different...
09:07.59Briareos1how can i see if it tried to deploy multiple times?
09:08.02Briareos1ok ....
09:08.17stickyboy-XX:MaxPermSize=256m
09:08.44stickyboyMy app was fine until we got popular and I had to increase it, we started seeing PermGen errors a few months ago.
09:08.51stickyboyI doubled it from Debian's stock of 128.
09:08.55stickyboySeemed to work fine.
09:15.15Briareos1i'd rather invest time into development than deployment -.-
09:15.37Briareos1working at it for 3 hours now hmpf
09:16.42stickyboyYeah.
09:16.57stickyboySo increasing PermGen space didn't help?
09:17.20stickyboyDo you have the Tomcat manager enabled?  You can look there to see if your app is deployed twice.
09:18.54stickyboyWow, that psiprobe is a great Tomcat manager replacement...
09:18.54Briareos1stickyboy: do I put that -XX:MaxPermSize=256m into the same line as the Xms stuff i suppose?
09:19.01stickyboyBriareos1: Yeah.
09:19.11stickyboyI'm curious, where are you putting it in FreeBSD?
09:19.26Briareos1in /etc/rc.conf
09:19.41*** part/#tomcat nodie (~josemaria@62.82.81.113.static.user.ono.com)
09:20.01stickyboyOh ok, and that exports it to all environments?
09:20.05Briareos1that answer there looks interesting http://forum.springsource.org/showthread.php?t=41738
09:20.48Briareos1stickyboy: the complete line would be:  tomcat60_java_opts="-Xms512m -Xmx512m -XX:MaxPermSize=256m"
09:21.16Briareos1thus it is valid for tomcat
09:21.29Briareos1stickyboy: apparently increasing MaxPermSize helped
09:21.43stickyboyHooray
09:22.05Briareos1stickyboy: now I'm back where i was before ;)
09:22.08stickyboyThere's some Sun engineer blog about PermGen space... it's different than main memory.
09:23.01Briareos1upon startup I also notice the following: INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/diablo-jdk1.6.0/jre/lib/amd64/server:/usr/local/diablo-jdk1.6.0/jre/lib/amd64:/usr/local/diablo-jdk1.6.0/jre/../lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib:/usr/local/lib
09:23.20Briareos1maybe that's gotta do with it too (?)
09:23.55Briareos1I'll investigate as soon as the app is working
09:24.09Briareos1b/c right now not a single page besides the mail page is accessible
09:24.16Briareos1e.g. The requested URL /contact.gsp was not found on this server.
09:25.09Briareos1maybe some problem with AJP ... as ...:8080/contact.gsp works
09:35.02stickyboyI don't know about that native library... I always wonder too.
09:35.03stickyboyhehe
09:35.05stickyboyLunch, brb.
09:37.53*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
09:47.03*** join/#tomcat constl (~constl@178.128.31.160.dsl.dyn.forthnet.gr)
11:19.27bcavere apr...
11:20.17bcavethere's libctnative stuff - you need to compile it and then stick the generated files into a directory that is referenced by java.library.path
11:20.32bcavelbtcnative
11:20.36bcavenot ct
11:21.16bcavecheck out http://tomcat.apache.org/download-native.cgi for the downloads
11:22.53case_h99and
11:23.17case_h99it is used by tomcat by default? or my webapp must reference it?
11:23.52bcaveif its on the java.library.path, it uses JNI to run tomcat components more efficiently
11:24.02bcaveAPR = Apache Runtime Library
11:25.02case_h99it works on all platforms?
11:27.38bcavels
11:28.08bcaveyup... http://tomcat.apache.org/native-doc/
11:28.27bcavethere's a "windows" section
11:35.04bcavemain org.apache.catalina.core.AprLifecycleListener - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
11:35.14bcaveshould get something like that when it works
11:35.42stickyboyHmmm.  Nice.
11:35.53stickyboybcave: Interesting... why don't they include it by default?
11:36.03bcaveits library dependant
11:36.30bcaveit links to libssl / libapr, etc, etc
11:37.06bcaveso e.g. latest vesrion of Centos is libssl.so.6, while fedora is libssl.so.10
11:38.29bcavei guess the maintainers of various distribtion repositories could do something like that... e.g. try yum info tomcat-native
11:38.43bcave(if you are using a yum-based distro)
11:42.11stickyboyGotcha.
11:42.15stickyboyI'll look.
11:42.22stickyboySeems like a no brainer to put it in...
11:42.33bcaveiirc, Fedora has it, CentOS doesn't in the default repo's
11:44.48bcavewe package our own ;_
11:44.52bcave;)
11:46.17bcavejust noticed its in the "bin" directory of the default distribtion actually...
11:50.54stickyboybcave: On my Debian 5 server I don't see it in the repos or in the tomcat5 package.
11:51.12stickyboyI do see jmx.jar, though.  I never knew that was there but I hear people talk about it.
11:51.29bcavewouldn't be in the tomcat5 package necessarily. the default 6.0.29 distribution download (e.g. tar.gz) from apache.tomcat
11:52.22bcavewith yum you can do a "yum whatprovides */libtcnative*" - not sure what the equiv is with apt
11:54.38bcaveif there's no package, then probably going to have to build
12:01.18case_h99but it is useful for something?
12:02.46case_h99ake
12:02.55case_h99in other words
12:03.08case_h99I must install it
12:03.25case_h99or I could be happy without it?
12:05.22*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
12:16.57bcavecase_h99: its for performance
12:17.10case_h99it works better?
12:17.23bcavethe http connector from ?coyote? i think can be run by the jvm or natively
12:17.31bcaveit performs better
12:18.25bcavedo some load tests, worked better for us
12:18.57bcavessl definitely performs better, but we rather do ssl offloading before tomcat and then use jk connectors
12:19.29bcave(e.g. try some jmeter runs with it enabled and then with it disabled)
12:23.38*** join/#tomcat Kedare (~Kedare@onyxia.netyxia.net)
12:56.13*** join/#tomcat Gryphon_ (~gryphon14@dyn57-173.yok.fi)
13:00.43*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
13:14.23*** join/#tomcat clajo04_ (~clajo04_@pool-74-108-95-175.nycmny.fios.verizon.net)
13:22.02*** join/#tomcat mturk (~mturk@5-253.dsl.iskon.hr)
13:53.11*** join/#tomcat rbanffy (~rbanffy@200.226.123.253)
14:32.58stickyboyAh, I just checked... Tomcat Native is in Debian's repositories: libtcnative-1
14:39.12*** join/#tomcat dvayanu (~another@p5B236265.dip.t-dialin.net)
14:56.42*** join/#tomcat dustg (~dustg@ip01.foxyf.simplybits.net)
15:25.29*** join/#tomcat jasonb (~jasonb@adsl-66-124-73-250.dsl.sntc01.pacbell.net)
15:27.44*** join/#tomcat schmolly159 (~schmolly1@rrcs-76-79-50-2.west.biz.rr.com)
16:01.20*** join/#tomcat grzesag (~grzesag@cpc1-oxfd10-0-0-cust795.4-3.cable.virginmedia.com)
16:28.13*** join/#tomcat dark_soul (~Adium@moobilenet-111-125.ucdavis.edu)
16:28.46dark_souldoes anyone know if RHEL6 includes tomcat 7 via yum install?
16:32.24*** part/#tomcat dark_soul (~Adium@moobilenet-111-125.ucdavis.edu)
16:33.17LzrdKingdoubtful
16:38.20*** part/#tomcat case_h99 (~case_h99@159.213.59.135)
17:34.01*** join/#tomcat pyroscope (~chatzilla@p54A33187.dip.t-dialin.net)
17:38.11*** join/#tomcat randrewj (~u1@dyn-128-59-53-67.dyn.columbia.edu)
18:25.39*** join/#tomcat AJC_Z0 (~AJC_Z0@pdpc/supporter/professional/ajz0)
18:29.14*** join/#tomcat acidjnk (havenone@101-234-103-86.dynamic.dsl.tng.de)
19:21.50*** join/#tomcat jasonb (~jasonb@12.201.129.162)
20:06.13*** join/#tomcat rhonabwy (~rhonabwy@95-91-154-179-dynip.superkabel.de)
20:13.05*** join/#tomcat Maurissimo_ (~Maurissim@host35-206-dynamic.2-87-r.retail.telecomitalia.it)
20:13.35Maurissimo_hi
20:13.44Maurissimo_i need to realize a webmail client
20:14.18Maurissimo_do you know some framework to do this?
20:14.26Maurissimo_that implemets java api mail?
20:20.01pfnjavamail
20:20.03pfnof course
20:21.11Maurissimo_yes but if i download only that jar i need to implement the interface and so on
20:25.17LzrdKingwould a linux .war file work on Mac OS X?
20:25.39Maurissimo_??
20:26.16LzrdKinggot a tomcat app on linux; can i put the war file into a Mac OS X tomcat and it will work?
20:26.36Maurissimo_of course
20:26.50LzrdKingwatch me screw up this server 100% :)
20:33.21*** join/#tomcat Gryphon_ (~gryphon14@dyn57-173.yok.fi)
20:33.57LzrdKingheyyy... it appears to work!
20:48.24*** join/#tomcat frgomes_ (~frgomes@87-194-69-80.bethere.co.uk)
20:49.02frgomes_hi guys :)   Is there an easy way to solve CNFE org.apache.AnnotationProcessor on Tomcat7.0.8 ?
20:49.53frgomes_Thanks a lot for any help! :)
20:53.17frgomes_Should I get back to Tomcat6 ?
20:53.20frgomes_Thanks
20:58.20frgomes_Thank you all for your help.
20:58.27*** part/#tomcat frgomes_ (~frgomes@87-194-69-80.bethere.co.uk)
21:04.24LzrdKingHOORAY! it all works!
21:05.39LzrdKingdoes the happy dance
21:34.27pyroscopethanks for reading the topic. :>
21:39.33LzrdKingwho?
21:52.46*** join/#tomcat rreyes (~Rodrigo@190.95.41.156)
21:53.18rreyesHi all... I am having an issue with Tomcat and Chrome when returning an MP3... for some reason, I get this error from Chrome console: Resource interpreted as document but transferred with MIME type audio/mpeg.
21:53.47rreyesAny ideas what am I doing wrong? If I set the content disposition to be attachment, the file downloads without a problem
22:04.03*** part/#tomcat randrewj (~u1@dyn-128-59-53-67.dyn.columbia.edu)
22:23.41pyroscopeyou have to decide if you want it downloaded or streamed
22:47.19*** join/#tomcat Internat (~nf@123-243-184-161.static.tpgi.com.au)
23:10.27*** part/#tomcat rreyes (~Rodrigo@190.95.41.156)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.