The guide does not assume that the reader has any previous experience with SugarCRM, MySQL or Storage 7000 and hence builds the setup from scratch. More specifically, the guide walks the reader through the following simple steps -

Creating and Configuring a project on Storage 7000

Setting up NFS and iSCSI Targets on Storage 7000

Using the Storage 7000 Targets on your Client

Installing MySQL

Installing SugarCRM; and finally

A Bit of Testing to make sure it works

Comments, suggestions and queries on the how-to guide most welcome here.

Inform the ADempiere community that ADempiere on MySQL is soon going to be a possible deployment option

To set the expectations right, not all the source code required to run Adempiere on MySQL is currently publicly available. I'll update the repository location as soon as the code is made available.

Why MySQL?

Implementing
and deploying a new stack or component in it is a costly proposition.
A new component increases the costs and complexity of the existing
architecture non-linearly. Extra costs must be borne in software
licenses, hardware purchases, maintenance, training and wages. Quite
unsurprisingly companies want to spread fixed costs of servers and
wages across various products. (For those who are wondering whether
these really are fixed costs, welcome to SMB sector!) These companies
therefore look for solutions that fit in their existing stack.

MySQL, the
internet db, needs no introduction. A large number of companies have
MySQL deployments. When these companies start looking for an Open
Source ERP application, they obviously would want to go with an ERP
that has the backing of a strong community and is based on the same
stack as they are currently using. Whereas Adempiere definitely meets
the first criterion, the second one may not always hold true. This
blog aims at introducing one more option while deploying Adempiere .

Adempiere on MySQL - a first look

Once you get
Adempiere to run on MySQL, there is no way to tell any difference
between Adempiere running on MySQL and Adempiere running on one of
the other supported database. Here is how the installation screens look like -

Installation Screen -

This is how the Adempiere screens look like - of course the user does not get to see any changes at the application level. It's only on the Adempiere Connection window that the MySQL connection needs to be mentioned.

Steps for Running Adempiere on MySQL

For running Adempiere on MySQL and Glassfish, you need to

Install and prepare MySQL

Check out the mysql branch source code of Adempiere. You need to build this source code to get a MySQL ready installation file.If you are using Netbeans, the good news is that ADempiere is now a Netbeans project. This means that you can check out the code and just press the build button to get the installer file.Note - the code is not yet checked in. As soon as the code becomes ready, I'll update this entry with the repository location.

Install Glassfish. If you are running OpenSolaris, you may want to glance over this document.

As noted earlier, the source code location is not available now. So the second step will be outlined and details will be updated a bit later.

Preparing the DB

Install MySQL, preferably as a service or as daemon. Do remember the root password, it will be used time and again. In case you mess up with the password, the clean up act is quite easy. Refer this link.

The key point to note here is that for MySQL 'adempiere'@'localhost' is different from 'adempiere'@'\*'

Import the Adempiere mysql dump. This dump location is not finalized yet, I'll update this point.

Changing ADempiere source code

Well, I am not going to talk of the numerous Java source code changes (mostly in query formation) that have to go into the source code. Instead, I am going to check-in the modified source code in branch in the main repository and let you know the location. I'll provide the repository location as soon as the code is committed. There are some formalities that are delaying the code check-in.

But the bottom line is on building the source code you will get a installer zip and tar.gz file which you can use to install MySQL enabled Adempiere.

Verifying that it works

I've tested the Adempiere on MySQL and Glassfish installation on the following platforms and got satisfactory results -

Tuesday Jun 23, 2009

The objective of this guide is to document the steps required to run
Adempiere, the thick and thin clients on OpenSolaris 2008.11 and
2008.05. This work verifies that Adempiere works on OpenSolaris 2008.11
and 2008.05. The guide documents the steps required to prepare
Postgresql on OpenSolaris 2008.11 and 2008.05 for working with
Adempiere. Further, the steps required to deploy Adempiere to Glassfish
v2 running on OpenSolaris 2008.11 and 2008.05 are presented.

Monday Jun 22, 2009

AdempiereAddon is an Open Office addon for Adempiere. The project
contributes to the ADempiere community in two major ways :-

The project exposes the ADempiere business objects as services.

The project allows the ADempiere users to reap benefits of the rich features
of OpenOffice.org.

Both these subprojects are the first of their kind.

This is not the end. It is not even the beginning of the end. But it
is, perhaps, the end of the beginning. Now, before I am accused of
plagiarism I must point out that these are Churchill's words from a 1942 speech.

Details of AdempiereAddon

The Addon is known to work on OpenSolaris 2008.05, OpenSolaris 2008.11, Windows XP, Windows 2003 Server and Ubuntu 8.04. Further, it works with both Star Office (9 and above) and Open Office (2.4 and above).

To know more about the addon visit - https://adempiereaddon.dev.java.net/

Saturday Apr 04, 2009

JQuantLib, founded by Richard Gomes in September 2007, is a qunatitative finance library written in Java. The library is remarkable in many ways, one being the use oAf Java, something quite uncommon in the world of Quantitative Finance. This blog introduces integration of JQuantlib with Open Office. The other approaches of making JQuantlib easy to use are listed and briefly analyzed. The functionalities available in version 0.1 of the Calc plugin are detailed next. Most of the functions available now are elementary. It is hoped that once the code is committed, the community will take the plugin forward to make the experience of JQuantlib users more useful and pleasurable.

Tuesday Sep 16, 2008

SummaryLack of Web services in Adempiere has posed a lot of difficulties in seamless integration of Adempiere with other enterprise applications. In this blog, I am outlining an extensible, customizable and a tested approach to access Adempiere's business objects programmatically.

Friday Jul 25, 2008

As of this writing, JBoss is the only application server that runs
ADempiere. As a part of the organic evolution of the product, it is only natural that Glassfish be added to the list of supported application servers. Here is the first step in that direction.

Once you complete the steps outlined here, you will be able to run ADempiere on both Glassfish and JBoss. Based on the performance of the two application servers, you can then decide which one to take to production.

Lethargy Overcome

So, here comes something which has long been overdue. Nearly a couple months back, I finished investigating the changes required to make ADempiere run on Glassfish. But writing web services for ADempiere kept me so busy that I kept postponing this blog. One positive outcome of this torpidity is the thorough testing of ADempiere on Glassfish. I am yet to find any feature that runs differently on Glassfish. BTW, if you have any problems in running ADempiere on Glassfish, mail me. I am much faster in responding to mails than in writing blogs.

Prerquisites

Since the changes described here are not yet integrated into the code repository, we will need to modify the code ourselves to make Adempiere run on Glassfish. Good thing is you don't need to make a whole lot of changes to the Java code. But, before you start, make sure that:

You have read blog 1, blog 2 describing how to use ADempiere code inside Netbeans.

Checked out ADempiere code and have an Adempiere project in Netbeans. In case you want to remote debug, this might help you.

Goes without saying you also need one of the supported databases with ADempiere data (Adempiere_pg.dmp) loaded in it.

Since, I have not been working on this project for sometime, I didn't get a chance to test the work on the latest releases of Glassfish and ADempiere. Hence, I would strongly recommend checking out the 340 branch rather than trunk. Also, get Glassfish V2 UR2 rather than the latest.

Source code changes required

Changes to Java files

Fortunately, there are no significant changes in java files. There are just two files you need to modify. All java changes are in install/src/org/compiere/install folder. You can download this zip and put the contents in install/src/org/compiere/install. The two files that are changed are

install/src/org/compiere/install/ConfigGlassfish.java :Add this file. For now, the lines 63-69 have been commented. This means that checking of your deployment directory has been disabled for now.

Changes to XML files

Unfortunately, a larger number of xml files need to be patched. Some of the deployment descriptors need to be upgraded to version 2.4. A couple more need to change to conform with Glassfish.Again, as with java files you can download the set of changed files as a zip and either place each one of the changed files in the appropriate directory or just copy all the contents in your trunk folder. Here is the list of changed files:

trunk\\lib\\adempiereAll.xml

trunk\\adempiere\\adempiere\\lib\\adempiereAll.xml (you would not need to change this if you changed the one above and did
a complete build)install\\build\\adempiere\\lib\\adempiereAll.xml
(you would not need to change this if you made proper changes in the first step and did
a complete build)

install\\Adempiere\\build.xml: Line 404 has a comment, the target setupGlassfish is yet incomplete.

Tuesday Jul 22, 2008

Perhaps, remote
debugging can't get any simpler than this. Apart from introducing the
debugging aspects, this blog also demonstrates the seamless integration
of ADempiere, Glassfish and Netbeans.[Read More]

Wednesday Apr 30, 2008

This blog is in continuation with the part 1 of the blog and explains how to compile and run ADempiere from Netbeans. Running and installing Adempiere in Netbeans is even simplere than project creation.

Setting the right JDK

As indincated in part 1 you need to run Adempiere on JDK 1.5. This may not be your default platform as many developers might be using the latest JDK. All you need to do to fix this is install JDK 1.5 (Refer part 1), and go to project view of adempiere, right click and go to Properties. Now go to Java sources classpath -> Manage Java Platforms -> Add platform and browse to you JDK 5 installation. Close the dialog box.

Now just select JDK 1.5 as the Java platform.

Dissecting build.xml

As you might know, the default build script in the main folder calls the build files in the subdirectories. The default target of the main build file is "complete" which depends on "build" and "install". The build target creates all the Adempiere jars by calling the "jar" target in all the subdirectories. The end product of the build target is the platform-independent, installable Adempiere zip file.

The "install" looks a bit messy, from the commented code it appears as though it was originally intended to launch "Run_Setup.sh" but currently it does not do anything more than unzipping the file created in the build process. To make the best use of your Netbeans development environment uncomment the following code in the "install" target:

Building Adempiere

Building Adempiere in Netebans is extremely tricky. Are you really ready for the challenge?

So here is what you need to do: Push the Clean and Build button!!! That's all to it.

Running and Installing Adempiere

Assuming that you uncommented the code in install target of build.xml, you can run and install Adempiere from Netbeans by simply associating your Run button in Netbeans with the install target.

Netbeans does not know which target to run when the "Run" button is pressed because the main build file does not have any target by the name "run". When you press the Run button for the first time, you will see a dialog box asking you to associate an existing target with the "Run" button. Choose "install" target there.

Now when you run the project you would be asked if you want to run the setup. Say 'Y' if you want to install from Netbeans. If you chose to install, you would get a the familiar Run_Setup screen as shown in the image below.

Monday Mar 31, 2008

Last autumn when the Sensex soaring, I performed and reported the results of efficiency tests on Sensex. The techniques used include - Unit roots test, Q statistic, Dickey Fuller, Augmented Dickey Fuller and Variance Ratio Tests. The results can be found here.

Results of experiments of seasonality models on Indian markets can be found here.

About SugarCRM

Need introduction to SugarCRM? Sad and bad!! To begin with you can read SugarCRM on Wikipedia. Even before looking at the features of SugarCRM, just take a peek into their visionary thinking. (Source and reference: SugarCRM website)

Right on!! SugarCRM provides clients with options of on-demand solution as well as on-premise solutions. That's not all. There are two on-premise, behind-firewall solutions - SugarCube and Sugar On-Site allowing the clients to deploy CRM solutions differently depending on their IT capabilities and organizational strengths. As a short digression, I would like to point out that a silent cold war has been raging in the CRM space. The on-demand solutions have been the buzzword for a while. But, many organizations may be left wondering whether customer-assets should lie with a third-party. Whereas, the small and medium sector may have little choice, these companies have to take a decision when their fight for survival is over. SugarCRM is well placed to take advantage of this situation. The flexibility of solutions provided may be a major attraction. Last, but not the least, nobody is doubting the value of on-demand solutions. See this blog on successforce community.

Integration with OpenDS

The problem that we are going to address in this section - How to use OpenDS for authenticating and provisioning Sugar users. Like most OpenDS and SugarCRM taks it's simple and straight forward.

To start with, enable php-ldap module. Well, if that does not mean anything to you, it was intended to be that way. Open the php.ini file located in your php directory of the installation. Search for the line that says ";extension=php_ldap.dll" (Of course, .dll would be under windows, for UNIX it would be .so) and just remove the ';' at the beginning. The line would now be "extension=php_ldap.dll". Now restart the server. If you fail to do this step, you would get an error similar to the one shown below:

Prepare and import your user data into OpenDS.

OpenDS can be started using the start-ds utility. The first thing you would want to do after starting OpenDS is to import data.

For importing large data sets into OpenDS, read the instructions here. In case the existing data is not in ldif format, makeldif tool should be used. To import data which is in ldif format, import-ldif tool can be used. The output of makeldifcan be used with import-ldif to import data into server.

Alternately, ldapmodify can
be used to import LDIF file. This is what we are going to do in this
example. To add a user, the small LDIF file shown below is used.

Also, the ldapsearch utility can be used to search existing entries in the OpenDS server.

Login as admin. Goto Admin -> System Settings

Go to LDAP authentication support and tick mark. The image below shows an example of entries that would work with data that was fed to OpenDS in item #2. Note that it's critically important to tick mark the Auto Create Users checkbox.

That's all to it!!. New users already having entry in OpenDS can now start using SugarCRM.

Tuesday Mar 25, 2008

This report examines the efficiency of Indian Equity Markets when they were in a bull run. The statistical results are inconclusive but the forecasting accuracy of some of the techniques is incredible.

Some of the conclusions that can be drawn from this work are:

News is the key driving factor in any stock market. The inherent randomness of the prices comes from the unpredictable flow of information. Market participants may react differently to the same information and may struggle for a while before an equilibrium is reached. This partly explains the high volatility in the opening and closing hours.

As far as econometric analysis goes, there is absolutely no need to consider the high, low, open and close series separately. They have the same information content. Picking up one of these and consistently will yield the same results.

Important stock indices move in unison. That is there is hardly any arbitrage oppurtunities across indices. This implicitly implies efficiency of the markets. The important indices are cointegrated. This means that there is same underlying data generating process affecting all the markets simultaneously. This data generating process has to be flow of information.

In spite of the fact that indices are cointegrated and fast to react, the investors may benefit from the continuity of the series. This may be compared to inertia associated with mass.

Stock prices are “continuous” series in the sense that prices hover around the past prices except under extremely unusual conditions. This clubbed with the efficient market hypothesis gives a lot ofcredibility to random walk model.

Random Walk can never be used to make any profits at any point in time. This is easily the poorest forecasting technique. In the last 10 years and across five major indices, there was never ever a single instance when this model forecasted correctly.

The Q statistic at various lags confirms that the null of no serial correlation can be rejected for all the indices. This is not in accordance with efficient market hypothesis and is a proof to reject the weak form of efficiency hypothesis.

The unit root tests support the random walk model. But instead of saddening, this should make the speculators happy because it means that the near about range of future prices are known.

The risk assosciated with continuing in the market increases linearly with time. It is five times more risky to remain invested for five days than it is for one day.

The non-trading days are not risk-free but there risk is not same as remaining invested on a trading day. This observation directly follows from the skewness in variance ratios at lags more than five.

The market does have a long term memory. The Hurst Exponent examination tells us that the prices upto more than one lag have significant impact on tomorrow’s price.

The investor must note that on any day a market is as likely to close high as it is to close low. This is a direct result of the runs test. This does not in anyway attack the predictability of the direction, it simply confirms that the market continuously corrects itself and comes to equilibrium.

The above observation is the motivation behind trend analysis. Trend analysis was found to be fruitful only for the price series not for the returns because the returns for the most part are heavily clustered around a mean.

Trend analysis was found to be a superior forecasting technique than random walk model. Whether a market is a random walk or not may interest the academics. For the ordinary investor, trend analysis is much better than random walk.

Quadratic trend analysis is superior to both linear and exponential trending techniques. This suggests a lot of non-linearity in the market prices and is a strong motivation to look for non-linear forecasting models.

Artficial Neural Networks were used to capture the non-linearity in market variables. ANNs proved to be a better forecasting tool than both trend analysis and random walk.

ANNs were found to be quite sensitive to the number of outputs forecast. It is better to predict each output separately. When I tried to simulatenously predict the direction of movement and value of closing pricing, the MAPE and MAD deteriorated as compared to the cases where these variables were forecast separately.

ANNs were able to forecast the shape of the price series quite accurately for upto 70 trading days in future. There was a scaling problem and hence there is a scope to improve upon the MAPE, MAD and MSE numbers.

ANNs are extremely sensitive to nature of scaling function. For optimum results there should be scope for the output to go beyond the current maximum value. This has been a shortcoming of this study.

In sum, the investors can do better than random walk by using these forecasting tools. The outputs from these tools with the subjective and qualtitative assesments (read forecasts), should land the speculator in much better situation than just relying on random walk.

The report can be downloaded from here. Slides of the final presentation are also available.

Of course all your investment and speculative decisions are YOURS. I bear no legal or moral responsibility for your actions.

About Adempiere

Integrating OpenDS with Adempiere

Starting and Configuring OpenDS

OpenDS can be started using the start-ds utility. The first thing you would want to do after starting OpenDS is to import data.

For importing large data sets into OpenDS, read the instructions here. In case the existing data is not in ldif format, makeldif tool should be used. To import data which is in ldif format, import-ldif tool can be used. The output of makeldifcan be used with import-ldif to import data into server.

Alternately, ldapmodify can be used to import LDIF file. This is what we are going to do in this example. To add a user, the small LDIF file shown below is used.

Also, the ldapsearch utility can be used to search existing entries in the OpenDS server.

Starting and configuring Adempiere

Adempiere server is started using RUN_Server2 utility. The client is started using RUN_Adempiere. On starting the client, a screen similar to the one shown below is presented. For now, let us not worry about the User ID and Password, that is what we are going to play around with.