IRC Chat : 2009-01-20 - OpenMRS

01:41:58 *** atomicturtle has joined #openmrs
02:40:34 *** upul has joined #openmrs
08:32:25 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [6650]: 1000patients: addressed the seven programming tasks outlined in the latest … <http://dev.openmrs.org/changeset/6650>
09:35:16 *** nzeyi has joined #openmrs
09:39:02 *** nzeyi has quit IRC
11:35:30 *** upul has quit IRC
12:46:44 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1223 (task created): Use JRE5 as a Bundled JVM to Start Installer <http://dev.openmrs.org/ticket/1223>
12:48:09 *** james_regen has joined #openmrs
12:48:09 *** ChanServ sets mode: +v james_regen
13:00:24 *** bwolfe has joined #openmrs
13:00:30 *** ChanServ sets mode: +o bwolfe
13:02:06 <Echidna> hey bwolfe, i have a request!
13:02:19 <bwolfe> ok
13:02:25 <Echidna> i'd like to see jfreechart and jcommon updated to the latest versions in trunk
13:02:33 <Echidna> so my module doesnt have to include them
13:02:45 <bwolfe> seems reasonable
13:03:07 <bwolfe> create a ticket, state your case, list off the changes that might effect other people, then attach a patch. :-)
13:03:08 <Echidna> the charts portlet will have to be complemented by one line though
13:03:18 <Echidna> because new versions have a dark grey background by default
13:03:23 <Echidna> need to make it white explicitly
13:03:37 <Echidna> ok
13:03:45 <bwolfe> ok
13:03:49 <Echidna> how do i attach a patch for jars?
13:03:57 <bwolfe> if thats all the more the changes are, then it shouldn't be too much of an issue
13:05:53 <bwolfe> I think you'll just have to attach the binaries next to the patch
13:06:08 <bwolfe> because the patching system only deals with text :-/
13:06:20 <Echidna> ok
13:06:45 <Echidna> i'd also like to see the graph servlet replaced with mine
13:06:49 <Echidna> sometime
13:18:33 <Echidna> bwolfe: do i have to include the build path changes in the patch too?
13:18:39 <Echidna> because the jar filenames are different
13:20:42 <bwolfe> yeah, include everything you change Echidna. .classpath, lib/lib.properties, buid.xml, etc
13:20:56 <Echidna> i didnt change build.xml
13:21:05 <Echidna> only added it to classpath via eclipse
13:22:24 <Echidna> ah i didnt have to anyway, unless i change the jfreechart subdir
13:22:27 <Echidna> which i didnt have to
13:38:54 *** bmckown has joined #openmrs
13:38:54 *** ChanServ sets mode: +o bmckown
13:48:18 <Echidna> bwolfe: http://dev.openmrs.org/ticket/1224
13:48:52 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [6652]: -- chica * added privilege checking and edited some html <http://dev.openmrs.org/changeset/6652> || OpenMRS Tickets: Ticket #1224 (task created): Update JFreeChart in trunk to latest version <http://dev.openmrs.org/ticket/1224> || OpenMRS Changesets: Changeset [6651]: -- sockethl7listener * changed createUserForProvider to not save null in … <http://dev.openmrs.org/changeset/6651>
14:06:12 *** nribeka has joined #openmrs
14:14:51 *** nribeka1 has joined #openmrs
14:20:56 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #368 (defect closed): Program names should be unique <http://dev.openmrs.org/ticket/368#comment:6> || OpenMRS Changesets: Changeset [6654]: Adding logic to validator to not allow duplicate program names - … <http://dev.openmrs.org/changeset/6654> || OpenMRS Changesets: Changeset [6653]: -- chica * moved READONLY style to style sheet <http://dev.openmrs.org/changeset/6653>
14:28:58 <Echidna> bwolfe: how do i search for files in eclipse again?
14:29:37 <bwolfe> control-h
14:29:46 <bwolfe> or control-shift-t ?
14:29:50 <bwolfe> or control-shift-r ?
14:33:39 *** nribeka has quit IRC
14:42:25 <bwolfe> nribeka1: any more luck with hibernate ?
14:43:07 <nribeka1> bwolfe, no
14:43:08 <nribeka1> :(
14:43:27 <nribeka1> been tracing for 2 days but nothing come up
14:47:02 <nribeka1> bwolfe, the user / patient patch is doing the entity comparison based on the subclass right? instead of superclass like the original implementation of hibernate?
14:47:41 <bwolfe> right
14:48:23 <bwolfe> nribeka1: basically what you need to figure out is why that conceptname test is failing
14:48:29 <bwolfe> or is it conceptnumeric?
14:48:38 <nribeka1> concept numeric
14:48:48 <bwolfe> why, with the old hibernate, is it not keeping the old concept name ?
14:49:08 <nribeka1> yes, the old hibernate didn't retain the old concept name
14:49:09 <bwolfe> because to me, the way it is working with your patched version looks like the correct way to do it!
14:49:43 <nribeka1> when i debug the original hibernate, it only load the new one
14:50:01 <bwolfe> I am thinking maybe it is a hibernate caching thing. where before, it matched to the cache and so returned that one...whereas now, it does not match to the cache, and so it pulls a new one from the db (which has two names)
14:51:31 <nribeka1> is it because the entity key comparison it didn't match to the cache?
14:54:42 <Echidna> bwolfe: conceptstats uses pie charts, i dont tihnk they have a background color
14:54:52 <Echidna> plus, i dont see any charts for any of my concepts
14:59:03 <bwolfe> Echidna: you have to have obs that use those concepts to be able to see a chart
14:59:14 <bwolfe> Echidna: the concepts have to be of type coded or numeric
14:59:36 <bwolfe> nribeka1: the cache uses .equals and/or .hashcode to do the comparison
15:00:35 <nribeka1> all the assert pass except for the get name
15:06:08 <bwolfe> nribeka1: right
15:06:24 <bwolfe> wait, so if you take out that get name assert, that test passes nribeka1 ?
15:06:42 <nribeka1> yes
15:06:57 <nribeka1> all pass if i take out that one assert
15:07:12 <Echidna> bwolfe: yes both true
15:07:15 <Echidna> i just get a number of obs
15:08:34 <bwolfe> what do you mean you get a number of obs Echidna ?
15:08:41 <bwolfe> nribeka1: hmm, very interesting
15:08:54 <bwolfe> nribeka1: see if you can fix the patch to work with the names correctly
15:09:13 <bwolfe> nribeka1: it might be a matter of making sure the new name is marked as preferred after adding it
15:09:52 <nribeka1> for the test, the first name has "prefered" tag on it
15:09:57 <nribeka1> the new one don't have
15:10:06 <nribeka1> that's why it will return the first one
15:11:10 <Echidna> actually i dont
15:11:23 <Echidna> i get number of obs = 0, even though that's not true for that concept
15:12:51 <bwolfe> Echidna: hmm, so stats are broken then ?
15:13:25 <bwolfe> nribeka1: so is there a Concept.addPreferredName() method or something that should be called earlier in that test instead ?
15:14:14 <nribeka1> the first name is initialize using the xml bwolfe
15:14:42 <bwolfe> I was referring to the one that wasn't done by xml :-)
15:15:17 <nribeka1> no
15:15:53 <nribeka1> there's no addPreferredName call
15:16:31 <nribeka1> just addName bwolfe
15:23:05 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1225 (defect created): ServerVM is added even if JRE Windows installer fails <http://dev.openmrs.org/ticket/1225>
15:25:05 <Echidna> bwolfe: is that enough reason to ignore stats for now and update those jars? =P
15:25:35 <Echidna> that custom background method is applied on a ChartFactory, which only a few servlets use
15:25:39 <Echidna> pie chart one doesnt
15:25:44 <bwolfe> probably. can you add a comment to the ticket for completeness ? :-)
15:30:37 <Echidna> ok i did i guess
15:49:41 <nribeka1> bwolfe, i think you're right
15:55:28 <nribeka1> the cache miss
15:56:58 <bwolfe> nribeka1: it misses with yours but hits with the old jar ?
15:57:08 <bwolfe> nribeka1: does the cache ever hit with the new jar ? ;-)
15:57:42 <nribeka1> following the trails now
15:57:52 <nribeka1> side by side debugging :P
15:58:21 <nribeka1> always miss with the new jar
15:58:59 <nribeka1> bwolfe, the cache always miss with the new jar. so it will always query the database
15:59:21 <bwolfe> nribeka1: for every object ?
15:59:32 <bwolfe> or just in that test ?
16:00:19 <nribeka1> ooo i'm just checking the concept
16:00:47 <nribeka1> lemme check with the next concept object
16:10:03 <nribeka1> bwolfe, in the shouldSaveConceptNumeric, there 3 concept object being manipulated
16:10:17 <nribeka1> the first one --> ConceptNumeric --> cache miss
16:10:30 <nribeka1> 2nd one --> Concept --> cache hit
16:10:45 <nribeka1> 3rd one --> ConceptNumeric --> cache miss
16:11:07 <nribeka1> so, i think it will be the same for subclass object
16:11:35 <bwolfe> nribeka1: thats what happens with old jar ?
16:11:50 <nribeka1> old jar all hit
16:11:55 <bwolfe> ok
16:11:58 <bwolfe> so that makes sense then
16:12:18 <bwolfe> you changed it so that if its a subclass it won't hit on parent class...
16:12:27 <bwolfe> which is exactly what we want for person/user/patient
16:12:37 <nribeka1> yes
16:12:40 <bwolfe> so we have to expect it for concept/conceptnumeric/conceptcomplex
16:15:23 <nribeka1> so, it's going to be conflicting fix then bwolfe?
16:17:01 <bwolfe> nribeka1: no, it means the test has been relying on that hibernate bug
16:17:12 <bwolfe> nribeka1: so you just fix the test so that it works correctly with our correctly hibernate
16:17:31 <nribeka1> it's hibernate bug?
16:19:18 <bwolfe> nribeka1: what you are fixing I consider to be a hibernate bug, yes
16:19:47 <nribeka1> so, i just need to update the test then?
16:19:54 <nribeka1> woohoo ... finally some light :D
16:20:05 <nribeka1> i can see the end of the tunnel
16:23:13 <nribeka1> only one concept name that can has preferred name right bwolfe?
16:23:39 <bwolfe> nribeka1: I think so
16:23:43 <bwolfe> I don't remember exactly
16:27:15 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [6657]: -- chica * changed PSF rescan to rescan question answers * changed scan … <http://dev.openmrs.org/changeset/6657> || OpenMRS Tickets: Ticket #842 (task closed): List of drugs cannot show voided drugs <http://dev.openmrs.org/ticket/842#comment:6> || OpenMRS Changesets: Changeset [6656]: Moved logic in initialization filter so the runtime properties file isn't … <http://dev.openmrs.org/changeset/6656> || OpenMRS Changesets: Changeset [6655]: Added ability to see and (un)retire concept drugs - #842 Author: … <http://dev.openmrs.org/changeset/6655>
16:37:51 <Echidna> bwolfe: http://rafb.net/p/TLah2X92.html
16:37:59 <Echidna> why would i get a nullpointerexception on line 2
16:39:07 <bwolfe> if e is null
16:39:19 <Echidna> well
16:39:19 <bwolfe> because you won't get to line 2 if encounters is null
16:39:32 <Echidna> lemme show you the full thing
16:39:36 <Echidna> i simplified it a bit here
16:39:45 <bwolfe> or if e.equals() or e.hashcode() throws an NPE somehow
16:40:00 <bwolfe> or e.compareTo, depending on the list type I suppose
16:40:01 <Echidna> http://rafb.net/p/klMoXM14.html
16:40:03 <Echidna> damn your tabs lol
16:40:41 <Echidna> the e.getParentEncounters != null check, some encounters pass that check and get to the line with the remove
16:40:43 <Echidna> and crash there
16:40:50 <Echidna> so e is not null i guess
16:42:48 <bwolfe> Echidna: which line is throwing the npe ?
16:43:04 <Echidna> the encounters.remove(e); one
16:43:22 <Echidna> if i comment it out and replace with a ; it doesnt throw
16:43:33 <bwolfe> any other details ?
16:43:39 <bwolfe> where in java does it fail ?
16:44:05 <Echidna> i dont know, i get a cryptic portlet error ebcause its on the dashboard
16:44:32 <bwolfe> it should give you a stacktrace though..
16:45:06 <Echidna> http://rafb.net/p/98IKIH37.html
16:45:35 <Echidna> not much to see from there =/
16:47:41 <Echidna> i have insert="true" update="true" in my mapping
16:47:46 <Echidna> could one of these could be causing it
16:47:54 <bwolfe> ah yes, very cryptic indeed
16:47:56 <Echidna> i dont know anymore why i put them in
16:48:07 <Echidna> <many-to-one name="parentEncounter" class="org.openmrs.module.inpatientcare.Encounter" column="parent_encounter_id" insert="true" update="true" />
16:48:16 <bwolfe> Echidna: check your .hashcode(), .equals(), and toString() methods on your encounter object
16:48:25 <bwolfe> to see if its possible something there is causing it
16:48:51 <bwolfe> the next thing to do would be to set a break point on the remove(e) line and step through it until you find where it fails
16:49:00 <Echidna> i has no hashcode or equals hm
16:51:20 <bwolfe> then its delegating up to the super class encounter object
16:52:12 <Echidna> i added those methods and now i get a hibernate instantiation exception
16:59:15 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1187 (enhancement closed): Make the War File Setup Wizard Better <http://dev.openmrs.org/ticket/1187#comment:7> || OpenMRS Changesets: Changeset [6658]: Cleaned up the initial setup wizard interface to be a lot more user … <http://dev.openmrs.org/changeset/6658>
17:09:26 <Echidna> bwolfe: i put that piece of code into a different controller, and i get a java.util.ConcurrentModificationException
17:09:37 <Echidna> but this time on the line for(Encounter e : encounters)
17:16:27 <Echidna> ok i'll look tomorrow, gtg home =/
17:16:28 <Echidna> baoi
17:16:29 <Echidna> -o
17:17:41 *** nribeka has joined #openmrs
17:17:48 *** atomicturtle has left #openmrs
17:34:39 *** nribeka1 has quit IRC
18:03:24 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1224 (task closed): Update JFreeChart in trunk to latest version <http://dev.openmrs.org/ticket/1224#comment:3> || OpenMRS Changesets: Changeset [6659]: Upgraded the included jfreechart libraries - #1224 Author: Keelhaul <http://dev.openmrs.org/changeset/6659>
18:06:46 *** nribeka has quit IRC
18:15:58 *** bmckown has quit IRC
18:30:49 *** bmckown has joined #openmrs
18:30:49 *** ChanServ sets mode: +o bmckown
18:39:30 *** nribeka has joined #openmrs
18:47:18 <nribeka> bwolfe, so hibernate always cache it first?
18:47:37 <bwolfe> basic`: quick request. can you change line 47 in our dev.openmrs.org.conf file to redirect to http://modules.openmrs.org ?
18:47:48 <bwolfe> basic`: (I don't seem to have edit privileges, which is fine)
18:47:57 <bwolfe> nribeka: what do you mean ?
18:49:05 <nribeka> apparently: assertEquals(20.0, firstConceptNumeric.getHiAbsolute().doubleValue(), 0); --> also fail
18:49:38 <nribeka> when i print the table (concept_numeric), both using old hibernate and new hibernate, have the same content
18:50:26 <nribeka> so, i think the old hibernate got it from cache but the new hibernate miss the cache
18:51:44 <nribeka> any comments bwolfe?
18:52:32 <bwolfe> nribeka: which line is that ?
18:53:39 <nribeka> 134 ConceptServiceTest
18:54:16 <nribeka> apparently it didn't pass on new hibernate but works on old hibernate
19:07:27 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [6660]: -- chica * replaced chica setup.sql with a full installer <http://dev.openmrs.org/changeset/6660>
19:20:32 <bwolfe> nribeka: so what is the value if it is not 20 ?
19:20:50 <nribeka> NPE
19:21:26 <nribeka> firstConceptNumeric.getHiAbsolute() --> null so the doubleValue() becomes NPE
19:22:01 <nribeka> bwolfe, i got .NET developer interview lolz
19:22:43 <bwolfe> nribeka: heh. have you used .net before ?
19:22:47 <basic`> bwolfe: sure, we control those from cfengine, so any edits would get overwritten with the copy in cfengine
19:23:40 <bwolfe> basic`: ok, makes sense. can you fix the cfengine to make the https://dev.openmrs.org/modules/* redirect go to http://modules.openmrs.org/modules/* then? :-)
19:23:47 <bwolfe> (note the https vs http in that one)
19:24:03 <nribeka> bwolfe, not really a .net dev
19:24:26 <bwolfe> nribeka: so if hiAbsolute is null, that means something didn't get saved right, or its not fetching from the cache right, or something
19:24:31 <basic`> bwolfe: sure, give me just a minute
19:24:44 <bwolfe> nribeka: because the conceptId=1 object should have a hiAbsolute of 20 at that point
19:25:33 <nribeka> not getting from cache i think bwolfe. because after i do flush, it goes to the database
19:27:01 <bwolfe> nribeka: Ah! I see why. so hibernate is storing the value into the cache as a Concept...it pulls from the cache when you do requests before the flush
19:27:10 <bwolfe> but its trying to pull from the cache as a conceptnumeric now
19:27:13 <bwolfe> hmm
19:33:37 <bwolfe> basic`: while I have you, can you also change the occ.openmrs.org redirect to go to http://modules.openmrs.org/occ ?
19:34:18 <basic`> occ? do we handle that vhost?
19:35:32 <basic`> I don't see it in any of the apache configs on our end
19:37:57 <nribeka> it save to cache as ConceptNumeric and gets it from cache as ConceptNumeric. but when the cache miss, hibernate tries to get it from database and found the ConceptNumeric but the ConceptNumeric only have id and precise but not the other values.
19:48:29 <bwolfe> basic`: ok, then I'll have burke change it it the dns level. it used to go to dev.openmrs.org/occ, but now its on a diff subdomain obviously
19:49:06 <bwolfe> nribeka: why is there a cache miss? Shouldn't it find the one that is pending to be saved ? :-/
19:50:03 <nribeka> i think because we update the .equals and .hashcode
19:52:53 *** Echidna has quit IRC
19:53:45 <bwolfe> nribeka: but you said that a ConceptNumeric is stored in the cache, right ?
19:57:52 <nribeka> yes, i think it is ConceptNumeric because if I do flush the ConceptNumeric is stored to the database
19:59:05 <nribeka> after flush the content of concept_numeric table becomes http://pastebin.com/m12a438af
20:06:14 *** mib_f31jj1 has joined #openmrs
20:09:05 <basic`> bwolfe: you're getting occ.openmrs to point to us for a redirect?
20:09:32 <bwolfe> basic`: I thought it was...but I was wrong
20:09:44 <basic`> ah ok :)
20:09:56 <basic`> lemme know if you need me to change anything
20:10:07 <bwolfe> basic`: I thought it was pointed at you already at the registrar level, but it wasn't...so I set up the redirect on our openmrs.org server.
20:10:16 <basic`> excellent
20:10:26 <basic`> the new redirect for modules should be working now
20:10:26 *** Echidna has joined #openmrs
20:10:27 <bwolfe> basic`: did you get the modules one?
20:11:37 <basic`> bwolfe: yes, can you confirm it's working now?
20:12:12 <bwolfe> basic`: its hard to tell. the only reason I brought it up was because our url fetches from java were failing because the certificate didn't match
20:12:19 <bwolfe> but now I get a 302 error
20:12:48 <basic`> http://dev.openmrs.org/modules , that seems to work
20:12:50 <bwolfe> not sure if thats because of the modules.openmrs server or your redirect
20:13:10 <bwolfe> basic`: yeah, everything works (and did work) from a browser. its just java thats actually picky :-p
20:14:36 <basic`> hmm, my guess is that it's java related then, is there a specific way i need to be doing redirects for java to be happy?
20:14:44 <mib_f31jj1> bwolfe, why there is no flush after saveOrUpdate method call?
20:15:01 <mib_f31jj1> ups, my name is mib_f31jj1 lol
20:15:50 <bwolfe> basic`: did you change how you did the redirect on this one?
20:16:05 <basic`> no, just changed https->http
20:16:10 <bwolfe> basic`: it seemed to follow the redirect from https://dev.... to https://modules... just fine
20:16:14 <bwolfe> hmm, ok
20:16:41 *** mib_f31jj1 is now known as nribeka-classtim
20:17:15 *** nribeka-classtim is now known as nribeka-class
20:19:06 <bwolfe> basic`: testing something. can you set it back to the old https redirect ?
20:19:11 <basic`> bwolfe: sure
20:19:36 <bwolfe> nribeka: because the session isn't always done yet. flush() only happens at the end of the session
20:19:45 <basic`> bwolfe: okay, reloaded with https
20:20:41 <nribeka-class> i hope my explanation previously about the cache miss is correct enough bwolfe
20:21:36 <bwolfe> nribeka-class: did you see my comment two lines up ?
20:23:09 <nribeka-class> so to sum it up, i think the test fail because of cache miss when retrieving the ConceptNumeric, am I right bwolfe?
20:23:30 <bwolfe> nribeka-class: correct
20:24:54 <bwolfe> basic`: ok, so java isn't following the redirects properly :-/
20:25:25 <nribeka-class> and to fix it i just need to fix the test then? :P
20:26:46 <bwolfe> nribeka-class: I thought so earlier, 100%. however, now I'm not so surer
20:26:49 <bwolfe> *sure
20:26:57 <bwolfe> I'll have to see how you plan on fixing it
20:27:06 <bwolfe> because maybe I don't understand whats going on
20:31:50 <nribeka-class> another tunnel now and i can't see the light yet :(
20:32:27 <bwolfe> nribeka-class: fix the test and post the patch to the ticket
20:33:20 <nribeka-class> ok bwolfe.
20:39:12 <basic`> bwolfe: bummer... well, do you want me to leave these as https or http?
20:39:20 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [6661]: chica_module: Update instruction for Chica 2 <http://dev.openmrs.org/changeset/6661>
20:39:49 <bwolfe> basic`: you can leave as is for now, I can mess with the redirects on our end to try and fix it. thanks
20:40:46 <basic`> no problem
20:56:59 <nribeka-class> what does the phrase "code for cotton" means?
21:00:32 <bwolfe> no idea
21:00:38 <bwolfe> !define code for cotton
21:00:38 <OpenMRSBot> bwolfe: Error: "define" is not a valid command.
21:00:46 <bwolfe> !definition code for cotton
21:00:46 <OpenMRSBot> bwolfe: Error: "definition" is not a valid command.
21:00:55 <bwolfe> !google code for cotton
21:00:55 <OpenMRSBot> bwolfe: http://www.google.com/search?q=code for cotton
21:03:19 <nribeka-class> ah ic ic bwolfe :D
21:03:22 <nribeka-class> thank you
21:14:26 *** james_regen has quit IRC
21:40:51 <r0bby> !google code+for+cotton
21:40:51 <OpenMRSBot> r0bby: http://www.google.com/search?q=code+for+cotton
21:41:13 <r0bby> nribeka-class: you will code for a t-shirt over cash\
21:42:42 <nribeka-class> ah ic ic r0bby :D
21:43:57 <r0bby> looks like soc isn't in my future for awhile :'(
21:44:06 <r0bby> oh well.
21:44:16 <nribeka-class> why?
22:59:33 *** nribeka-class has quit IRC
23:15:57 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1220 (task closed): Error accessing module repository from 'Check For Updates' <http://dev.openmrs.org/ticket/1220#comment:2> || OpenMRS Changesets: Changeset [6662]: Added unit tests for http to https redirection problem - #1220 <http://dev.openmrs.org/changeset/6662>
23:16:47 *** nribeka has quit IRC
23:36:19 *** [mharrison] has quit IRC
23:49:03 *** bmckown has quit IRC