And Todays’s Quote Would Be..

Life begins at the end of your comfort zone.

Neale Donald Walsch

[Mule] Error 400 Bad Request, Request Header Or Cookie Too Large

I had an error yersterday, when connecting Mule ESB to NGinx. Very weird, because somehow it never shown any errors when fired directly without a reverse proxy. Here is the complete stacktrace

<head><title>400 Request Header Or Cookie Too Large</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>Request Header Or Cookie Too Large</center>
  org.apache.cxf.jaxws.JaxWsClientProxy:156 (
3. Response was of unexpected text/html ContentType.  Incoming portion of HTML stream: <html>
<head><title>400 Request Header Or Cookie Too Large</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>Request Header Or Cookie Too Large</center>

It happens because Mule, by default, send a very large cookies called “X-MULE_SESSION”. After removing it, my ESB runs well again. This is how i remove it,

<http:connector name="NoSessionConnector">
	    <service-overrides sessionHandler="org.mule.session.NullSessionHandler"/>

Weird Error on Java Mail, “javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client”

I run into a weird error that never happened before, somehow it happened since my user upgrade their Microsoft Mail Exchange’s version. Here is the complete stacktrace,

Caused by: javax.mail.AuthenticationFailedException: 
No authentication mechansims supported by both server and client
    at com.sun.mail.smtp.SMTPTransport.authenticate(
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(
    at javax.mail.Service.connect(

I guess there are several reasons why it happens. First of all, it happens because im using starttls = “true” despite im connecting to port 25, first i change it into “false”. And the other thing is that im using username and password for connecting to my email exchange server, so the workaround is quite easy, just setting my mail.smtp.auth parameter into “false” instead of “true”. Or try sending email without setting username and password.

But actually, it’s much easier to fix the error on the mail server’s side, because it’s only a simple checklist configuration :-P


Download A Compressed Attachment (Zip, Rar or 7Z) on GMail

I want to download a compressed file that i’ve sent several years ago, but somehow google disabled it, and gives an “anti virus warning”. And it happen for all my email with compressed attachments files, such as .zip, .rar and also .7z.

compressed download

Well, the workaround is quite simple, im opening my email using my Android GMail client , and then save my attachment to Google Drive.


From Google Drive, i can easily download my attachment freely.
google drive

Hopefully it can help other people. :-D


Creating Alphabet Numbering on Jasper Report

Usually jasper report provide a numbering, accessible using REPORT_COUNT variable, but today my friend Edward Barchia asked me something interesting, how can i create a simple numbering using alphabet instead of number. Well basically, it’s actually quite easy.

Below is the image, how i do it.

Here is my complete jasper xml file,

<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="" xmlns:xsi="" xsi:schemaLocation="" name="report1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="97dae3d4-5e81-4825-b4e7-cf3d1f77190f">
	<property name="ireport.zoom" value="1.2100000000000002"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="42"/>
	<queryString language="SQL">
		<![CDATA[select * from testing]]>
	<field name="id" class="java.lang.Integer">
	<field name="name" class="java.lang.String">
	<field name="address" class="java.lang.String">
		<band splitType="Stretch"/>
		<band height="79" splitType="Stretch"/>
		<band height="35" splitType="Stretch"/>
		<band height="20" splitType="Stretch">
				<reportElement x="50" y="0" width="100" height="20" uuid="f68bc18a-5471-4d4f-89ed-34d98bb06b6e"/>
				<reportElement x="150" y="0" width="100" height="20" uuid="155f7ce1-e70c-4d93-8ebc-bad45d9f0ae1"/>
				<reportElement x="0" y="0" width="50" height="20" uuid="48b8e6ef-1efd-4233-98f5-b2da6d273333"/>
		<band height="20" splitType="Stretch">
				<reportElement x="50" y="0" width="100" height="20" uuid="3ffd3edf-b950-4dd9-8f13-ac8942e5bb8e"/>
				<reportElement x="150" y="0" width="100" height="20" uuid="236aec6c-34dc-4a54-ae2d-086c2a23786c"/>
				<reportElement x="0" y="0" width="50" height="20" uuid="704b47d3-7dca-4f33-950a-a3efd0fb764b"/>
				<textFieldExpression><![CDATA["abcdefghijklmnopqrstuvwxyz".charAt( $V{REPORT_COUNT}-1 )]]></textFieldExpression>
		<band height="45" splitType="Stretch"/>
		<band height="54" splitType="Stretch"/>
		<band height="42" splitType="Stretch"/>

[Java] SMS Gateway dengan Modem Zoglab Q2687RD

Baru-baru ini gw dapet kerjaan untuk membuat suatu sistem notifikasi yang terhubung dengan modem SMS, kebetulan modem yang dipakai adalah modem dengan merk Zoglab seri Q2687RD. Awalnya gw pikir menggunakan metode konvensional, menggunaan 7bit sms gateway ala-ala skripsi jaman gw masih kuliah, dan ternyata rada berbeda format AT Command-nya.

Oh ya, sebelumnya ini adalah wujud modemnya. Sekilas agak aneh, karena ada colokan power dibelakangnya tapi waktu membeli engga dapet kabel powernya. Ternyata powernya bisa lewat kabel USB.

modem zoglab

Oke, berikut adalah class java yang gw gunakan untuk testing sending SMS, kebetulan gw menggunakan library RXTXcomm.jar.

package com.edw.commportchecker;

import java.util.Enumeration;

public class Main {

    private OutputStream outputStream;
    private SerialPort serialPort;

    private void doSomething()
            throws Exception {
        Enumeration portList = CommPortIdentifier.getPortIdentifiers();
        while (portList.hasMoreElements()) {
            CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement();
            if (portId.getPortType() == 1) {
                System.out.println("connecting to " + portId.getName());
            // kebetulan modem kedetect sebagai COM3
            if (portId.getName().equalsIgnoreCase("COM3")) {
                this.serialPort = ((SerialPort)"SMSGateway", 2000));

        this.serialPort.setSerialPortParams(9600, 8, 1, 0);

        this.outputStream = this.serialPort.getOutputStream();


        // gunakan prefix +62, contoh : +62856727xxxx 
        // agak aneh nih, sebelumnya tanpa prefix "+" jalan, tapi ditengah jalan tiba2 jadi ga jalan T_T
        String nomerHp = ""; 
        // content sms yang akan dikirim
        String contentSMS = "ini isi sms-nya";



    private void sendToStream(String content) throws Exception {
        System.out.println(">" + content);


        Object o = new Object();
        synchronized ( o ) {

    public static void main(String[] args) {
        Main main = new Main();
        try {
        } catch (Exception e) {