[Mifos-developer] Executable WAR: java -jar mifos.war (MIFOS-4919)

83 views
Skip to first unread message

Michael Vorburger

unread,
Mar 30, 2011, 6:15:58 PM3/30/11
to Developer
Hello!

I've started looking into an "Executable WAR" (java -jar mifos.war) for Mifos.

If you want to follow analysis & development, please watch
https://mifosforge.jira.com/browse/MIFOS-4919.

If you think this is an utter waste of my time, shout STOP! ;-)

Comments welcome.

Regards,
Michael
_______________________
Michael Vorburger
http://www.vorburger.ch

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf

Ed Cable

unread,
Mar 30, 2011, 6:41:44 PM3/30/11
to Mifos software development
Michael,

Exciting to see this - if this could be a solution for production environments, I think it's a big help. Anything we can do to make the installation process easier is a big plus. 

Have you seen what openMRS is doing with their standalone package? 


Ed

Adam Monsen

unread,
Mar 31, 2011, 11:48:41 AM3/31/11
to mifos-d...@lists.sf.net
On 03/30/2011 03:15 PM, Michael Vorburger wrote:
> If you think this is an utter waste of my time, shout STOP! ;-)
>
> Comments welcome.

I think this is interesting and useful!

I also think that getting a war to run is *not* the trickiest part
of starting up Mifos. Most folks are able to download & unzip an
app server, grab a Mifos war, and throw it in the right place.
And the log messages from Jetty and Tomcat are pretty clear if
and why a war doesn't run. But "java -jar mifos.war" would totally
make it foolproof to run the war.

Something else I see as a blocker for many, many folks: connecting to
the database. All of us have run into this at some time or other.
Mifos assumes a database is present, and crashes horribly if it is not.
Wouldn't it be awesome if, instead, a Web page would come up that
would *immediately* say "hey, I can't see the database!" and would
force you to

1. change database settings right there
2. test the connection
3. fix/create your local.properties file (or at least display what
should go into MIFOS_CONF/local.properties)

and *then* start Mifos?

Heck, why can't we have both the war shortcut and the db helper? :)

http://mifosforge.jira.com/browse/MIFOS-4921

Michael Vorburger

unread,
Apr 1, 2011, 12:16:51 PM4/1/11
to mifos-d...@lists.sf.net, Adam Monsen
Ed & Adam,

thanks for the interest! I'll make sure to keep the list informed as I
progress (slowly, few nights here and there).

Adam, re. DB set-up, what if we were even more ambitious... not only
simplify connecting to the database, but actually doing away with the
need for an external DB download/install/config?! Have a look at
http://mifosforge.jira.com/browse/MIFOS-4926 ...
http://dev.mysql.com/downloads/connector/mxj/ ... looks interesting to
me.

Ed or anybody, do we have any contacts in the openMRS dev community? I
have a suspicion that they are actually using exactly this approach
I've (independently) stumbled upon, because Googling for MXJ on Maven
I've (by chance) found their
https://tickets.openmrs.org/browse/TRUNK-2149... I'd love to contact
them e.g. by leaving a comment on that issue and pointing them to
http://mifosforge.jira.com/browse/MIFOS-4927, may be we could join
forces to get MXJ to Maven Central - but unfortunately their JIRA is
locked down and self service account creation is disabled. They may
also have thoughts re. http://mifosforge.jira.com/browse/MIFOS-4928 ?

Best,


Michael
_______________________
Michael Vorburger
http://www.vorburger.ch

Ed Cable

unread,
Apr 1, 2011, 12:23:25 PM4/1/11
to Michael Vorburger, Adam Monsen, mifos-d...@lists.sf.net
Adam,

Could you connect Michael with the appropriate person on openMRS team.  I could reach out to Paul for who would be the best person if Justin or your other contacts aren't available. I'm certain they'd be glad to help

Paul confirmed with me that the standalone package that I linked to before has MySQL embedded.

Ed

Udai Gupta

unread,
Apr 1, 2011, 12:57:59 PM4/1/11
to Mifos software development, Adam Monsen, mifos-d...@lists.sf.net
Bundling MySQL with Mifos.

MySQL is GPL v2 which is not compitable with Apahce License 2.0.

http://mifosforge.jira.com/wiki/display/MIFOS/Adding+Software+To+Mifos

Udai

Adam Monsen

unread,
Apr 4, 2011, 12:33:52 PM4/4/11
to Udai Gupta, Mifos software development
On 04/01/2011 09:57 AM, Udai Gupta wrote:
> Bundling MySQL with Mifos.
>
> MySQL is GPL v2 which is not compitable with Apahce License 2.0.
>
> http://mifosforge.jira.com/wiki/display/MIFOS/Adding+Software+To+Mifos

Nod. You can't combine them at a low-level (ie: compile them together or
embed MySQL in Mifos and call it "Mifos") since the licenses are
incompatible.

Someone *could* create a Mifos "distribution", including Java, Mifos,
the stand-alone MySQL server, Pentaho, and a Tomcat or Jetty application
server. You'd have to pick an architecture and operating system, and
maintenance of this distribution is also a bit tedious.

signature.asc

Adam Monsen

unread,
Apr 4, 2011, 12:34:41 PM4/4/11
to Ed Cable, mifos-d...@lists.sf.net
Ed Cable wrote:
> Could you connect Michael with the appropriate person on openMRS team.

Yep! The best place to find my pals is in #openmrs on Freenode.

signature.asc

Michael Vorburger

unread,
May 12, 2011, 9:30:38 AM5/12/11
to Udai Gupta, Mifos software development, Ed Cable, Adam Monsen
On Fri, Apr 1, 2011 at 6:57 PM, Udai Gupta <mail...@gmail.com> wrote:

> Bundling MySQL with Mifos.
>
> MySQL is GPL v2 which is not compitable with Apahce License 2.0.
>
> http://mifosforge.jira.com/wiki/display/MIFOS/Adding+Software+To+Mifos

Ed Cable just pointed out this out to me via direct email: "OpenMRS
<https://wiki.openmrs.org/display/docs/Running+as+a+Standalone+Application>
hasn't fully thought through that yet but they weren't too concerned
because of this FOSS exception:
http://www.mysql.com/about/legal/licensing/foss-exception/".

I had not found that page when I looked into the matter earlier.
Indeed this "FOSS License Exception" appears to confirm that we
actually *ARE* legally be allowed to use (embed) Oracle's MySQL ...
"MySQL Connectors" including the
http://dev.mysql.com/downloads/connector/mxj/ 'MySQL Connector/MXJ' in
question here into Mifos!

If anybody has strong objections, please speak now. Otherwise I'll
assume "approval", and (time permitting!) look into
http://mifosforge.jira.com/browse/MIFOS-4926. First I'd need to get
http://mifosforge.jira.com/browse/MIFOS-4919 done anyways. If anybody
wants to take over / actively collaborate on either, please contact
me...

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay

Adam Monsen

unread,
May 13, 2011, 11:17:32 PM5/13/11
to Michael Vorburger, Ed Cable, Udai Gupta, Developer
I inquired with Oracle sales/support whether or not Connector/MXJ
falls under the FOSS license exception. I couldn't find anything
online that said for sure either way. I'll share my findings.

One thing I notice is that the Connector/MXJ is about 200M in a
.tgz. So, add that to the existing download. Kinda big, but probably
still reasonable with today's disk space and bandwidth. Especially
given the added ease in configuration/installation. Can't put a
price on that. :)

On 05/12/2011 06:30 AM, Michael Vorburger wrote:

signature.asc

Edward Cable

unread,
May 13, 2011, 11:24:54 PM5/13/11
to Adam Monsen, Michael Vorburger, Udai Gupta, Developer
Adam,

Per earlier conversations with Michael I've also reached out to SFLC and will share response in lists as well as the issue.

Ed

Adam Monsen <amo...@grameenfoundation.org> wrote:

Adam Monsen

unread,
May 19, 2011, 11:48:37 AM5/19/11
to Developer, Ed Cable

Hi Adam.

 

I saw you emailed our Sales Support alias and had a question.

 

Does Connector/MXJ fall under the FOSS license exception?

 

Here is a link that should answer most of your questions.

http://www.mysql.com/about/legal/licensing/foss-exception/

 

Strictly speaking Connectors do not qualify for FOSS exception:

 

The FOSS License Exception does not apply to Oracle’s MySQL dat! abase server or any Oracle or MySQL software other than the GPL-licensed MySQL Client Libraries. 

 

Hopefully this helps.  Please let me know if you have any questions.

 

PatB.

 

--
Oracle
PATRICK BOLGER | MySQL Corporate Sales Representative
Phone: +1 7203989040
Broomfield, Colorado

! e-mail: patrick....@oracle.com

 

signature.asc

Michael Vorburger

unread,
Jun 6, 2011, 7:39:45 PM6/6/11
to Developer, Udai Gupta, Adam Monsen
Hello,

the mySQL GPL licensing mess apart for now, I've recently spent 2-3
nights moving forward with MIFOS-4919 for an "executable WAR" (java
-jar mifos.war) anyways - let's deal with the DB separately in another
JIRA such as MIFOS-4926 or MIFOS-4921 later, and finish up MIFOS-4919
first.

The hudsonBuild-MIFOS-4919_ExecutableWAR-Squashed branch has my
proposal for this - please review using e.g.
http://mifos.git.sourceforge.net/git/gitweb.cgi?p=mifos/head;a=commitdiff;h=10260c483837f5c26f96f7e4faba7042c33b076e
if interested.

Trouble is, and what I need help with: New
MifosPackagedWARBasicTest.testPackagedWARStartup works locally for me,
but fails on Hudson - because it can't find the DB. Adam confirmed
that there is indeed a ~hudson/.mifos/local.properties on birch - does
anybody have any idea why the "normal" (integration/acceptance) tests
that use the DB all pass on Hudson, but my new ones doesn't? Do they
do something special to configure DB? I'm confused.

Actually something more general seems very wrong with
https://ci.mifos.org/hudson/job/head-hudsonBuild/ - the
MifosPackagedWARBasicTest.testPackagedWARStartup should
SocketC...@0.0.0.0:4847 but instead uses port 7077 instead on
https://ci.mifos.org/hudson/job/head-hudsonBuild/1617/console - that
would happen if old code without my stuff was used... it's as if
Hudson got mixed up code and used from head while trying to build from
my branch? Indeed, while the head-master-commit installs to
/home/hudson/hudson-home/jobs/head-master-commit/workspace/.repository/,
the head-hudsonBuild installs directly to /home/hudson/.m2/repository/
- that can't be right?!

Best,
Michael
_______________________
Michael Vorburger
http://www.vorburger.ch

On Thu, May 19, 2011 at 5:48 PM, Adam Monsen
<amo...@grameenfoundation.org> wrote:


> On 05/13/2011 08:17 PM, Adam Monsen wrote:
>> I inquired with Oracle sales/support whether or not Connector/MXJ
>> falls under the FOSS license exception. I couldn't find anything
>> online that said for sure either way. I'll share my findings.
>

> According to Oracle, Connectors do *not* qualify for the FOSS
> exception.
>
>

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev

Michael Vorburger

unread,
Oct 13, 2011, 4:32:38 PM10/13/11
to Developer, Udai Gupta, Adam Monsen
Mifosers,

My "Executable WAR" stuff is, hopefully, finally finished and ready
for merge into master - now including actually working tests (don't
ask why it took forever).

Please code review proposed final patch on
hudsonBuild-MIFOS-4919_ExecutableWAR-Squashed2
(http://mifos.git.sourceforge.net/git/gitweb.cgi?p=mifos/head;a=commitdiff;h=9a171b4dcd11b98eadac985382a5a84e07de5fb0)
and shout if you have any issues with this approach - actually even
better go right ahead and fix what you don't like on that branch if
you like - no offense taken. Without hearing anything from anybody,
I'll merge it into master in let's say... one week?

Here is how it works: If you build that branch, you'll find that the
war/ module now packages two WAR files: the mifos-TEMP-nonexec.war
(which is the same as the one before), and the mifos-exec.war (81 MB
instead of the previous 76 MB; this mifos-exec.war is the ultimately
the final mifos.war artifact that gets deployed into Maven and bundled
in the mifos-${env.BUILD_TAG}.zip). For simplicity's sake and to avoid
any end-user confusion, I suggest that only that new one shall be
distributed as mifos.war, not two different ones. One could then start
Mifos, without requiring an external Jetty (or Tomcat 7.0), simply via
:

java -Xmx1024m -XX:MaxPermSize=256m -jar mifos.war 9090

The last (and only) CLI arg is the HTTP port. Configuration is "as
usual" (http://mifosforge.jira.com/wiki/display/MIFOS/Mifos+Configuration+Locations),
nothing changes about that with this approach.

The same mifos.war works, of course, still like a "normal" WAR that
can be deployed into a "classic" (non-embedded) external Jetty
container.

Best,
Michael

PS: I wish I had some smart idea how to avoid the -Xmx1024m
-XX:MaxPermSize=256m ... but short of forking another JVM or something
like that, addressing that leads into the launcher/installer
discussion; and I suggest we treat that as next step but separate
issue (closing MIFOS-4919 when the basic executable WAR is on master)
in a new thread - may be somebody else (student volunteer?) would like
to pick that up and build it on top of my contribution? C.f. our
earlier discussion on
http://groups.google.com/group/mifosdeveloper/browse_thread/thread/65a8a6ede5f8a953
... my personal favorite (now having the executable WAR) would
probably be the http://launch4j.sourceforge.net route there.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
Mifos-developer mailing list
mifos-d...@lists.sourceforge.net
Unsubscribe or change settings at:
https://lists.sourceforge.net/lists/listinfo/mifos-developer

Michael Vorburger

unread,
Oct 29, 2011, 3:12:27 PM10/29/11
to Developer
Hello,

thanks to overwhelming responses (none) from everybody ;-) on my post
requesting review 2 weeks ago, I've just now finally merged this to
master, and propose to close
http://mifosforge.jira.com/browse/MIFOS-4919.

Usage as explained in previous post - let me know if any doc on Wiki
or INSTALL or anything would be needed, and if any of you would be
willing to create that?

Best,
Michael

PS: Now next on with http://mifosforge.jira.com/browse/MIFOS-5157 (any
volunteers to help with that?), and
http://mifosforge.jira.com/browse/MIFOS-4926 (I'm still hoping the
legal question surrounding MXJ can be solved; waiting for a response
from somebody).

---
Michael Vorburger
http://www.vorburger.ch

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev

Ryan Whitney

unread,
Oct 31, 2011, 11:24:58 PM10/31/11
to Mifos software development
Michael,

Let me just say this is awesome! :) I'll be happy to do some testing once it's released!

r

---------------------------------------
Ryan Whitney
ry...@greenlikeme.org
US mobile: +1.206.734.5110
global: +1.206.235.4479

“If you wait to do everything until you're sure it's right, you'll probably never do much of anything." - Win Borden


------------------------------------------------------------------------------
RSA&reg; Conference 2012
Save &#36;700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1

Michael Vorburger

unread,
Feb 4, 2012, 6:51:50 AM2/4/12
to Mifos software development
People, please help testing & documenting
http://mifosforge.jira.com/browse/MIFOS-4919 ... thanks!

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2

Ed Cable

unread,
Feb 6, 2012, 11:48:21 AM2/6/12
to Mifos software development
Michael,

I think some of the former can't happen without the latter so I'm working on throwing up some updated documentation to let people know and how to use the executable WAR. 

I'll share any problems I run into while doing that and hopefully once people know how to use the executable WAR we can get some testers. 

Thanks for driving on this again.

Ed

ADMIN

unread,
Feb 6, 2012, 12:58:13 PM2/6/12
to Mifos software development
Tester (me&Gela ) are looking forward to doc.

George

George IBERIA

unread,
Feb 7, 2012, 12:31:12 AM2/7/12
to mifosde...@googlegroups.com, Mifos software development

Dear Michael & Ed,

Where is doc? May be I am looking to wrong place?

We need Mifos Installation Manual based on Jetty for beginners ( like it is for  Tomcat on web site). If manual and installation process will be well organized (clear enough) then it is not a big benefit from EXE. (especially if it will  make update process more difficult).  Once again accept apologies , I am not a programmer and may misunderstood something.

G

Ed Cable

unread,
Feb 9, 2012, 11:35:20 AM2/9/12
to mifosde...@googlegroups.com, Mifos software development
I'm updating this doc. Apologies for the delay - I had to reinstall Mifos and kept getting blocked by a MySQL error. I finally got through the process and can now update the docs.

Ed

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!

The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
Reply all
Reply to author
Forward
0 new messages