Encoding of an asterisk is invalid. The asterisk is the start-stop-character which is added automatically by zxing. If you try to encode "*1234*" it will be encoded as "**1234**". Every decoder stops after reading the second asterisk.
In your case you should call the method as follows:
BitMatrix code39 = new CodeWriter()
code39.encode( "1234", BarcodeFormat.QR_CODE, 150, 50);