IRC log for #tomcat on 20090429

00:25.01nat2610I'm trying to install an app on a server tomcat but during the execution, if I click on a link, I have a empty result and have that in my log : http://pastie.org/461912
00:26.35nat2610how can I find out what's missing ...
00:34.04pfnwrong version of java, apparently
00:34.17pfnshame on jfreechart for using com.sun.image.codec.jpeg.JPEGImageEncoder
00:34.36pfnjava6 probably works right
00:34.50pfnas does java 1.5
00:42.19nat2610java version "1.6.0"
00:42.25nat2610that the java I have pfn
00:43.38nat2610the same war is currenlty working on a server with java version "1.5.0_06
00:46.06pfnso use that version
00:46.36nat2610isn't it very old ?  
00:46.43pfnblame it on jfreechart
00:46.47pfnsearch their forum for an answer
00:46.50pfnor update jfreechart perhaps
00:47.05pfnor update your version of java
00:58.57jasonbnat2610: Are you running Sun Java in both cases?  Or, one of them Sun Java, and the other GNU (almost) Java?
01:00.36nat2610jasonb, OpenJDK  Runtime Environment (build 1.6.0-b09) I guess it's the gnu one ?  
01:00.58jasonbNope..  But, that's only one of your JVMs.
01:01.09nat2610and the other one Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
01:01.19jasonbHotspot?
01:01.24nat2610jasonb, yes
01:01.32nat2610Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
01:01.51jasonbI would suggest not running OpenJDK then.. I'd suggest downloading Java SE 1.6.0 from java.sun.com and running that instead.
01:02.16jasonbEven after that, it is possible you could end up with the same error.
01:02.34jasonbAlso, make sure to nuke everything in your tomcat's work/ directory tree.
01:02.47nat2610to nuke ?
01:02.50jasonbAnd, any SESSIONS.ser file, whenever Tomcat is stopped.
01:03.02jasonbYes, recursively remove everything inside of Tomcat's work/ directory.
01:03.06jasonb(and then restart Tomcat.
01:03.08jasonb)
02:12.19*** join/#tomcat benn_d (n=benn_d@c-67-176-147-20.hsd1.in.comcast.net)
02:13.27*** join/#tomcat karstensrage (n=karstens@c-76-103-32-139.hsd1.ca.comcast.net)
02:13.47benn_di'm looking to set up a java environment on my linux/apache server, any particular reason why I should pick glassfish or tomcat over the other?
02:22.07nat2610benn_d, no have fun with anything with anything ... choose tomcat if you want to be sure that the system you're using is "bullet proof" in terms of robustness
02:22.30nat2610you can probably find lighter, faster, newer ...
02:22.55nat2610jasonb, I installed the sun one ... I wasn't more successful :(
02:38.05jasonbdoes not believe that benn_d is going to find a faster servlet container.
02:40.15benn_di installed tomcat... 5 since it was available via yum install
02:40.16benn_dheh
02:48.43nat2610I tried the lastest of jfree but it's not compatible with the code of the app ... so I'm going to install jdk 1.5 ..
03:13.30*** join/#tomcat roadt (n=roadt@61.191.27.34)
03:25.20*** join/#tomcat dvayanu (n=another@93.104.53.79)
03:25.59*** join/#tomcat barkbarkmeow (n=barkbark@78.53.157.200)
03:27.17pfnjasonb, anyway, to continue yesterday's opensolaris discussion; regardless of "surviving" opensolaris makes for a very much nicer server platform
03:46.16*** join/#tomcat acidjnk (i=acid@pD950A52E.dip0.t-ipconnect.de)
04:03.13*** join/#tomcat jasonb (n=jasonb@adsl-66-124-73-250.dsl.sntc01.pacbell.net)
04:13.58*** join/#tomcat bhagat (n=bhagat@218.248.24.18)
05:22.51bhagatchannel # does any one have a test web application  for   6.0.8 transparent failover cluster ?
05:41.00*** join/#tomcat dvayanu (n=another@host-62-245-224-138.customer.m-online.net)
05:49.10*** join/#tomcat dvayanu (n=another@host-62-245-224-138.customer.m-online.net)
06:07.09*** join/#tomcat shashi (n=shashi@122.181.1.158)
06:21.24*** join/#tomcat dvayanu (n=another@62.245.224.138)
06:52.12*** join/#tomcat kjkoster5489 (n=kjkoster@unl201395.nl.customer.alter.net)
07:31.18*** join/#tomcat cofeineSunshine (n=justinas@kas.tavatievs.eu)
07:36.19*** join/#tomcat cofeineSunshine (n=justinas@kas.tavatievs.eu)
07:54.34*** join/#tomcat talso (i=sixshot@S0106000eb578ccb2.cg.shawcable.net)
09:19.17*** join/#tomcat Vanuatoo (n=Vanuatoo@92.54.192.70)
09:33.09*** join/#tomcat talso (i=sixshot@S0106000eb578ccb2.cg.shawcable.net)
09:59.50*** join/#tomcat mkandora (n=chatzill@195.43.55.75)
10:01.18*** join/#tomcat debug_ (n=chatzill@195.43.55.75)
10:02.41debug_hello. Is there any default mechanism inside tomcat to trace any calls / inclusion of a jsp (template)? ( im using jdk 1.5, tomcat 5, linux as os)
11:16.45benn_dshould I be creating a system user for Tomcat?
11:17.49kjkoster5489benn_d: absolute necessity? no. Good practice? yes.
11:19.30benn_dk
11:29.07*** join/#tomcat acidjnk (n=have@pD950A52E.dip0.t-ipconnect.de)
11:31.15*** join/#tomcat BerryMarmalade2 (n=fabio@host241-190-dynamic.51-79-r.retail.telecomitalia.it)
11:33.42*** join/#tomcat acidjnk (i=acid@pD950A52E.dip0.t-ipconnect.de)
11:48.57*** join/#tomcat oxi (n=oxi@213.189.154.84)
12:21.34*** join/#tomcat saftsack (n=oliver@p4FC75F29.dip.t-dialin.net)
12:22.30saftsackhi, why describe all howtos the importing of a certificate just as adding a crt or pem file to the keystore. what's about the private key?
12:32.21benn_di'm a bit confused about what I need to do for virtual hosts w/ mod_jk/apache2...  i think i'm about 90% there, but I don't want to make any errors... anyone around that can help?
12:33.20*** join/#tomcat moss23 (n=adam@32.243.broadband5.iol.cz)
12:34.05moss23hey, the installation documentation says, tomcat 6 requires jre 5 ? does it mean it is not optimized for jre 6 ?
12:34.35Blippo_maybe jre 6 wasn't out when the doc was written ;)
12:35.26Blippoi've not used Java 1.5 for ages
12:35.45Blippothus I've run my tomcat on 1,6 and even 1.7 succesfully
12:35.47kjkoster5489moss23: just use 6.
12:36.02kjkoster5489It's faster for simple locking scenario's (which is most of the time).
12:36.11moss23ok, thank you
12:37.01kjkoster5489http://java-monitor.com/forum/showthread.php?t=133
12:39.00benn_dfor apache with virtual hosts, do I need to manually add a reference to each host in server.xml?
12:41.07moss23and the last thing is, if I create "tomcat" user for running the instance, I presume, that entire tomcat, even the webapps content should be owned be tomcat user
12:41.10moss23am I right ?
12:41.54kjkoster5489moss23: no, read access is required, but write access is only necessary for stuff that is written.
12:42.30moss23because I usually had permission issues when the apps were owned by somebody else, and setting group permission is sometimes annoying :)
12:44.53moss23jar packages, classes and other libs do not need execution permissions, only read...is there anything what needs execution permission except those scripts for tomcat control ?
12:45.28kjkoster5489No.
12:45.38kjkoster5489Nothing. Java is just one library.
12:45.48kjkoster5489Maybe JNI libs, but even that I don't know.
12:46.15*** join/#tomcat BerryMarmalade21 (n=fabio@host241-190-dynamic.51-79-r.retail.telecomitalia.it)
12:50.49*** join/#tomcat BerryMarmalade2 (n=fabio@host241-190-dynamic.51-79-r.retail.telecomitalia.it)
12:52.44moss23ok, so I guess I need to pay attention on setting write permissions to the webapps directories
12:52.48moss23thank you
12:53.10kjkoster5489np
12:54.07benn_dso, in my virtual host directives i need to add JkMount entries AND I also have to add <Host>s for each virtualhost into server.xml, is this correct?
12:59.03*** join/#tomcat kervel (n=kervel@58-65-160-128.nayatel.pk)
12:59.35kervelhello, i'd like to have the "/" in my tomcat passed to some servlet that does url routing ... but i do not want to have to deal with serving static files (from WebRoot)
12:59.41kervelis a filter a good idea in that case ?
13:00.29kervelor is there something else ? something i can use to make url -> servlet mapping controlled by my application
13:01.23kerveli want to do something like "if (i_can_handle(url)) { handle(url); } else { do the usual stuff like finding servlet or finding WebRoot file or finding jsp file }
13:01.55kervelor is this question offtopic here ?
13:42.12kervelto answer my own question: seems a filter will do the job
13:50.09kervelhmm, i try to make a servlet filter and now tomcat say "SEVERE: ERROR FilterStart"
13:50.17kerveland no exception or nothing but my application doesn't deploy anymore
13:55.53*** join/#tomcat MHSL (i=Linux@cm18.eta6.maxonline.com.sg)
13:55.53*** join/#tomcat BerryMarmalade2 (n=fabio@host241-190-dynamic.51-79-r.retail.telecomitalia.it)
14:00.12kjkoster5489kervel: from what you posted it sounds like you are trying to take over Tomcat's responsibilites of finding and running the right JSP.
14:00.21kjkoster5489That is usually a terrible idea.
14:00.51kjkoster5489It breaks POLA for new developers.
14:10.34*** join/#tomcat randrewj (n=raj-user@user-160uub9.cable.mindspring.com)
14:21.43benn_di'm getting out of memory issues in other parts of my system (e.g., I can't run the Grails ant build.xml)... i have 1 gig of free ram, but not swap... is there a way i can reasonably decrease tomcat's memory consumption if I know it's not going to be heavily used
14:28.22*** join/#tomcat BerryMarmalade21 (n=fabio@host241-190-dynamic.51-79-r.retail.telecomitalia.it)
14:32.45*** part/#tomcat trifler (i=trifler@farva.bsnet.se)
14:41.22*** join/#tomcat rightsprocket (n=mrray@68.42.56.51)
14:41.40benn_dyes? no? maybe?
15:02.10MHSLcant really decrease, but you can limit the maximum memory usage
15:20.06*** join/#tomcat benn_d (n=benn_d@c-67-176-147-20.hsd1.in.comcast.net)
15:32.20*** join/#tomcat acarbs12 (n=acarbone@64.206.24.18)
15:32.39*** join/#tomcat Vanuatoo (n=Vanuatoo@92.54.192.70)
15:34.27moss23hey, are there better ways of starting new instances of tomcat than running it with startup.sh with modified CATALINA_BASE variable ?
15:35.15oxihi
15:35.23oxidoes tomcat not allow duplicate usernames?
15:35.42oxi<role rolename="account001"/>
15:36.15*** join/#tomcat freezed (n=freezed@nbo79-1-82-244-137-171.fbx.proxad.net)
15:36.19oxi<user username="someuser" password="password1" roles="account001"/>
15:36.26freezedhello
15:36.32oxi<user username="someuser" password="password2" roles="account001"/>
15:36.44oxiargh, I meant:
15:36.53oxi<role rolename="account001"/>
15:36.54moss23It though that I could copy catalina.sh to all bases and each of them modify with "export CATALINA_BASE .....
15:36.56oxi<role rolename="account002"/>
15:37.04oxi<user username="someuser" password="password1" roles="account001"/>
15:37.15oxi<user username="someuser" password="password2" roles="account002"/>
15:37.23oxiam I allowed to do that?
15:37.38oxiso, I'm using the same username for different roles
15:38.04freezedStrange deploy : when I deploy my app (meteo.war) from the manager interface, it tells me it is OK, but the application is never shown in the list and I get a 403 error
15:38.15freezedDid I forget something ?
15:38.30oximoss23: depends what you want to do
15:38.49oximoss23: you could also start tomcat programmatically
15:39.58oxithough I guess using startup.sh should be fine
15:40.18oxifreezed: check the logs
15:40.36oxifreezed: and check if you set up your authentication right
15:41.22moss23I'm installing apache ofbiz, and it provides me with modified catalina.sh to use for run ofbiz on tomcat....I don't know if I can put the catalina.sh to new tomcat instance and run it from there, from CATALINA_BASE ....don't know if the catalina.sh script is meant to be run only from CATALINA_HOME
15:42.16moss23but I guess that it uses only environment variables and not any position data
15:42.36moss23like cd ../conf, you know :)
15:43.45oxiI have no idea about ofbiz
15:44.37oxiI think it only uses environment variables
15:44.51oxiI've done the thing you're planning
15:44.54oxibut I forgot how
15:45.15oxiI just remeber that I kept the bin centralized
15:45.33oxiand most of the rest was per tomcat application instance
15:45.53oxidoes anyone know if the username in tomcat-users has to be unique?
15:46.18oxiunique in terms of xml attributes in tomcat-users
15:47.29moss23oxi, so if there is nothing in instance/conf, it reads the home/conf/* ......if there is some stuff in instance/conf, it prefers these
15:47.44oxinot really
15:48.06oxiI remeber setting environment variables for each tomcat instance to point it to the right conf dirs
15:48.33oxiI think it picks them relative to some kind of environment variable
15:48.41moss23yes, that's right
15:53.35*** join/#tomcat Mr_Grim (n=foo@207.219.39.72)
15:56.01freezedoxi: Strange error in the logs : Caused by: java.lang.IllegalArgumentException: <url-pattern> ...
15:56.20oxihmm
15:56.41oxicheck your web.xml charset encoding
15:56.51oxicheck for weird looking arguments
15:56.52oxi:-)
16:02.55freezedoxi: thanks, I forgot the / caracter.
16:03.04oxi;-)
16:03.11freezedoxi: but now, new strange error : java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class
16:03.34oxihmm
16:03.43oxiusing wrong java version?
16:03.49oxijust a guess
16:04.05oxitried jdk6?
16:06.04*** join/#tomcat saftsack_ (n=oliver@p4FC758E6.dip.t-dialin.net)
16:11.28freezedoxi: you're right, I change version a few days ago to use red5. Now it works !!!
16:11.40oxicool
16:11.44freezedoxi: Thanks a lot for your help
16:11.54oxinp
16:11.59oxiwell I didn't do anyting ;-)
16:12.34freezedbut you had got the good ideas ... :>
16:12.36*** join/#tomcat puskar (n=puskar@PUSKAR.ES.ITS.NYU.EDU)
16:22.41freezedoxi: just another simple question ... what is the best way to access a mysql database from my servlet (I already create a CMysql.java class which works well)
16:23.12oxifreezed: that's a world of it's own
16:23.25oxithere are several ways to access your database
16:23.39oxisome use a library like iBatis or Spring
16:23.47oxiothers do the connection directly in the servlet
16:24.05oxiyou may also create some kind of application context listener
16:24.13oxiI'm using the listener thing
16:24.39oxiI can't tell you what's the best way
16:24.49freezedok directly in the servlet sounds good to me (it is a little school project)
16:24.55oxiI guess that depends on what you are trying to achieve or what you are doing
16:25.10freezedoxi: what do you call a context listener ?
16:25.14oxiyeah, then I guess there's nothing wrong in doing it directly in the servlet
16:25.33oxias you won't be running into performance problems at that point
16:25.58oxithough you must be aware that you have no control over the lifecycle of a servlet in general
16:26.11oxiit's the purpose of the container to handle it's lifecycle
16:26.23oxifurther you should not try to reinvent any pooling
16:26.29*** part/#tomcat ben_d (n=benn_d@c-67-176-147-20.hsd1.in.comcast.net)
16:26.46oxifreezed: I'd forget about the listener, if it's just a little school project
16:27.03*** join/#tomcat acarbs121 (n=acarbone@173.9.89.1)
16:27.06oxiit's much more important that you close cursors and connections properly
16:27.29oxithe connection might be closed automatically by the servlet lifecycle
16:27.53oxibut the cursors or statements most likely won't be closed automatically
16:28.09oximake sure you close all of them properly and you will be fine
16:28.16freezedoxi: thanks again, you should clone yourself and join other channels ... :)
16:28.23oxi;-)
16:41.50oxican anyone please tell me if usernames must be unique?
16:42.12oxican I have the same username in two different roles?
16:42.22oxi<role rolename="account001"/>
16:42.48oxi<role rolename="account002"/>
16:42.49oxi<user username="someuser" password="password1" roles="account001"/>
16:42.49oxi<user username="someuser" password="password2" roles="account002"/>
16:43.05oxiis that allowed or not?
16:43.18*** part/#tomcat vinse (n=vinse_@208.253.223.146)
16:43.29pfnwould assume no
16:44.08oxipfn: you think that I'm not allowed to do that?
16:44.56oxibecause I ran into trouble
16:45.03oxibut I see no error message
16:47.11oxiI guess that this is only possible with a custom authentication
16:48.10*** join/#tomcat jasonb (n=jasonb@75-144-23-117-SFBACA.hfc.comcastbusiness.net)
16:51.35jasonbJust in case anyone has dbcp connection pool timeout problems:
16:51.37jasonbhttp://juststuffreally.blogspot.com/2007/10/broken-pipes-with-tomcat-and-dbcp.html
16:54.39*** join/#tomcat vinse (n=vinse_@208.253.223.146)
17:03.58freezedoxi: have a good day or night or whatever you want, thank you and good bye
17:04.28oxijasonb: thanks
17:10.19jasonboxi: You're welcome.  I sure wish I knew about that page earlier.
17:30.19pfnjasonb, heh, that should be obvious... but wouldn't a connection validation work?
17:31.26jasonbpfn: There are apparently some weird situations where the connection ends up closed.
17:31.42pfnjasonb, a validation query should catch that before it hands the connection out
17:32.00pfnof course, if you have application code that hangs onto a connection for 8 hours, I would say you've got a problem
17:32.04jasonbpfn: Seems like it should.
17:33.12jasonbpfn: Nah, the connections die while they're sitting in the pool.  You're right that a validation query should catch those.. there are still some situations where it's easy to misconfigure and end up with situations where the pool hands out broken connections.
17:33.26pfnwhich is why you need the validation query
17:34.01*** join/#tomcat BerryMarmalade2 (n=fabio@host241-190-dynamic.51-79-r.retail.telecomitalia.it)
17:34.27pfnof course, a validation query can be "expensive" if you're handing out hundreds of connections per second
17:35.04*** join/#tomcat fommil (n=samuel@host-80-192-121-116.static.telewest.net)
17:35.15jasonbpfn: Exactly.
17:35.35pfnbut if you're handing out hundreds of connections per second, this timeout problem isn't an issue  ;-)
17:35.38jasonbpfn: This page shows a more proactive "toss it before it can die" strategy.
17:35.48pfnI suppose that'll work
17:36.04fommilis it possible to specify a different login-config for different security-constraint?
17:36.25jasonbis looking forward to using Filip's new connection pool implementation instead of commons-dbcp.
17:36.39jasonbfommil: Sure.
17:36.58fommiljasonb: know of any examples?
17:37.16fommiljasonb: i thought it could only go in at the web-app level
17:37.36fommiljasonb: which essentially means "one authentication method for all security-constraint"s
17:38.02jasonbNah, you can have many security constraints mapped to different paths/patterns, and each one can be configured differently.
17:39.13fommiljasonb: but, login-config is usually defined outside the security-constraint definition. Should I be able to just throw a login-config inside a security-constraint and have that override? So, for example, one security-constraint could be set up for BASIC auth, whereas the rest of the web-app has to use form?
17:42.42pfnlogin-config does not appear to support multiple settings
17:43.22jasonbfommil: in <login-config> you name a <realm-name>.  You can have multiple realms inside a single webapp.
17:43.42jasonb(I'm pretty sure)
17:43.56pfn<login-config> is unbounded, but there's no way to map a security-constraint to a login-config
17:44.36fommiljasonb: pfn i'm now confused... so what is possible?
17:44.52pfnfommil, basically, it appears what you are asking is not doable
17:45.32fommilpfn: jasonb seems to think it's possible... so I'm still confused
17:46.26fommilmy goal is to have /* authenticated by FORM, except /resources/* which are authenticated using BASIC. How is that best achieved using standard Tomcat (i.e. no Spring)
17:46.42pfnit does not appear possible
17:47.00fommiljasonb: do you agree with pfn?
17:47.40jasonbI am having a display issue right now that is preventing me from opening the spec to find out.  :)
17:48.27jasonbBut, I seem to remember that any webapp can have multiple realms configured.  That's from memory, though, I'm not quoting the spec.. yet.
17:48.30fommilit's a real bummer if this is not possible. Means modern websites need to be either broken across 2 webapps or not use J2EE security
17:48.48fommiljasonb: and it's possible to tell the security constraint which realm to use?
17:48.51pfnI took a look at the xsd, there's no mapping
17:50.12fommildang
17:52.51fommiljasonb: don't worry about it... i gotta run now. I'll think about it some other time. That's a real pain though, I wanted to use BASIC for the REST API and FORM for user login. Forcing machines to use FORM login is always a pain.
18:09.59jasonbpfn: It appears you're right.. from inside web.xml, you can only specify one.  It's in Tomcat's server.xml where you can specify multiple <Realm>s..  But then since each webapp could only declare one login-config, then only one realm implementation could be used by the entire webapp.  Sad.
18:10.22pfnindeedd
18:10.41jasonbThis is one feature that Apache httpd got right.. you can have as many as you want, mapped to different patterns.
18:22.25pfnwell, httpd is conceptually an app server
18:23.11jasonbThe way I see it, it is just as much of an app server as anything, just uses different technologies.
18:23.23pfnthat's not my point
18:23.28pfnthe scope of httpd.conf is at a global level
18:23.30pfnakin to server.xml
18:23.40pfneach <Directory> or <Location> is the equivalent of a webapp
18:23.48jasonbYes.
18:24.16jasonbThey're not actually trying to delineate "webapps" at all.
18:25.31jasonbso all the configuration, even at the granularity of a single directory, is just as top-level as Tomcat's server.xml <Context>.
18:28.20*** join/#tomcat acidjnk (i=acid@pD950A52E.dip0.t-ipconnect.de)
18:31.55kervelregarding kjkoster's remark about changing the way how tomcat finds jsp's / servlets : we are under huge pressure by SEO guys to make "nice" urls
18:32.30kerveland we're in a CMS .. previously, all pages were served by the "page" servlet ... but it has to go, or at least it needs to be deployed on "/" without harming other servlets
18:32.36kerveland it seems that a filter is perfect for that goal
18:32.52jasonbYup.
18:33.37kerveland i fully agree that making a complex routing instead of just "the jsps are in the webroot and the servlets are in web.xml" makes life difficult for developers ... but i see no other option
18:34.29kervel.. apart from using mod_rewrite which - i think - is awful
18:35.39jasonbThere's also the UrlRewriteFilter.  Have you seen that yet?
18:35.47jasonbibot: url-rewrite-filter
18:36.18jasonbibot: url-rewrite-filter is http://tuckey.org/urlrewrite/
18:36.19ibotokay, jasonb
18:36.46jasonbibot: commons-dbcp-fix is http://juststuffreally.blogspot.com/2007/10/broken-pipes-with-tomcat-and-dbcp.html
18:36.47ibotokay, jasonb
18:39.43kervellet me check that one
18:43.59kerveljasonb i'm not really going to use it now,  but i didn't know about it and it seems very interesting (especially the fact that you can do flexible routing of urls -> method invocation)
18:44.04kervelthanks for the link
18:44.16pfnjsp should be "complex" routed
18:44.29pfnjsp should never be an http end point
18:45.36kervelpfn also true ... but when you think in terms of preparing for an opensource release, being as "normal" as possible also has its advantages .. (not that we use any jsp, we only use velocity)
18:45.53pfnthat isn't being "normal"
18:46.06pfnallowing jsp as an endpoint has been a bad practice since the beginning of time
18:46.10kervelpfn well i mean the less "magic" the better
18:46.45kervelbut i should not have mentioned jsp's maybe :)
18:47.50kervelbtw, this "we need tidy urls" hype is creating much headache for us .. especially when we have mixed-platform projects (eg wordpress + java cms)
18:53.41*** join/#tomcat FayAtWork (n=fayola@TOROON48-1177990946.sdsl.bell.ca)
18:55.11pfnrepresentative urls are great
18:55.25pfnurls that expose inner workings, such as ending in technology extensions are not
19:04.52*** join/#tomcat yassine (n=yassine@unaffiliated/yassine)
19:15.25*** join/#tomcat kjkoster5489 (n=kjkoster@kjkoster.org)
19:16.45*** join/#tomcat Guest98829 (n=opera@h55eb1f23.selukra.dyn.perspektivbredband.net)
19:16.52Guest98829Hi folks!
19:17.01kjkoster5489hi
19:17.21Guest98829Can someone please help me set up Apache httpd server to serve my static content only.. ?
19:17.58Guest98829I have heard terms like Mod/JK or MOD-AJP and virtual hosts, proxy and etc
19:18.16kjkoster5489Dor httpd, check #apache.
19:21.00Guest98829they sent me here :P
19:21.29pfnwhy do you want to setup httpd to serve static content only
19:23.12Guest98829because I am using a different server from my application and it is performing bad with the images.. pictures gets stuck sometimes and never loads
19:23.38pfnso copy the static content into your httpd directory
19:23.43pfnand if you're using httpd to proxy
19:23.52pfndon't proxy the content by specifying the appropriate directives
19:24.01pfnif you're using tomcat directly
19:24.01Guest98829slow down please :)
19:24.07pfnwell, you shouldn't need to put a proxy in front
19:24.17pfnif you're getting slow performance on static content, it is another problem
19:24.19pfnand httpd won't solve it
19:24.25Guest98829yes.. I have the static content some where else.. in a different drive
19:25.22Guest98829what do you think could be the cause to the bad performance then ? I have a router in between.. is it possible the router is causing this ? these errors seems to happen on higher user load
19:25.37Guest98829and I am using Jetty and not Tomcat :O
19:26.09*** join/#tomcat oxi (n=oxi@dyn.144-85-174-230.dsl.vtx.ch)
19:27.31pfndetermine why it's hanging
19:27.35pfnperhaps you're running out of threads
19:32.22Guest98829no.. its not hanging.. its just the pictures that don't want to load
19:32.54pfn"don't want to load"
19:32.57pfnthat means hanging to me
19:33.04*** join/#tomcat dvayanu (n=another@ppp-93-104-53-79.dynamic.mnet-online.de)
19:46.28Guest98829ook.. but the code stuff still wokrs
19:47.05Guest98829how do I assign more threads then?
19:49.18pfnask #jetty
19:50.45Guest98829hmm.. yeah.. very dead thougg :(
19:51.10*** join/#tomcat oxi (n=oxi@dyn.144-85-174-230.dsl.vtx.ch)
19:51.45*** join/#tomcat oxi (n=oxi@dyn.144-85-174-230.dsl.vtx.ch)
19:56.10*** part/#tomcat randrewj (n=raj-user@user-160uub9.cable.mindspring.com)
19:59.09Guest98829pfn: I don't think its a thread thing.. I rarely hit threads more than like 35 and lowest I get is around 30 (jConsole)
19:59.35pfnshrugs
19:59.43pfnI've never heard of any performance issue with static content on jetty
20:00.25Guest98829ok.. could it be that maxIdle or something in that area ? or is that just for the DB ?
20:01.02Guest98829at least the image should load, but it just hangs.. is could be some connection pool blocking it, or putting it on wait
20:01.44pfnhow are you serving the image
20:02.00Guest98829from the filesystem
20:02.10pfnusing jetty's default handler?  your own?
20:03.07Guest98829not sure .. I am using a plugin, which allows you to serve images outside your app folder.. on some other drive.. this could be a candidate to the problems
20:03.20Guest98829the router could be too.. not sure..
20:04.15Guest98829is there any safe port that is widely accepted other than port 80 ? I could run apache on that, and let my images point to that one.. good strategy?
20:04.41pfnthat's pretty crappy
20:05.22Guest98829hehe
20:10.48jasonbkervel: You're welcome.  UrlRewriteFilter is much like mod_rewrite for Tomcat, but sometimes that's a good solution (for unifying lots of already-implemented stuff under a new set of URI mappings, for example).
20:20.53*** join/#tomcat benn_d (n=benn_d@c-67-176-147-20.hsd1.in.comcast.net)
20:33.08Guest98829jasonb: You talkin' to me?
20:34.54jasonbGuest98829: Not really.  :)
20:39.55*** join/#tomcat Blippo_ (n=blippo@c83-255-3-72.bredband.comhem.se)
20:43.34*** join/#tomcat relachs (n=relachs@e176248099.adsl.alicedsl.de)
20:46.54*** part/#tomcat benn_d (n=benn_d@c-67-176-147-20.hsd1.in.comcast.net)
20:50.54dvayanuhi jasonb
20:51.23jasonbhi dvayanu!
20:51.36dvayanuhows life
20:51.46jasonbThings are good.
20:52.10dvayanubtw, do you use ivy?
20:54.45jasonbSorry, got interrupted..  I don't use ivy yet, because so far I don't feel I need it.
20:54.49*** join/#tomcat mib_w4vhly (i=9741bcde@gateway/web/ajax/mibbit.com/x-7ee7f8e07f6b2c11)
20:54.54*** part/#tomcat mib_w4vhly (i=9741bcde@gateway/web/ajax/mibbit.com/x-7ee7f8e07f6b2c11)
20:55.12dvayanu<PROTECTED>
20:55.14dvayanujust great
20:55.15dvayanu:-)
20:55.19jasonbBut, also, if I already knew how to use ivy (I don't), then I might hook it into my builds to just have that stuff taken care of for me.
20:55.52jasonbThe disadvantage is: in order to build something you *must* be connected to the net.  Now, mostly we're all connected to the net these days.   :)
20:56.05dvayanuerr, no, you dont
20:56.13jasonbno?
20:56.23dvayanui'm using ivy primary to manage dependencies in own projects
20:56.29jasonbAhh.  Okay.
20:56.45jasonbI thought it was only for managing other OSS "third-party" kinds of components.
20:56.58dvayanuno, i'd rather not use this feature
20:57.04jasonbThen maybe ivy is a decent replacement for a bunch of my own ant code.
20:57.30jasonbI tend to use a combination of my own ant code plus ant4eclipse to perform dependency resolution.
20:57.42dvayanui dont know ant4eclipse
20:57.52dvayanubut with ivy you can setup multiple cascading repositories
20:58.08dvayanuprivate - shared - public (add more)
20:58.14jasonbant4eclipse is great.  Very small and compact, and works excellently for declaring dependencies and having the dependencies ordered.
20:58.39jasonbHmm, ivy might be a better implementation, though I'm guessing it's larger than ant4eclipse.
20:58.54dvayanuwell, you add a jar
20:59.02jasonbAlso, ant4eclipse integrates with eclipse .project and .classpath files.
20:59.03dvayanuand two xml files
20:59.21jasonbSo, each project can be an eclipse project, and ant4eclipse can hand the build dependency list to ant.
20:59.30dvayanui see
20:59.31jasonbSo, you can have both ant and eclipse, and it all works together nicely.
20:59.44dvayanuit also works with ivy
20:59.49jasonbWhat does?
20:59.55dvayanuwithout even eclipse knowning anythng about it
20:59.58dvayanueclipse with ivy
21:00.08jasonbivy reads eclipse .project and .classpath files?
21:00.10yassinewonders: an other maven clone is making some noise here
21:00.21dvayanuno it doesn't
21:00.28dvayanubut since you have a build.xml anyway
21:00.30dvayanu:-)
21:00.31jasonbyassine: Does maven now read eclipse .project and .classpath files?
21:00.42dvayanumy project build.xml consists of exactly 1 line
21:00.44jasonbdvayanu: I don't think I understand.
21:01.02yassinejasonb, it does creates them since ages
21:01.05dvayanu<project name="ano-net" default="dist" basedir=".">
21:01.06dvayanu<import file="../build/basic-project.xml"/>
21:01.08jasonbdvayanu: If the developers on the team *only* want to track/maintain build dependencies in eclipse, then ivy won't work, right?
21:01.20jasonbyassine: creates them or reads them?
21:01.22dvayanujasonb: probably not
21:01.39yassinejasonb, creates *
21:01.44kjkoster5489jasonb: Most teams I've been in have a mix of dev tools.
21:01.46dvayanubut it works nice with ant and therefore with hudson
21:01.54kjkoster5489Eclipse/Netbeans/InteliJ
21:02.02jasonbyassine: So if I already have my .project and .classpath files for my projects, then maven can't just read those?  That would be very bad.
21:02.17dvayanumaven isn't compatible with eclipse
21:02.26jasonbdvayanu: ant4eclipse works great with both eclipse and ant, bridging the gap seamlessly.
21:02.46dvayanujasonb: well, what does it do other than running an ant task from eclipse?
21:02.48yassinejasonb, maven assumes its the master over dependencies of your projekt
21:03.09yassinethat's why its repositories are well organized to support that
21:03.31dvayanuah i see
21:03.42dvayanuhmm, it seems like a philosophy question
21:03.59yassineits even very organized that even some "free style tools"  from france is now considering using it for doing the same for ant :)
21:04.00dvayanui think ant4eclipse is for people who think eclipse-centric
21:04.04jasonbdvayanu: What I'm referring to is a jar that implements ant tasks that one can use from an ant build file to generate an ordered build dependency list so ant can build the whole graph of projects in the right order, not missing any dependencies.  So, then ant ends up just reading eclipse project files instead of having to have two sets of project dependency files.
21:04.33*** join/#tomcat benn_d (n=benn_d@c-67-176-147-20.hsd1.in.comcast.net)
21:04.53dvayanuthis just delays the problem
21:05.11benn_dso, i'm getting an error when trying to deploy a war that there's not META-INF/MANIFEST.MF (No such file or directory)
21:05.17jasonbyassine: Yeah, I don't like that maven assumption because it is a bad assumption.  Developers want to use eclipse (do not ask me why!) and so they will always just manage all the build dependencies inside eclipse only.  Then, when you want to build via ant, ant has to read the eclipse project files, period.
21:05.27benn_di just decompressed the file myself and it is there
21:06.03dvayanujasonb: how are you upgrading the log4j version in all own projects?
21:06.59jasonbdvayanu: We only upgrade jars when we have to, really.. but if we want to, we have to figure out which version will work with the other jars we have, so we have to try some versions "by hand".. we just replace the jar or jars, and rebuild and then put it through some QA.
21:07.18dvayanujasonb: thats where ivy helps nicely
21:07.25dvayanuit only shows you what depends on what
21:07.34jasonbdvayanu: But, replacing the jar does mean that whoever does that goes into eclipse and changes the build dependencies.. again, that's saved in the .classpath file.
21:07.34dvayanuand whether you have circular dependencies
21:07.41dvayanuwhich is a nightmare
21:07.59jasonbdvayanu: How would ivy know which version of log4j our webapp depends on?
21:08.04dvayanuno, in ivy case it just means copying a new version into the repository
21:08.24dvayanujasonb: you have a ivy.xml file where it is written
21:08.29yassinejasonb, ant would's be able to read those files if they were not standarized and mvn is doing the same for build processes ( mvn even encourages eclipse usage its not interfering with it at any point) but it keeps what it can do best in its hand (dependency management)
21:08.31jasonbcircular dependencies are bad, yes.  ant4eclipse finds those though.
21:08.34dvayanuusually you just say something like "stable" or "latest"
21:08.44dvayanuand replace the jar under this label
21:09.00dvayanubut you can tag your repository (in svn) so you can retrieve an old version
21:09.04dvayanufor an old build for example
21:10.03jasonbyassine: My point is that the developers flatly refuse to maintain build dependencies anywhere but in eclipse, and nobody where I work would accept having *two* sets of build dependency information stored in two separate places and having to maintain both.
21:10.38yassinejasonb, im not a mvn fanatic nor am i an ivy fan i use both i only want to make clear that mvn is the pioneer in this area
21:10.40dvayanuwell thats probably true for "small" teams
21:11.04dvayanuas soon as you start using CI you need a dependency maintainer outside of eclipse
21:11.11jasonbyassine: Even if it is (it might be), developers still refuse to use it in favor of using eclipse instead.
21:11.11yassinejasonb, you can still use eclipse do manage your deps m2eclipse is doing so even with a wizard ...
21:11.25jasonbdvayanu: CI?
21:11.32dvayanucontinuous integration
21:11.47dvayanubut seriously, i would never want to maintain dependencies in eclipse
21:11.53dvayanui just everything in lib into .classpath
21:12.05dvayanui dont care who puts it in there :-)
21:12.07jasonbdvayanu: Okay, and ant4eclipse is a dependency maintainer outside of eclipse, and can just read the eclipse project files to do its work.
21:12.37dvayanubut eclipse is really bad at maintaining dependencies
21:12.56dvayanuit doesn't see a dependency between code and artifact
21:13.06dvayanuso if you have xyz.jar and xyz project
21:13.16dvayanuand you make a search for references in xyz project
21:13.19jasonbdvayanu: Our software has a more complicated graph, apparently, and we really can easily track/maintain dependencies in eclipse.. also in my previous job, where we had a much larger project graph, we did that, with ant4eclipse, and it all worked extremely well.
21:13.37jasonbdvayanu: There's that 'artifact' word again..  :)
21:13.45dvayanuit won't show anything in foo project if foo project uses xyz.jar and not xyz project
21:14.03*** part/#tomcat benn_d (n=benn_d@c-67-176-147-20.hsd1.in.comcast.net)
21:14.12jasonbdvayanu: Yes, project boundaries have a meaning.
21:14.42dvayanujasonb: and how do you ensure that the proper jar lands in tomcat?
21:14.53yassinejasonb, no doubt both approaches works if one know how to brings them to, but for those who do not want to spend the time on dependency management and instead use the time to solve problem there is maven :)
21:14.55jasonbyassine: Is m2eclipse a way for maven to read eclipse project files?
21:15.14yassinejasonb, its an eclipse plugin
21:15.17jasonbdvayanu: In WEB-INF/lib?
21:15.40jasonbyassine: Does that replicate eclipse build dependency information into other files that maven can read?
21:15.57jasonbyassine: It would need to automatically keep that up to date to be as good as ant4eclipse.
21:15.59dvayanubut how you ensure that if you added a class into xyz project the xyz.jar is also built?
21:16.07yassineits can even export your project into an ant based system
21:17.08jasonbdvayanu: The ant file loops through the ordered dep list from ant4eclipse, and ensures that each of those projects are fully built from source, one at a time.
21:18.21jasonbyassine: The problem I've seen with many of the "converter to ant" type tools is: it writes really horrible ant XML that is not human readable nor human modifiable.  So, if there is a problem with it, you spend lots of time tearing your hair out.
21:18.43dvayanujasonb: so each time you say ant.build it resolve all dependencies?
21:18.52dvayanuresolves
21:21.06dvayanuhttp://ant4eclipse.sourceforge.net/ant-for-eclipse-example.html <-- this example file looks so terrible unreadable :-)
21:21.17dvayanuyou want to see my build.file ?
21:21.24jasonbdvayanu: ant build.  Yes, or just "ant" if the default target is "build".  It would, right there, generate the ordered dependency list from the eclipse project file set for all eclipse projects, and then ant would loop through the ordered list and build the projects in that order.. done.
21:21.41jasonbdvayanu: I didn't say to use any of their example build files.  :)
21:21.53jasonbdvayanu: I said their tasks do what I've described.
21:22.03dvayanuhttp://www.pastebin.ca/1407839
21:23.10dvayanuand this is the ivy file for the same project
21:23.10dvayanuhttp://www.pastebin.ca/1407841
21:24.17dvayanuthe above build file checks out the project, build it, runs all junit tests, runs checkstyle, publishesh the results in nightly builds, generates javadocs and publishes them and publishes artifacts (yes jars.-)
21:25.32pfnwhere was that ant visualizer
21:25.35pfnthat looked very cool
21:25.40jasonbIf nobody I worked with wanted to use eclipse, I could get away with not integrating with eclipse.  That's not the case though.
21:26.02jasonbpfn: There was a dbviz thing for ant I think.
21:26.39*** join/#tomcat trifon (n=chatzill@78.90.231.138)
21:26.47pfnit was pretty cool, conceptually, takes all the ant tasks and runs it through a virtual sandbox
21:27.07pfnand you can step through and see what it does and what your files look like at a point in time
21:27.21jasonbhmm, that's a different one than I've seen then.
21:28.03dvayanujasonb: do you deploy with ant too?
21:28.56jasonbdvayanu: My ant build files generate RPM packages, which get installed.
21:29.11dvayanuah i see
21:29.13dvayanubtw,
21:29.20jasonbdvayanu: For our webapp itself, that's not an RPM package yet.. and that's deployed as an unpacked webapp dir.
21:29.23dvayanuhow do you rebuild a customer version?
21:29.37dvayanuif a customer reports a bug with version 1.5.16
21:29.40jasonbWe have customer skins.. the webapp itself supports skinning.
21:29.58dvayanui assume different customers have different deployed versions
21:30.36jasonbThey do.
21:30.42*** join/#tomcat acidjnk (n=have@pD950A52E.dip0.t-ipconnect.de)
21:30.48dvayanuand can you rebuild a version?
21:30.53dvayanufor a bugfix or something
21:33.34jasonbWe upgrade the sites when we need to in order to fix some bugs.  When we do that, we hope to upgrade the customer to the latest stable release that has the fix in it.  So, we just rebuild that tag, and deploy it.
21:34.03dvayanuthat sounds harsh, but you basically can't rebuild a version :-)
21:34.32jasonbI can rebuild any version (svn revision) I want.  But, upgrading a production site with an unstable rev is a bad idea.
21:35.10dvayanubut how do you know which version used which jar?
21:35.30pfncheck them in
21:36.12jasonbYeah, subversion knows.
21:37.13dvayanuand you are sure that all subprojects are updated and use the same versions? you branch/tag your complete subversion for each release?
21:38.18jasonbdvayanu: In subversion, branches and tags are "cheap".. it is very easy to branch or tag the entire repository, and that uses only a handful of bytes of storage on the svn server.  This is general svn best practices stuff.
21:39.25jasonbdvayanu: As for keeping things svn updated.. if one is building the software to deploy it (think "official build") then it is certainly expected that their svn working copy is all from one svn rev.  Doing this is one command, really, and svn takes care of the rest.
21:40.02dvayanuhow many projects do you actually have?
21:40.05dvayanuin your svn
21:40.18jasonbAt my last job we had around 30.
21:40.35jasonbWhere I currently work, we only have a few.. so the problem is small.
21:40.41dvayanuso you update to a new log4j version in 30 projects?
21:40.41jasonbI'm used to having >30.
21:41.16jasonbWhat sense would it make to have 30 copies of log4j?
21:41.26dvayanulog4j is just an example
21:42.02dvayanudo you link them to projects via external jars?
21:42.17jasonbI think you're wrestling with the difference between "component" and "eclipse project", which aren't necessarily one and the same thing.
21:44.06dvayanutell me the difference :-)
21:45.21jasonbeclipse project = a buildable eclipse project unit that is the smallest unit of code that eclipse allows specifying build path and things like that.. and each eclipse project may in turn depend on other eclipse projects.
21:46.09jasonbBut, 1 eclipse project is not necessarily built as a discrete runnable software "component" (for lack of a better term).  It *can*, but instead it might just be part of a runnable component.
21:46.21jasonbOne component might be made up of 5 eclipse projects.
21:46.26dvayanuyes
21:46.30jasonbOr, one component might just be one eclipse project.
21:46.35dvayanubut each project has at least one deliverably
21:46.38dvayanudeliverable
21:46.43dvayanua jar, a war, something
21:47.06jasonbYes.. which itself may not be a complete runnable component.
21:48.41dvayanuthis is what they actually call 'artifact'
21:48.43dvayanu:-)
21:48.59jasonbTo me, that's the same thing as calling it a "thing".  :)
21:49.15jasonbIt's just not very meaningful.
21:49.18dvayanuso the XYZ project generates the xyz.jar
21:49.40dvayanuand the MyWebAppProject relies on xyz.jar
21:51.32dvayanuok sofar?
21:55.32jasonbSure.
22:05.19*** join/#tomcat oxi (n=oxi@dyn.144-85-174-230.dsl.vtx.ch)
22:05.20dvayanunow imagine you have three deployed versions
22:05.26dvayanumywebapp 1,2,3
22:05.32dvayanuwhich relies on xyz 1,2,3
22:06.01dvayanuand there is a bug in xyz
22:06.02jasonbYes, so when you pull svn rev 123, you get all that.
22:06.19dvayanuyou have to test it against all three possible releases?
22:06.32dvayanuso you have to branch from 1, 2 and 3
22:06.47dvayanuapply the bugfix
22:06.52dvayanurebuild everything
22:06.54dvayanuand test it
22:07.02jasonbNo, you make a svn rev 124 that contains the fix, and then QA rev 124 (as one piece), and then upgrade all of the customers who need/want the fix.
22:07.20dvayanuyou mean version 4
22:07.28dvayanusince 1, 2 and 3 are 3 independent versions
22:07.33jasonbThe set of (XYZ, MyWebAppProject) = one component.. a webapp.
22:07.52jasonbNo, they can't be independent versions from the standpoint of QA.
22:08.00dvayanuwhy not?
22:08.08dvayanujanuar, februar and march versions
22:08.21jasonbIf they must be independent versions, then you have a QA version test matrix.. you can't just test one build.
22:08.41jasonbSo, it's far more work to have them be independent vesions.
22:08.44jasonbversions.
22:08.48dvayanustop
22:08.54dvayanuyou do in fact have independent versions
22:09.19dvayanubecause if you deploy three different versions to three different customers, than you do have 3 versions
22:09.38jasonbThree versions of the whole build though.
22:09.41dvayanuyes
22:09.59*** part/#tomcat Guest98829 (n=opera@h55eb1f23.selukra.dyn.perspektivbredband.net)
22:10.02jasonbAbove, I might have been confused by your use of the comma character.
22:10.09*** join/#tomcat barkbarkmeow (n=barkbark@f053157200.adsl.alicedsl.de)
22:10.24dvayanuso if you have a bugfix in a component you have to test it against all versions which are at customers sites
22:10.55jasonbYou're talking about doing partial upgrades.. we don't do that much.. because that's not stable.
22:11.11dvayanuwhat if you can't make a full upgrade
22:11.19dvayanubecause of another dependency
22:11.28dvayanuif a customer has a db which isn't anymore supported
22:11.32dvayanuor a plugin
22:11.33jasonbThen you have to have each component independently versioned, and then you have a matrix of QA tests.
22:11.42jasonbTesting becomes *huge*.
22:11.45dvayanuright
22:11.49jasonbheads to a meeting.
22:11.50dvayanubut the irony
22:11.58dvayanuis that in reality you only have one version
22:12.05dvayanuof the underlying component
22:12.31dvayanuhave fun
22:49.01*** join/#tomcat oxi (n=oxi@dyn.83-228-207-202.dsl.vtx.ch)
23:28.06yassinenight guys
23:39.54*** join/#tomcat oxi (n=oxi@dyn.83-228-163-082.dsl.vtx.ch)

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