IRC Chat : 2013-05-04 - OpenMRS

00:00:58 *** wyclif has joined #openmrs
00:12:23 *** wyclif has quit IRC
00:12:54 *** wyclif has joined #openmrs
00:17:37 *** jennparise has quit IRC
00:47:32 *** Anuruddha has joined #openmrs
00:49:06 *** wyclif has quit IRC
01:05:54 *** jb360 has joined #openmrs
01:08:49 <nribeka> jblaya maybe try this one: http://www.neshkov.com/dj.html
01:09:27 <nribeka> or this one: http://java.decompiler.free.fr/
01:09:36 <jblaya> nribeka, thanks, I tried and it worked with dj
01:10:30 <jblaya> nribeka, have you by any chance ever seen this error for sending emails com.sun.mail.handlers.text_plain cannot be cast to javax.activation.DataContentHandler
01:11:09 *** portablejim has joined #openmrs
01:11:49 <nribeka> what are you trying to do jblaya? can i see the code probably. that seems to be a type casting exception?
01:12:33 <jblaya> it's a module that sends emails, and when I googled that error it usually said different versions of a mail jar
01:12:56 <jblaya> nribeka, here's the site with the answer http://stackoverflow.com/questions/2976985/com-sun-mail-handlers-text-plain-cannot-be-cast-to-javax-activation-datacontenth
01:12:59 <OpenMRSBot> <http://ln-s.net/-7$3> (at stackoverflow.com)
01:18:32 <nribeka> are you running it on cold fusion like them? in mavenized module i ran into similar problem. a class throwing class cast exception because of one dependency add one jar and other dependency add the same jar with different version.
01:18:51 <jblaya> no, I'm running on tomcat
01:19:35 <jblaya> nribeka, and when I checked the jars in maven it only had one for mail
01:19:44 <jblaya> tomcat 7 to be specific
01:20:13 <nribeka> one mail in your module? maybe openmrs already include mail jar too?
01:20:40 <jblaya> ok, so I should try deleting it?
01:20:55 <nribeka> let see if openmrs include mail
01:20:56 <jblaya> sorry for the newbie question, but how do I delete it from my module?
01:20:57 <nribeka> hold on
01:22:21 <nribeka> i see this one in the openmrs: mail-1.4.1.jar
01:22:42 <nribeka> can you check the lib folder of your omod and see if the module includes another mail.jar?
01:23:41 <nribeka> and check also if there's activation jar in your module
01:23:53 <nribeka> openmrs have this in their lib: activation-1.1.jar
01:24:25 <nribeka> to exclude, you need to find the dependency that include that jar and add clause <exclude> in the pom.xml
01:25:00 <jblaya> yup, I have mail-1.3.2.jar
01:25:01 <nribeka> <exclusion>
01:25:01 <nribeka> <artifactId>xalan</artifactId>
01:25:01 <nribeka> <groupId>xalan</groupId>
01:25:01 <nribeka> </exclusion>
01:25:22 <jblaya> and activation-1.1
01:26:19 <jblaya> ok, so I should exclude both the one that has mail and the once that has activation?
01:26:46 <nribeka> yeah, you need to exclude them in your pom.xml
01:27:03 <nribeka> what ide are you using jblaya?
01:27:09 <jblaya> eclipse
01:27:33 <nribeka> dang different ide :D
01:27:51 <jblaya> I thought all the good openmrs programmers used eclipse ;D
01:27:55 <nribeka> so, you need to open the pom and then go to the dependency tab
01:28:53 <jblaya> the pom in the main, api, or omod
01:29:01 <nribeka> main pom
01:29:16 <jblaya> ok
01:29:17 <jblaya> there
01:29:55 <nribeka> i forgot how eclipse dependency tab look like
01:30:14 <nribeka> hahaha ...
01:30:22 <jblaya> we can just go straight to the xml if it's easier
01:30:26 <nribeka> what is your module depends on, lemme just check the pom here
01:30:44 <jblaya> reporting, openmrs-api, openmrs-web, openmrs-test
01:31:21 <nribeka> that's it?
01:31:29 <jblaya> yep, nice and simple
01:33:02 <nribeka> hah
01:33:10 <nribeka> reporting include mail
01:33:12 <nribeka> 1.3.2
01:33:15 <nribeka> i wonder why
01:33:43 <nribeka> probably ask mseaton jblaya
01:33:59 <nribeka> openmrs already include 1.4.1 but reporting add it again
01:34:08 <jblaya> nribeka, ok, so there's no way that I can just remove mail-1.3.2?
01:34:17 <nribeka> so to remove it:
01:34:17 <jblaya> nribeka, I need this to work for monday...
01:34:59 <jblaya> but yes, I will email mike on the dev list and ask him if there's a reason and perhaps remove it from reporting
01:35:03 <nribeka> inside the reporting dependency, you need to add:
01:35:11 <mseaton> hey nribeka jblaya what's up?
01:35:33 <jblaya> wow, I can't believe you're up mseaton I was just about to email you
01:35:54 <jblaya> basically I'm getting a class exception error which is probably due to clashing version of mail and activation jars
01:36:08 <nribeka> <exclusions>
01:36:08 <nribeka> <exclusion>
01:36:08 <nribeka> <artifactId>javax.mail</artifactId>
01:36:08 <nribeka> <groupId>mail</groupId>
01:36:08 <nribeka> </exclusion>
01:36:09 <nribeka> </exclusions>
01:36:13 <jblaya> and nribeka found that reporting includes mail-1.3.2 while OpenMRS has 1.4.1
01:36:22 <nribeka> you need to add that exclusion
01:36:30 <jblaya> so we were wondering if there was a reason for that
01:36:40 <jblaya> or if it should be deleted from reporting
01:36:57 <mseaton> i se
01:37:42 <mseaton> i'd have to look into it, but i assume that since reporting supports 1.6+, that this was added because 1.6 didn't have it, but not 100% sure...
01:37:46 <jblaya> nribeka, another newbie question, does it matter where I put the exclusiong in the pom.xml?
01:38:03 <nribeka> yes, you need to add that tag under the reporting
01:38:09 <nribeka> example of exclusion:
01:38:12 <nribeka> <dependency>
01:38:12 <nribeka> <groupId>org.apache.poi</groupId>
01:38:12 <nribeka> <artifactId>poi</artifactId>
01:38:12 <nribeka> <version>${poiVersion}</version>
01:38:12 <nribeka> <scope>compile</scope>
01:38:12 <nribeka> <exclusions>
01:38:12 <nribeka> <exclusion>
01:38:13 <nribeka> <groupId>log4j</groupId>
01:38:13 <nribeka> <artifactId>log4j</artifactId>
01:38:14 <nribeka> </exclusion>
01:38:14 <nribeka> <exclusion>
01:38:15 <nribeka> <groupId>commons-logging</groupId>
01:38:15 <nribeka> <artifactId>commons-logging</artifactId>
01:38:16 <nribeka> </exclusion>
01:38:16 <nribeka> </exclusions>
01:38:17 <nribeka> </dependency>
01:38:49 <nribeka> this one add apache poi as dependency, but exclude log4j (which is dependency of apache poi) because it's already included on openmrs
01:39:04 <nribeka> so in your case, you need to include reporting, but exclude the javax.mail
01:39:34 <nribeka> fingers crossed!
01:39:46 <nribeka> probably 1.6 mseaton
01:39:46 *** wyclif has joined #openmrs
01:42:53 <jblaya> nribeka, I restarted tomcat, is there anything else I need to do to make this take effect?
01:43:56 <nribeka> exclusion, build, check the lib in the omod and make sure there's no activation and mail jar, deploy and test :)
01:44:17 <nribeka> and then start crossing our fingers ...
01:45:36 <jblaya> weird, in the omod/lib, there's only one jar programmablealerts-api-1.0.4.jar
01:45:45 <jblaya> andp rogrammablealerts is the name of the module
01:46:57 <nribeka> that's a good sign
01:47:34 <jblaya> nribeka, but it still gives the same error...
01:47:53 <nribeka> ugh exactly the same exception?
01:49:27 <jblaya> yep...
01:50:19 <jblaya> this is the full error
01:50:21 <jblaya> ERROR - SendAlertsProcess.startAlertsSender(98) |2013-05-03 21:50:00,048| Problem occured while Sending automated alerts
01:50:21 <jblaya> java.lang.ClassCastException: com.sun.mail.handlers.text_plain cannot be cast to javax.activation.DataContentHandler
01:50:21 <jblaya> at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:596)
01:50:21 <jblaya> at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:550)
01:50:22 <jblaya> at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:612)
01:50:24 <jblaya> at javax.activation.DataHandler.writeTo(DataHandler.java:316)
01:50:26 <jblaya> at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:261)
01:50:28 <jblaya> at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1321)
01:50:30 <jblaya> at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2074)
01:50:32 <jblaya> at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2042)
01:50:34 <jblaya> at javax.mail.Transport.send(Transport.java:117)
01:50:36 <jblaya> at org.openmrs.module.programmablealerts.util.EmailGateway.sendMessage(EmailGateway.java:67)
01:50:38 <jblaya> at org.openmrs.module.programmablealerts.SendAlertsProcess.sendAlerts(SendAlertsProcess.java:60)
01:50:40 <jblaya> at org.openmrs.module.programmablealerts.SendAlertsProcess.startAlertsSender(SendAlertsProcess.java:95)
01:50:42 <jblaya> at org.openmrs.module.programmablealerts.SendAlertsTask.execute(SendAlertsTask.java:38)
01:50:46 <jblaya> at org.openmrs.scheduler.tasks.TaskThreadedInitializationWrapper.execute(TaskThreadedInitializationWrapper.java:72)
01:50:49 <jblaya> at org.openmrs.scheduler.timer.TimerSchedulerTask.execute(TimerSchedulerTask.java:98)
01:50:51 <jblaya> at org.openmrs.api.context.Daemon$2.run(Daemon.java:118)
01:53:23 <nribeka> which openmrs are you running jblaya?
01:53:29 <jblaya> 1.9.3
01:53:38 <nribeka> so tomcat 7 and openmrs 1.9.3
01:53:43 <jblaya> yep
01:53:51 <jblaya> and openjdk 7
01:54:03 <nribeka> lemme see. hold on
01:56:43 <jblaya> nribeka, could it be a problem with another module, say xforms?
01:57:31 <nribeka> doesn't seems like it jblaya
01:58:12 <nribeka> well there's nothing wrong though to open up the omod i guess and peek at the lib folder
01:58:39 <jblaya> nribeka, yep, I did and no mail, or activation or any of the other jars I've read that could conflict
01:59:35 <jblaya> let me try installing the module in another server and see if it gives me the same error
02:00:30 <nribeka> the maven repo is showing different kind of java.mail, so probably some other modules include different version of java.mail
02:00:31 <nribeka> http://mavenrepo.openmrs.org/nexus/index.html#nexus-search;quick~mail
02:01:34 <nribeka> i can try out the module too jblaya
02:01:46 <jblaya> ok, do I email it to you?
02:01:52 <nribeka> sure
02:01:56 <nribeka> nyoman at openmrs
02:02:48 <jblaya> just sent it
02:05:10 <nribeka> what setup do i need to do?
02:05:54 <jblaya> you just need to install reporting 7.4.1
02:06:02 <jblaya> and then this module
02:06:44 <jblaya> and run the send alerts task
02:10:39 <nribeka> don't see any exception jblaya
02:10:44 <nribeka> hmmm
02:11:18 <jblaya> will try with ubuntu server, it might be a problem with RHEL 6 which is what I'm running it on
02:13:58 <jblaya> still working on it, give me a sec
02:14:58 *** jennparise has joined #openmrs
02:21:37 <nribeka> i still think it's because of conflicting javax.mail jblaya
02:21:57 <nribeka> just unsure which module bring new javax.mail
02:22:37 <jblaya> so if any module has a dependency with javaxmail ti could be a prblem
02:23:02 <jblaya> just ran it in another server and didn't get the error either
02:23:13 <jblaya> but my guess is that it requires an email to try to be sent to ge the error
02:23:18 <jblaya> let me copy the database
02:23:31 <nribeka> ok
02:26:17 *** wyclif has quit IRC
02:27:13 *** kkthecoder has quit IRC
02:27:33 *** kkthecoder has joined #openmrs
02:31:32 <jblaya> nribeka, hilarious, same database, on ubutnu and no problem
02:32:04 <nribeka> could be the jdk too jblaya
02:32:15 <jblaya> true, let me check
02:33:05 <jblaya> both are openjdk 7,
02:33:24 <jblaya> one is version 09, the one that works is 21
02:33:34 <jblaya> perhaps try and update the version on the bad server?
02:33:44 <nribeka> what about the tomcat?
02:33:52 <nribeka> the version of the openmrs?
02:34:05 *** tcalder2 has joined #openmrs
02:34:30 <jblaya> openmrs version identical
02:34:41 <jblaya> bad = tomcat7.0.35, good = 7.0.26
02:35:54 <jblaya> what do you think of this https://confluence.atlassian.com/display/JIRAKB/Unable+to+Sent+Mail+Due+to+%27mail-1.x.jar%27+Conflict
02:35:59 <OpenMRSBot> <http://ln-s.net/-7$n> (at confluence.atlassian.com)
02:36:29 <jblaya> maybe I'll try removing the mail and activation from openmrs
02:37:23 <nribeka> try that one too jblaya. and then maybe raise this concern to the dev list later. could be in the new aplication server, they include those jars
02:44:24 <jblaya> nribeka, I get this
02:44:25 <jblaya> SEVERE: Context [/midoctor] startup failed due to previous errors
02:44:25 <jblaya> Listener.contextDestroyed: Error while shutting down openmrs:
02:44:25 <jblaya> java.lang.NoClassDefFoundError: javax/mail/Authenticator
02:45:20 <nribeka> that one after your remove the javax.mail from openmrs right?
02:45:30 <jblaya> yep, mail and activation
02:45:33 <jblaya> from the war file
02:46:30 <nribeka> yeah, the behavior is bizarre jblaya
02:47:12 <nribeka> maybe don't remove them from the war but match the bad server (rhel) with the one that works (ubuntu)
02:47:32 <jblaya> match you mean with tomcat and the jdk?
02:47:48 <nribeka> match the jdk first, see if that fix the issue. if not then match the tomcat.
02:48:06 <nribeka> and after that we can isolate the issue (jdk or tomcat)
02:48:13 <jblaya> ok, the other difference is that one is 32 and the other 64 (bad, rhel) bit
02:48:42 <jblaya> the other is that I"m running as root in rhel
02:49:05 <jblaya> could that be a problem?
02:49:15 *** DraggonZ has joined #openmrs
02:50:09 <nribeka> hah so many variables. but i doubt that's the issue. i think it's more of classloading (jdk probably include activation with one version and then tomcat comes with different version and then openmrs comes with another version)
02:50:30 <nribeka> so isolating it to jdk or tomcat will help us understand i think
02:50:45 <jblaya> ok, so frustrating spending the time on this....
02:50:50 <jblaya> thanks for all this help
02:51:06 <nribeka> no problem :D
02:55:37 *** ArcTanSusan has joined #openmrs
02:55:49 <ArcTanSusan> hi
02:56:06 <ArcTanSusan> how do I get eclipse SDK to point to the git-cloned openMRS project?
02:56:50 <nribeka> ArcTanSusan: you can import the maven project. you need to setup the m2e plugin first i think
02:56:59 <ArcTanSusan> how?
02:59:00 <nribeka> ArcTanSusan: did you follow this page: https://wiki.openmrs.org/display/docs/Step+by+Step+Installation+for+Developers
02:59:01 <OpenMRSBot> <http://ln-s.net/8_PW> (at wiki.openmrs.org)
02:59:11 <ArcTanSusan> yes
02:59:29 <nribeka> and then this one: https://wiki.openmrs.org/display/docs/Using+the+M2Eclipse+Maven+Plugin+in+Eclipse
03:00:56 <ArcTanSusan> how do i check if i haveM2Eclipse plugin installed on my eclipse (4.2.2) ?
03:01:54 <ArcTanSusan> i don't have the M2E plugin.
03:01:56 <ArcTanSusan> :( how do i get it
03:02:24 <ArcTanSusan> my eclipse has no "Help -> Eclipse Marketplace"
03:03:49 <nribeka> in the old eclipse, i think it's called help -> install
03:03:55 <ArcTanSusan> ahhh
03:05:34 <ArcTanSusan> when i try to add new site location for installing new plugin, i get error " http://www.eclipse.org/m2e/ not found"
03:09:19 <nribeka> this is the update site ArcTanSusan : http://eclipse.org/m2e/download/
03:09:43 <nribeka> you probably need to set the update site to the one mentioned in that page
03:10:26 <ArcTanSusan> nribeka: "http://eclipse.org/m2e/download/" could not find
03:11:03 <nribeka> http://download.eclipse.org/technology/m2e/releases
03:11:04 <OpenMRSBot> <http://ln-s.net/91GZ> (at download.eclipse.org)
03:17:38 <ArcTanSusan> nribeka: Perfect! works!
03:20:54 <ArcTanSusan> That was a very tough hurdle on my eclipse 4.2.2. is it better to get eclipse juno or indigo instead?
03:22:05 <nribeka> i like old eclipse. but i don't use it anymore. i use intellij nowadays :D
03:29:21 <ArcTanSusan> now, the next problem is to install the git plugin on eclipse 4.2.2
03:29:22 <ArcTanSusan> how??
03:29:27 <ArcTanSusan> war is the path file for it?
03:30:24 <DraggonZ> hi, ArcTanSusan, probably it will be easier to download archive with all required plugins
03:31:01 <ArcTanSusan> DraggonZ: that's war i did, too, and then the plugins didn't show up on list of installed plugins :(
03:31:04 <ArcTanSusan> **wat
03:33:35 <ArcTanSusan> just installed Egit and Jgit!
03:33:38 <ArcTanSusan> wat's next??
03:34:55 <ArcTanSusan> i am unable to follow step 1 on this tutorrial https://wiki.openmrs.org/display/docs/Using+the+M2Eclipse+Maven+Plugin+in+Eclipse Because I do not have svn, i have git as the option
03:35:21 <DraggonZ> you don't need svn
03:37:27 *** wyclif has joined #openmrs
03:41:02 <ArcTanSusan> i get an error message when i run as git
03:44:20 <ArcTanSusan> ohh I understand now
03:44:54 <jblaya> nribeka, it turned out to be a conflict with another module, haven't figured out which one yet, but at least it's working, now I'll add them back one by one...
03:45:08 <jblaya> nribeka, what a *&^%*&^ pain
03:45:59 *** jblaya has quit IRC
03:46:44 <nribeka> ArcTanSusan: good :)
03:49:51 <ArcTanSusan> nribeka: i still cannot complete step1: https://wiki.openmrs.org/display/docs/Using+the+M2Eclipse+Maven+Plugin+in+Eclipse i don't have svm
03:52:10 <ArcTanSusan> invalid remote origin error
03:52:55 *** annarm has quit IRC
03:52:59 <ArcTanSusan> I'm stuck on next step
03:53:31 *** tcalder2 has quit IRC
03:54:17 <nribeka> you can clone to your local computer and then import maven project from eclipse ArcTanSusan
03:55:22 <ArcTanSusan> yes i cloned the openMRS-core and got eclipse to point to that git-clone path file
03:55:24 <ArcTanSusan> wat's next??
03:55:48 <ArcTanSusan> i already ran the mvm: clean install and mvm: run to see the web app run locally on my server
03:55:54 <ArcTanSusan> via command line
03:58:28 <ArcTanSusan> I'm going thru https://wiki.openmrs.org/display/docs/Creating+Your+First+Module as a beginner Java programmer
03:58:29 <OpenMRSBot> <http://ln-s.net/8c6T> (at wiki.openmrs.org)
04:07:44 *** tcalder2 has joined #openmrs
04:08:12 <nribeka> ArcTanSusan: i like this one better :)
04:08:13 <nribeka> https://wiki.openmrs.org/display/docs/Using+the+Module+Maven+Archetype
04:08:14 <OpenMRSBot> <http://ln-s.net/9$wo> (at wiki.openmrs.org)
04:08:20 <nribeka> you can follow that one too probably
04:11:01 <ArcTanSusan> is this useful?? http://www.youtube.com/watch?v=kJN4dmU2jSk
04:13:46 <ArcTanSusan> also, in this other video: http://www.youtube.com/watch?v=_PogABUDYqE, min 8:00 says i should get the m2e connector for scm. Should I ? i don't see it appear in my options menu
04:30:58 *** Anuruddha_ has joined #openmrs
04:33:49 *** Anuruddha has quit IRC
04:35:16 *** harsz89 has joined #openmrs
05:01:41 *** h3llborn has joined #openmrs
05:10:24 *** kkthecoder has quit IRC
05:13:45 *** wyclif has quit IRC
05:17:06 *** h3llborn has quit IRC
05:18:52 *** Anuruddha__ has joined #openmrs
05:19:09 *** Anuruddha__ is now known as Anuruddha
05:19:55 *** jennparise has quit IRC
05:22:13 *** Anuruddha_ has quit IRC
05:30:39 *** jblaya has joined #openmrs
05:31:08 <jblaya> nribeka, you still around?
05:35:32 <nribeka> yes sir
05:36:26 <jblaya> I found the problem, it was in the spreadsheet import module
05:36:39 <jblaya> it had a dependency on openmrs-api and that brought activation and mail.jar
05:37:21 <jblaya> deal is that I put the exclusion in the module like this
05:37:23 <jblaya> <dependency>
05:37:23 <jblaya> <groupId>org.openmrs.api</groupId>
05:37:23 <jblaya> <artifactId>openmrs-api</artifactId>
05:37:23 <jblaya> <version>${openMRSVersion}</version>
05:37:23 <jblaya> <type>jar</type>
05:37:24 <jblaya> <scope>provided</scope>
05:37:26 <jblaya> <exclusions>
05:37:30 <jblaya> <exclusion>
05:37:32 <jblaya> <artifactId>mail</artifactId>
05:37:34 <jblaya> <groupId>javax.mail</groupId>
05:37:36 <jblaya> </exclusion>
05:37:38 <jblaya> </exclusions>
05:37:40 <jblaya> </dependency>
05:37:42 <jblaya> and when I go to api dependency hierarchy, those two jars aren't there any more
05:37:50 <jblaya> but then if I check the omod that is created they are in there....
05:37:56 <jblaya> how do I get them out?
05:38:26 <nribeka> jblaya: if the scope is provided, then it shouldn't put those jars in the module
05:38:37 <nribeka> what other dependency that module introduce?
05:39:15 <jblaya> yep, I actually had to put them in both openmrs-web and openmrs-test and then it didn't put them in
05:39:21 <nribeka> ArcTanSusan: some of the video could be outdated
05:39:32 <ArcTanSusan> i c
05:39:34 <ArcTanSusan> ic
05:40:10 <nribeka> irc and usually mailing list will give you the latest info. so if you're having issue, post it to the mailing list. and you can update the wiki too :)
05:40:20 <nribeka> jblaya: that's really strange
05:40:44 <nribeka> so, after you put the exclusion, is the issue gone?
05:40:51 <jblaya> yep
05:41:00 <jblaya> ridiculous that openmrs was conflicting with itself
05:41:20 <nribeka> is the spreadsheet module in github?
05:41:28 <nribeka> could be problem in the setup of the pom
05:41:57 <jblaya> yes
05:42:07 <jblaya> https://github.com/openmrs/openmrs-module-spreadsheetimport
05:42:12 <OpenMRSBot> <http://ln-s.net/-7-W> (at github.com)
05:42:28 <nribeka> ic. it's using older openmrs.
05:43:12 <jblaya> you mean <openMRSVersion>1.6.2</openMRSVersion>?
05:43:32 <jblaya> btw where are you?
05:43:38 <nribeka> yeah. mike mentioned about it earlier.
05:43:40 <jblaya> that you're on this late
05:43:43 <nribeka> eastern time hahahaha ... :D
05:44:00 <nribeka> night owl. had too much caffeine earlier i think
05:44:00 <jblaya> so why up so late, you usually around at this time?
05:44:16 <jblaya> :D
05:44:20 <jblaya> well, I'm glad you did
05:44:26 <nribeka> hahahaha ...
05:44:27 <nribeka> :D
05:44:30 <jblaya> ok, I'm goign to fix that version and put it as 1.9.1
05:44:41 <nribeka> spreadsheet?
05:44:43 <jblaya> because the moduel doens't work with any other version anyways
05:44:44 <jblaya> yes
05:45:05 <nribeka> 1.7 (or 1.8) have different pom structure
05:45:05 <jblaya> since it reads/writes directly to the database, any data model change breaks it
05:45:26 <nribeka> so migrating it, going to be a bit tricky i think
05:45:39 <jblaya> ok, then never mind
05:46:00 <jblaya> but I'm glad I fixed it
05:46:09 <nribeka> hahaha ... :D
05:47:34 <nribeka> i think the key (for module with 1.6.x line) will be making sure in the lib, you're including jars that you're really depends on and not causing clash like this
05:48:28 <nribeka> double check what jars in the lib folder of omod and what provided by openmrs (if you're planning to run the module on openmrs version above 1.6)
05:48:33 <nribeka> hehehe ... :D
05:48:46 <jblaya> wow, what a pain
05:49:51 <nribeka> maybe adding that exclusion lists to the wiki page, jblaya
05:50:18 <jblaya> the wiki of the spreadsheet module?
05:50:52 <nribeka> yeah, i think.
05:51:25 <nribeka> if you're planning to run this module on 1.8.x, please add this exclusion in the pom. otherwise it will potentially create problems:
05:51:58 <nribeka> :D
05:56:56 <nribeka> jblaya: what timezone are you in right now?
05:57:08 <jblaya> nribeka, same one as you :D
05:57:18 <nribeka> hahahaha ...
06:00:57 <nribeka> 2AM, i'm out of here. any other quick question jblaya? :D
06:01:07 <nribeka> otherwise i will see you in cyber space
06:01:09 <jblaya> nribeka, nop, all set for you
06:01:14 <jblaya> sleep well
06:01:44 <nribeka> cool cool. thank you. adios! ciao! peace out.
06:10:43 *** portablejim has quit IRC
06:12:29 *** portablejim has joined #openmrs
06:22:34 *** jennparise has joined #openmrs
06:26:36 *** tcalder2 has quit IRC
06:26:41 *** Hasintha_i has quit IRC
06:31:05 *** Anuruddha has quit IRC
06:54:51 *** DraggonZ has quit IRC
06:55:14 *** DraggonZ has joined #openmrs
07:08:32 *** jblaya has quit IRC
07:14:29 *** Anuruddha has joined #openmrs
08:03:38 *** b0b has quit IRC
08:05:07 *** b0b has joined #openmrs
08:20:13 *** ArcTanSusan has quit IRC
08:30:06 *** Anuruddha has quit IRC
09:04:48 *** sashrika has joined #openmrs
09:07:30 *** wyclif has joined #openmrs
09:31:16 *** DraggonZ has quit IRC
09:48:04 *** tcalder2 has joined #openmrs
09:58:48 <sashrika> slow flow saturday
10:06:23 *** tcalder2 has quit IRC
10:11:19 *** Anuruddha has joined #openmrs
10:12:28 *** wyclif has quit IRC
10:17:05 *** tcalder2 has joined #openmrs
10:44:56 *** tcalder2 has quit IRC
11:20:55 *** Anuruddha_ has joined #openmrs
11:23:44 *** Anuruddha has quit IRC
11:37:27 *** DraggonZ has joined #openmrs
11:39:29 *** Anuruddha_ is now known as Anuruddha
11:41:47 *** harsha89 has joined #openmrs
11:44:36 *** harsz89 has quit IRC
11:56:29 *** harsha89 has quit IRC
11:57:13 *** harsz89 has joined #openmrs
12:34:12 <portablejim> What is the minimum amount of info needed to create a patient?
12:54:10 *** jblaya has joined #openmrs
12:55:14 <jblaya> burke, with a groovy script which does admin.executeSQL, I'm getting that the database locks because of too many connections
12:55:18 *** rday has quit IRC
12:55:31 <jblaya> burke, do you know if I have to close that SQL query for the session to close?
12:56:39 *** portablejim has quit IRC
13:11:19 *** dynex has joined #openmrs
13:25:35 *** jblaya has quit IRC
13:33:41 *** h3llborn has joined #openmrs
13:36:48 *** jblaya has joined #openmrs
13:47:14 *** Hasintha_i has joined #openmrs
13:53:36 *** harsz89 has quit IRC
14:11:35 *** DraggonZ has quit IRC
14:11:58 *** tcalder2 has joined #openmrs
14:12:36 *** dynex has quit IRC
14:13:54 *** dynex has joined #openmrs
14:22:22 <jblaya> jkeiper, suranga nribeka sunbiz, any of you guys know a little about groovy or the api? I'm getting an error when trying to save an Obs, and I have no idea why...
14:29:59 *** Anuruddha has quit IRC
14:33:30 *** ruwanego has joined #openmrs
14:37:30 *** Anuruddha has joined #openmrs
14:45:18 *** breeze has joined #openmrs
14:45:29 *** Anuruddha has quit IRC
14:48:30 *** DraggonZ has joined #openmrs
14:51:46 <nribeka> haha jblaya
14:51:54 <nribeka> you're up early :)
14:51:54 <jblaya> nribeka, long time
14:51:58 <jblaya> hahaha
14:52:04 <nribeka> sashrika: yeah, saturday is slow usually
14:52:04 <jblaya> yeah, and you're sleeping in
14:52:32 <nribeka> i was watching debate for my hometown governor :D
14:52:47 <jblaya> nribeka, can I ask you about an error I'm getting in groovy with the obsService?
14:52:58 <jblaya> wow, hopefully that's more entertaining than this
14:52:58 <nribeka> dedicating all bandwidth to stream from hometown :D
14:53:08 <nribeka> haha obsService?
14:53:14 *** breeze has quit IRC
14:53:18 <nribeka> portablejim is gone
14:53:34 <jblaya> yeah, I'm trying to create an obs with a groovy script and I'm getting an error...
14:53:42 <jblaya> can I send you the script here?
14:53:56 <jblaya> or should I do pastebin?
14:54:03 <nribeka> pastebin probably jblaya
14:54:06 <jblaya> don't know the rules of the irc channel :D
14:54:12 <nribeka> and the error / exception
14:54:23 <nribeka> don't worry. the admins are not here on weekend
14:54:25 <nribeka> hahahahahahahaha
14:55:01 <jblaya> http://pastebin.com/3P2aPVBE here's the script
14:56:07 <nribeka> obs datetime?
14:56:13 <nribeka> is not being assigned?
14:56:42 <jblaya> error pastebin.com/knVn4W0w
14:56:52 <jblaya> do I need to specify that it's today?
14:57:24 <jblaya> seems weird because this is the example from burke that I'm trying to follow
14:57:24 <jblaya> / Loop thru all the obs where concept_id is for non-coded diagnosis, one location, and not voided
14:57:24 <jblaya> for (o in obs.getObservations(null,null,[oc],null,null,[l],null,null,null,null,null,false)) {
14:57:24 <jblaya>
14:57:24 <jblaya> // If the value_text is like the non-coded, print and change it
14:57:25 <jblaya> if (o.valueText.toUpperCase() ==~ diagnosis ) {
14:57:26 <jblaya> println "${o.concept.name}: ${o.valueText}<br />"
14:57:28 <jblaya>
14:57:30 <jblaya> // Void the non-coded obs; create coded concepts
14:57:33 <jblaya> o.setConcept(c);
14:57:35 <jblaya> o.setValueCoded(vc);
14:57:39 <jblaya> o.setValueText(null);
14:57:41 <jblaya> obs.saveObs(o,reason);
14:57:41 <nribeka> i think obs datetime is required
14:57:43 <jblaya> }
14:57:45 <jblaya> }
14:57:47 <jblaya> though for this one he is just chaning the value of an obs
14:58:11 <jblaya> ok, let me try that
14:58:13 <nribeka> this one is voiding
14:58:22 <nribeka> you're creating new obs right?
14:58:30 <jblaya> yes
14:58:52 <nribeka> new obs will need: pt, question, datetime, creator, date created
14:59:05 <nribeka> lemme see the hibernate definition for obs
15:00:25 <nribeka> yep, those are the required fields
15:01:49 *** dynex has quit IRC
15:02:31 <jblaya> nribeka, yeah, but it should create those automatically...
15:02:42 <jblaya> I added obs1.setObsDatetime(today); and it still gave me the error
15:03:11 <jblaya> groovy seems awesome, but you have to as smart as burke to figure out how the hell to use it...
15:03:12 <nribeka> the stacktrace is not really helpful jblaya
15:03:26 <nribeka> yeah, i blame burke for all the groovy
15:03:29 <nribeka> :D
15:03:30 <jblaya> nribeka, yeah, I know ^%$^ that's why I have to bug you :D
15:03:37 <jblaya> nribeka, me too
15:03:51 <jblaya> though I'd be dead in the water with our system without it
15:04:07 <jblaya> nribeka, anyone else who might be online that would know about groovy?
15:04:36 <nribeka> darius
15:05:02 <jblaya> ok, sucks that he's 3 hours behind us
15:05:23 <jblaya> I'll have to wait a little bit to bug him, and burke isn't answering me, perhaps too many people bugged him about groovy
15:05:39 <nribeka> hahahaha ... true
15:05:48 <nribeka> your script seems to be correct
15:05:54 <nribeka> lemme try running it here
15:05:56 <jblaya> I know
15:06:00 <jblaya> it's driving me nuts :D
15:06:15 *** harsz89 has joined #openmrs
15:06:54 <jblaya> but you'll have to change the concept Ids
15:09:22 *** wyclif has joined #openmrs
15:11:02 <nribeka> yep
15:16:26 <nribeka> getting the same exception jblaya
15:16:31 <nribeka> trying to fix the script
15:16:38 <jblaya> nribeka, thank you!!!!
15:16:53 <jblaya> I have to do several other scripts similar to this one
15:17:07 <jblaya> so having one that works will help me huge amounts
15:17:51 <nribeka> hmmm
15:18:07 <nribeka> obs1.setObsDatetime(today);
15:18:12 <nribeka> adding that one works for me
15:18:45 <jblaya> seriously?
15:18:53 <jblaya> crap, another problem of my implementation...
15:19:01 *** wyclif has quit IRC
15:19:02 <jblaya> could you send me the full script back
15:19:02 <nribeka> last line: print obs1
15:19:36 <nribeka> http://pastebin.com/i6cDPzFW
15:19:43 <nribeka> i remove some of the unused imports
15:19:53 <nribeka> and then i change your query a little bit
15:19:53 *** wyclif has joined #openmrs
15:20:20 <nribeka> this is printed after the execution: Obs #157421708Obs #157421709Obs #157421710Obs #157421711Obs #157421712
15:20:32 <nribeka> so the obs are created
15:20:37 <jblaya> sweet!
15:20:41 <jblaya> what was the error??
15:21:08 <nribeka> no error the script that i pasted in the above pastebin :D
15:21:18 <nribeka> the error was your script missing datetime
15:21:21 <jblaya> right, sorry, what was the error in my script...
15:21:26 <jblaya> ok
15:21:57 <nribeka> missing setObsDatetime(today);
15:22:57 <jblaya> nribeka, when I do it for my sql statement I get an error...
15:23:20 <Hasintha_i> suranga, hi
15:23:55 <nribeka> try running your sql probably first jblaya. using mysql workbench or something?
15:24:00 *** wyclif has quit IRC
15:24:02 <nribeka> mysql command line
15:24:10 <jblaya> yeah, i did nad it worked, let me try that again and see what happens
15:26:46 <jblaya> ridiculous, my sql statement is right, and that's all I change from your script and it gives me the error...
15:27:06 <jblaya> let me try with a sql closer to yours
15:29:49 <nribeka> what in the world
15:30:20 <jblaya> what's the output of your sql?
15:30:47 <jblaya> mine is 5 couples, with two patient_id repeated
15:30:52 <jblaya> ie
15:30:57 <jblaya> 26,82
15:30:59 <jblaya> 26,83
15:31:02 <jblaya> 21,72
15:31:04 <jblaya> 21,75
15:31:07 <jblaya> 22,73
15:31:12 <nribeka> this is the example of creating obs: https://github.com/openmrs/openmrs-core/blob/master/api/src/test/java/org/openmrs/api/ObsServiceTest.java
15:31:17 <OpenMRSBot> <http://ln-s.net/-7FM> (at github.com)
15:31:42 <nribeka> are you still just printing the obs?
15:31:48 <nribeka> print obs1
15:32:01 <jblaya> yep
15:32:08 <nribeka> should be Obs#<some random number>
15:32:18 <nribeka> some random number is the obs id
15:32:48 <jblaya> so print obs1.getObsId()?
15:34:10 <jblaya> if I comment out both the os.saveObs and the print, I get the output of mysql statement and no error
15:34:45 <nribeka> if you do saveObs you still get exception?
15:35:01 <jblaya> yep, that's the line that has the error
15:35:12 *** h3llborn has quit IRC
15:35:19 <jblaya> if I put print obs 1 and comment out the saveObs, I don't get an error
15:35:30 <jblaya> output is obs id is nullobs id is nullobs id is null
15:36:04 <jblaya> I"m running groovy 2.2.1 on openmrs 1.9.3, what about you?
15:37:31 <nribeka> obs id is null means it is not saved i think jblaya
15:37:35 <nribeka> lemme try on mine again
15:41:36 <jblaya> ok, got it to work
15:41:45 <jblaya> copied the code from the example you gave me
15:42:24 <jblaya> nribeka, probably missing location or something
15:43:15 <nribeka> eh, it's working now?
15:43:21 <nribeka> hahaha ... cool cool :D
15:43:23 <jblaya> yep
15:43:27 <jblaya> yeah, so weird...
15:44:34 <nribeka> well i'm glad you got it working :)
15:45:01 *** dynex has joined #openmrs
15:45:21 <jblaya> nribeka, me too!!
15:45:25 <jblaya> thanks so much
15:45:41 <nribeka> cool cool
15:45:44 <nribeka> i'll be back
15:45:46 <jblaya> if you by chance want to stay on line I would be extremely thankful :D
15:45:48 <nribeka> need to restart ...
15:45:49 <jblaya> no problem
15:45:56 <jblaya> coffee huh?
15:46:00 <jblaya> restart you or the computer :D
15:46:27 <nribeka> hahahaha i think i will be around. computer jblaya. i had my morning diet coke IV already
15:47:06 <jblaya> nribeka, remind me to buy you a case at the next openmrs conference and to bring my iv
15:47:15 <jblaya> ok, i'll let you go for now :D
15:47:17 <jblaya> thanks again
15:51:42 <nribeka> hahahaha ... :D
15:51:52 <nribeka> i will definitely remind you jblaya :)
16:00:42 *** harshadura has joined #openmrs
16:05:17 *** harsz89 has quit IRC
16:05:26 *** harsz89 has joined #openmrs
16:07:20 *** jblaya has quit IRC
16:12:23 *** harshadura has quit IRC
16:22:31 *** jblaya has joined #openmrs
16:22:59 *** DraggonZ has quit IRC
16:24:59 *** tcalder2 has quit IRC
16:27:05 *** tcalder2 has joined #openmrs
16:45:30 *** dynex has quit IRC
16:45:48 *** dynex has joined #openmrs
16:59:47 *** dynex has quit IRC
17:00:10 *** dynex has joined #openmrs
17:10:24 *** dynex has quit IRC
17:14:52 *** k-joseph has joined #openmrs
17:31:18 *** sashrika has quit IRC
17:34:04 *** jblaya has quit IRC
17:35:58 *** wyclif has joined #openmrs
17:45:44 *** jblaya has joined #openmrs
17:54:48 *** k-joseph has quit IRC
17:58:36 *** rday has joined #openmrs
17:59:54 *** wyclif has quit IRC
18:11:32 *** jennparise has quit IRC
18:17:36 *** k-joseph has joined #openmrs
18:37:45 *** dkayiwa has joined #openmrs
18:59:57 <Hasintha_i> suranga, hi
19:00:48 *** ruwanego has quit IRC
19:02:33 *** k-joseph has quit IRC
19:02:56 *** k-joseph has joined #openmrs
19:05:21 *** ruwanego has joined #openmrs
19:06:53 *** Hasintha_i has quit IRC
19:06:54 *** ruwanego has quit IRC
19:07:21 *** ruwanego has joined #openmrs
19:12:30 *** jennparise has joined #openmrs
19:31:57 *** wyclif has joined #openmrs
19:45:27 *** tcalder2 has quit IRC
19:52:13 *** wyclif has quit IRC
19:56:24 *** ruwanego has quit IRC
19:59:00 *** ruwanego has joined #openmrs
19:59:33 *** wyclif has joined #openmrs
20:02:14 *** ruwanego has quit IRC
20:07:51 *** k-joseph has quit IRC
20:08:25 *** dkayiwa has quit IRC
20:10:29 *** k-joseph has joined #openmrs
20:15:40 *** dkayiwa has joined #openmrs
20:17:38 *** k-joseph has quit IRC
20:20:38 *** k-joseph has joined #openmrs
20:25:01 *** burke has quit IRC
20:25:28 *** ryates has quit IRC
20:25:43 *** akwatuha has quit IRC
20:26:02 *** suranga has quit IRC
20:26:05 *** downey has quit IRC
20:26:41 *** mseaton has quit IRC
20:33:25 *** dkayiwa has quit IRC
20:41:16 *** k-joseph has quit IRC
20:44:26 *** k-joseph has joined #openmrs
20:48:53 *** k-joseph has quit IRC
20:49:23 *** k-joseph has joined #openmrs
21:01:42 *** wyclif has quit IRC
21:05:39 *** lh has quit IRC
21:06:33 *** tcalder2 has joined #openmrs
21:18:05 *** robbyoconnor has joined #openmrs
21:18:05 *** ChanServ sets mode: +v robbyoconnor
21:37:11 *** ArcTanSusan has joined #openmrs
21:42:38 *** k-joseph has quit IRC
21:45:40 *** harsz89 has quit IRC
21:57:36 *** harsz89 has joined #openmrs
22:04:35 *** tcalder2 has quit IRC
22:09:30 *** ArcTanSusan has quit IRC
22:20:39 *** ArcTanSusan has joined #openmrs
22:21:14 *** burke has joined #openmrs
22:21:14 *** ChanServ sets mode: +o burke
22:21:22 *** ryates has joined #openmrs
22:21:22 *** ChanServ sets mode: +o ryates
22:21:28 *** akwatuha has joined #openmrs
22:22:07 *** downey has joined #openmrs
22:22:07 *** ChanServ sets mode: +o downey
22:22:16 *** suranga has joined #openmrs
22:27:43 *** mseaton has joined #openmrs
22:27:43 *** ChanServ sets mode: +v mseaton
22:50:27 <robbyoconnor> soo burke I shall see you :)
23:35:09 *** portablejim has joined #openmrs
23:35:09 *** portablejim has joined #openmrs
23:42:12 <jblaya> nribeka, do you know where the user default location and default locale are stored?
23:42:17 <jblaya> I can't find them anywere
23:42:34 *** ArcTanSusan has quit IRC
23:43:10 *** ArcTanSusan has joined #openmrs
23:45:01 <jblaya> nribeka, never mind, I didn't see it in user_property because I didn't have a user with a location selected, sorry
23:53:24 <nribeka> cool :)