Mifos Development Environment Setup

–To setup db:
-change db details in build.gradle and also create db inmysql
default db details root/mysql
-change db connection details in C:\Dkreators\Mifos\fineract\.travis.yml
-run the following command
>>
C:\Dkreators\Mifos\fineract>gradlew migrateTenantListDB -PdbName=mifosplatform-tenants
>>
C:\Dkreators\Mifos\fineract>gradlew migrateTenantListDB -PdbName=mifostenant-default

>>
C:\Dkreators\Mifos\fineract>gradlew clean tomcatRunwar

My Symfony Journey

Step 1
I installed appache using this link

Step 2
I installed PHP using this link

Some terms I came accross were
1. pecl
2. xdebug
3. igbinary
4. redis
5. Composer
6. Docker
7. Docker Composer

Paths exported
export PATH=$PATH:/usr/local/Cellar/php@7.2/7.3.16/bin/
export PATH=”$HOME/.symfony/bin:$PATH”

Installed amqp with this link.

This screenshot validates installation

Tools Used in Development
1. Docker
2. Redis
3. Postgresql
4. RabbitMQ
5. RabbitMQ UI
6. MailCaches
7. Symfony CLI
8. Yum
9. Webpack
10.Composer

Could not get deployment to the production server right first time, I was getting the following error:

A name for this machine: [MacBook-Pro-7.local]
Received JWT is not valid: square/go-jose/jwt: validation field, token issued in the future (iat)

Your username or email address:
I had to ignore the use of SymfonyCloud and then continue to deploy on my local server.

Creating a Controller
->symfony composer req maker –dev
adding –dev ensures it is only used in production

I created the config for the database in the newly created docker-compose.yaml file
version: ‘3.3’
services:
database:
image: postgres:11-alpine
environment:
POSTGRES_USER: main
POSTGRES_PASSWORD: main
POSTGRES_DB: main
ports: [5432]

Beginners Learning Java Part 1

So I have just decided to create a blog post as a diary for my guidance for beginners that want to learn Java. I Shall be posting and updating progress as classes go with my new students.

Criteria: You must have a laptop and be on WhatsApp
Follow @simpleefied2013 on twitter and send a message to enroll.

Task 1
Ensure they have Java installed on their laptops (using the almighty Google). Please leave a comment if you have been able to do that or if you are having any challenges.

Task 2
Set the path and classpath for Java on your machine.

Task 3
Check your installation is correct by issuing the following command on your cmd
> java -version
Post your result in the comment section.

Jasper Reports with T24 Jbase

Hello all,

Today we shall be looking at how to generate a simple pdf report from T24 on Jbase with Jasper.  This report retrieves the Mnemonic, Sector and Industry from the Customer table.

Although it is required to have a knowledge of Java to be able to follow this tutorial, contributions and questions would be highly appreciated.

You as a reader might decide to achieve this your own way and this would mean that you do not have to follow this tutorial if you have a better way 🙂

Lets get started.

Step 1: Create a java class that connects to jbase and performs all the other magic acts

This can be achieved by using any favourite IDE of yours and this tutorial will not be based on any particular IDE. The code snippet of the main class is pasted below.

==============================

package newjsp;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;

public class Main {

Connection conn;

public void generateReport() {

try {
Class.forName(“com.jbase.jdbc.driver.JBaseJDBCDriver”);
//This is where you specify the credentials of the database you are connecting to.
conn = DriverManager.getConnection(“jdbc:jbase:thin:@localhost:9494:R09″,”R09″,”123456”);
System.out.println(“Connected…”);
System.out.println(“Loading Report Designs”);
InputStream input = new FileInputStream(new File(“resources/report3.jrxml”));
JasperDesign jasperDesign = JRXmlLoader.load(input);

System.out.println(“Compiling Report Designs”);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);

System.out.println(“Creating JasperPrint Object”);
Map<String, String> parameters = new HashMap<String, String>();
parameters.put(“ReportTitle”, “PDF JasperReport”);

System.out.println(“Filling Report to File”);

JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, conn);
//System.out.println(“Sector is “+ conn );
//Exporting the report
OutputStream output = new FileOutputStream(new File(“resources/customer.pdf”));
JasperExportManager.exportReportToPdfStream(jasperPrint, output);

System.out.println(“Report Generation Complete”);
conn.close();
} catch (FileNotFoundException e) {
} catch (JRException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
}
}

public static void main(String[] args) {
new Main().generateReport();
}
}
=====================================
Before moving on there are some things that you need to do so as to be able to run the code in step 1 above successfully

1. If you are making use of some extra classes, make sure they have been placed in the right packages in the project and they are error free.
2. You may need to add some jars to your project and one of them is the jdbc jar which should come with your jbase package.

3.Make sure the agent in the database environment specified is running and this can be done using the command “jbase_agent p- <port number> ”

4.You can place your questions if you are still having any other problem apart from the ones mentioned above.

Step 2: Create an xml file to be used for the formatting and retrieval of the needed information

This xml file may be created manually or created using tools like Ireport and some others. The fact is just that you should know what you want.

After creating the xml file, save it as a “.jrxml” file and you do not need to compile it to a “.jasper” file

Then specify the link to where you have placed the xml file in your java code. as in step 1.

The xml file used for this tutorial is pasted below.

==================

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE jasperReport PUBLIC “//JasperReports//DTD Report Design//EN”
“http://jasperreports.sourceforge.net/dtds/jasperreport.dtd”&gt;
<jasperReport name=”CustomerReport_TeejayT24″>
<queryString>
<![CDATA[SELECT * FROM FBNK.CUSTOMER ]]>
</queryString>
<field name=”MNEMONIC” />
<field name=”SECTOR” />
<field name=”INDUSTRY” />
<title>
<band height=”50″>
<staticText>
<reportElement x=”0″ y=”0″ width=”180″ height=”15″/>
<textElement/>
<text><![CDATA[Jasper Report – Teejay]]></text>
</staticText>
<staticText>
<reportElement x=”0″ y=”30″ width=”180″ height=”15″/>
<textElement/>
<text><![CDATA[Mnemonic]]></text>
</staticText>
<staticText>
<reportElement x=”140″ y=”30″ width=”180″ height=”15″/>
<textElement/>
<text><![CDATA[SECTOR]]></text>
</staticText>
<staticText>
<reportElement x=”200″ y=”30″ width=”180″ height=”15″/>
<textElement/>
<text><![CDATA[INDUSTRY]]></text>
</staticText>
</band>
</title>
<detail>
<band height=”30″>
<textField>
<reportElement x=”0″ y=”0″ width=”69″ height=”24″ />
<textFieldExpression>
<![CDATA[$F{MNEMONIC}]]>
</textFieldExpression>
</textField>
<textField>
<reportElement x=”140″ y=”0″ width=”69″ height=”24″ />
<textFieldExpression>
<![CDATA[$F{SECTOR}]]>
</textFieldExpression>
</textField>
<textField>
<reportElement x=”200″ y=”0″ width=”69″ height=”24″ />
<textFieldExpression>
<![CDATA[$F{INDUSTRY}]]>
</textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>

================================

Step 3: Make sure all your codes have been compiled and then run it.

A pdf report will be produced in the location you have specified in your program with the retrieved report. A sample of the generated report is as shown below.

Sample pdf report generated

That is all about this tutorial.

Please note that you can also generate any other type of report as supported by JasperReports, this tutorial is based mainly on pdf report generation.

Thanks for following the tutorial and i would also like to acknowledge the works of Suhas on jasper reports

Thanks and Regards.

← Back

Thank you for your response. ✨

sdk version No command ‘sdk’ found

Got this error while trying to install sdkman on ubuntu:

root@ubuntu:~/.sdkman/bin# sdk version
No command ‘sdk’ found, did you mean:
Command ‘skk’ from package ‘libskk-dev’ (universe)
Command ‘sds’ from package ‘simh’ (universe)
Command ‘sak’ from package ‘seqan-apps’ (universe)
Command ‘sd’ from package ‘sd’ (universe)
Command ‘sdc’ from package ‘hpsockd’ (universe)
Command ‘fdk’ from package ‘plastimatch’ (universe)
Command ‘sdf’ from package ‘sdf’ (universe)
Command ‘sdb’ from package ‘sdb’ (universe)
sdk: command not found
root@ubuntu:~/.sdkman/bin# apt-get update

I issued the following command and it resolved the error:
sudo apt-get install unzip
sudo apt-get install zip
sudo apt-get install sed

and then i reinstalled sdkman
curl -s “https://get.sdkman.io&#8221; | bash

All was fine.

root@ubuntu:~# sdk version
==== BROADCAST =================================================================
* 09/04/17: Maven 3.5.0 released on SDKMAN! #maven
* 06/04/17: Java 9ea+163 for Mac, Windows and Linux 64 released on SDKMAN! #java
* 04/04/17: Gradle 3.5-rc-3 released on SDKMAN! #gradle
================================================================================

After some time, I was trying to install grails 3.2.8 and then i got this:
root@ubuntu:~# sdk install grails 3.2.8

Downloading: grails 3.2.8

In progress…

0.9%
curl: (56) GnuTLS recv error (-54): Error in the pull function.
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /root/.sdkman/archives/grails-3.2.8.zip or
/root/.sdkman/archives/grails-3.2.8.zip.zip, and cannot find /root/.sdkman/archives/grails-3.2.8.zip.ZIP, period.

Stop! The archive was corrupt and has been removed! Please try installing again.
root@ubuntu:~# sdk install grails

Solution:
==========
I installed grails 3.2.7 instead.
SDKMAN 5.5.8+227

Life is easier with QR Codes

You are welcome once again to today’s information session. I will start by asking if you have a smart phone?
If your answer to my question is yes it is most likely that you have never used it to scan a QR Code.

What is a QR Code(QRC)?

QRC stands for Quick Response Code and in simple terms It is a way of encoding information such as website links or web systems
so that other devices such as smartphones can gain easy access to the system. You still do not understand? Okay, i will give an example.
Let us assume you run a business that has a website and you want your clients to be able to visit your website through their smartphones; there are two ways i can think of right now of achieving such:

1. Giving them the link to your website(by mouth, on paper and through SMS/email) and then they copy and paste that on
the browser application on their smartphones (mozilla firefox, internet explorer and several others) to be able to view your website.

2. Giving them a thank you note that has printed on it a QR Code.

Despite the fact that many may be used to the first method, I definitely see the second as a faster, easier and a more professional option. First is because it will enable you direct the client at every point in time to what you exactly want them to see on your website. In this case if you want them to respond to a question, they do not need to click a question button by the side when they get to the site, the code takes them straight to the question or the item you want them to see at that particular point in time.

How do i read a QR Code?

You can read a QRC using the following simple steps:

1. Download and install a QR code reader from the respective app store.
For android smartphones you should be familiar with an image like the one shown below.

Scan QR
http://www.wikihow.com/Scan-a-QR-Code

2. When the QRC reader is launched, place your phone camera against any QR Code be it on your computer or on paper and your phone will automatically read and interpret the code.

http://www.wikihow.com/Scan-a-QR-Code
http://www.wikihow.com/Scan-a-QR-Code

Do you want to grow your business by using this technology? Would you like to have it as a free version or you do not mind paying? Get your your comment and feedback across.

← Back

Thank you for your response. ✨

unsupported major.minor version

Yet another time to look into the resolution of another uncommon type of error encountered in the java world, the ‘unsupported major.minor version’ error. This error majorly occurs during run-time when the java version that was used to compile a java code into a class is different from the java version being used at run-time.

The solution as has been described in this post is to check for the version of the java being used at run-time and make use of the same java version when recompiling your java code (i used the netbeans IDE). Lets take an example of the error message in this way:

unsupported major.minor version 51.0

This message is simply saying the the java version needed is 1.5 and this is contrary to the version found in your application.

How do we resolve the error using the netbeans IDE.

1. Make sure the project is selected in netbeans and then press the ‘F11’ key, it should give you a box as shown below.

netbeans f11

2. Click on Project Properties in the above box, it should give you the box below

netbeans jdk change

3. Change the Source/Binary format (right at the lower part) to the one required and click the ‘ok’ button to save your changes, here I have changed it to version 1.5 as specified in the error. The warning message below should be ignored:

warning: [options] bootstrap class path not set in conjunction with -source 1.6

1 warning

4.You can then recompile and go run your application again.

Life Lessons and morals: 5 stories from the Yoruba language and culture

Life Lessons and morals: 5 stories from the Yoruba language and culture.