IBM MQ Fix Pack 9.1.0.10 Released

IBM has just released Fix Pack 9.1.0.10 for IBM MQ V9.1 LTS:
https://www.ibm.com/support/pages/downloading-ibm-mq-91010

Regards,
Roger Lacroix
Capitalware Inc.

Fix Packs for MQ, IBM i (OS/400), IBM MQ, Linux, Unix, Windows Comments Off on IBM MQ Fix Pack 9.1.0.10 Released

My SimpleLogger can be a Replacement for Log4J

In this blog post, don’t get me wrong, I think Log4J is a great product and I am not trying to discourage anyone from using it.

I have used Log4J v1.x on hundreds of projects for customers and myself. It has always worked exactly as expected. I have never used Log4J v2.x, so I cannot/will not comment on the current security vulnerability that has been discovered.

All of the logging I have configured for use with Log4J has been extremely basic. I use the basic appender and have it write to a file. That’s it. Basically, I am using probably 5% of the available features. So, over time, I have been slowing moving away from Log4J and just using my own simple logger because that is all I have ever needed.

So, this week I spent some time prettying up my SimpleLogger code. It was written in a similar style to Log4J but there is no configuration file for it. The code is thread-safe and can be used in any project that requires simple logging code.

  • public static void setLogFile(String logFileName)
  • public static void setLogFile(String logFileName, String logDirectory)
  • public static void close()
  • public static void setIncludePackageName(boolean flag)
  • public static void setLevel(LogLevel ll)
  • public static void setMaxBackupFiles(int maxCount)
  • public static void setMaxFileSize(int maxSize)
  • public static void setRotationType(LogRotationType rt)
  • public static void error(Object data)
  • public static void warn(Object data)
  • public static void info(Object data)
  • public static void debug(Object data)
  • public static void errorDump(String title, byte[] data)
  • public static void warnDump(String title, byte[] data)
  • public static void infoDump(String title, byte[] data)
  • public static void debugDump(String title, byte[] data)

Here is a simple tester Java program that shows how to use the various methods:

package com.capitalware.logging;

import com.capitalware.logging.SimpleLogger.*;

/**
 * This class will test the SimpleLogger class.
 *
 * @author Roger Lacroix, Capitalware Inc.
 * @version 1.0.0
 * @license Apache 2 License
 */
public class Test_Logger
{
   public Test_Logger()
   {
      SimpleLogger.setLogFile("Test_Logger.log", "C:\\temp\\");
      SimpleLogger.setLevel(LogLevel.DEBUG);
      SimpleLogger.setRotationType(LogRotationType.SIZE);
      SimpleLogger.setIncludePackageName(false);

      SimpleLogger.error("this is a test message for error.");
      SimpleLogger.warn("this is a test message for warn.");
      SimpleLogger.info("this is a test message for info.");
      SimpleLogger.debug("this is a test message for debug.");

      SimpleLogger.debugDump("Kids song", "Mary had a little lamb, Little lamb, little lamb, Mary had a little lamb Whose fleece was white as snow.".getBytes());

      SimpleLogger.close();
   }

   public static void main(String[] args)
   {
      new Test_Logger();
   }
}

Here’s what the output looks like in the log file:

2021/12/15 20:27:58.187 ERROR (Test_Logger.<init>) this is a test message for error.
2021/12/15 20:27:58.188 WARN  (Test_Logger.<init>) this is a test message for warn.
2021/12/15 20:27:58.188 INFO  (Test_Logger.<init>) this is a test message for info.
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) this is a test message for debug.
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) Kids song -->>
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) 000000: 4D617279 20686164 2061206C 6974746C 65206C61 6D622C20 4C697474 6C65206C  Mary had a little lamb, Little l
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) 000020: 616D622C 206C6974 746C6520 6C616D62 2C204D61 72792068 61642061 206C6974  amb, little lamb, Mary had a lit
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) 000040: 746C6520 6C616D62 2057686F 73652066 6C656563 65207761 73207768 69746520  tle lamb Whose fleece was white 
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) 000060: 61732073 6E6F772E                                                        as snow.                        
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) <<-----

I have generated the JavaDocs for the SimpleLogger class and created a JAR file for SimpleLogger for users to use. I zipped up the JavaDocs, JAR file and the source code for both Test_SimpleLogger.java program and SimpleLogger.java. You can download the it from here.

Simply add the SimpleLogger JAR file to your application or add the SimpleLogger source code to your utility (or handler) package of your application and then start using it.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, HPE NonStop, IBM i (OS/400), Java, JMS, Linux, macOS (Mac OS X), Open Source, Programming, Raspberry Pi, Unix, Windows Comments Off on My SimpleLogger can be a Replacement for Log4J

IBM’s Response to the Log4J Vulnerability

Here is a link to a list of IBM products that are affected by the Log4J v2.x vulnerability (CVE-2021-44228):
https://www.ibm.com/blogs/psirt/page/2/?s=2021-44228

The only IBM MQ related hit so far is for IBM MQ Blockchain bridge.

Note: This is an actively growing list of IBM products. Hence, you should check back each day.

Here is a link to the Log4J v2.x vulnerability description:
https://unit42.paloaltonetworks.com/apache-log4j-vulnerability-cve-2021-44228/

Regards,
Roger Lacroix
Capitalware Inc.

IBM MQ, Linux, Programming, Security, Unix, Windows, z/OS Comments Off on IBM’s Response to the Log4J Vulnerability

Log4J Vulnerability And Capitalware Products

For those who have not heard, there is a new vulnerability in Log4J v2.x. Here is a link to the Log4J v2.x vulnerability:
https://unit42.paloaltonetworks.com/apache-log4j-vulnerability-cve-2021-44228/

The Log4J v2.x vulnerability is related to the ‘lookups’ feature that was introduced in version 2.

Lookups provide a way to add values to the log4j configuration at arbitrary places. They are a particular type of Plugin that implements the StrLookup interface.

Any application that is using Log4J v2.x needs to upgrade to Log4J v2.16.0 (or later) immediately.

No Capitalware product uses Log4J v2.x.

There are 4 Capitalware product using Log4J v1.x. Note: Log4J v1.x does not have the ‘lookups’ feature, hence, it is not at risk of the vulnerability described above.

End-users cannot change the Log4J jar file in MQ Batch Toolkit because it is compiled and linked using Excelsior Jet. Both AQOL and UFM are supplied as a regular form with a script / batch file to launch them. If the Log4J v1.x was upgraded in either JAUSX, AQOL and/or UFM to Log4J v2.x then it is the responsibility of the end-user to immediately either (1) put back Log4J v1.x or (2) download and install Log4J v2.16.0 (or later).

Note: None of the 4 components use the JMSAppender with Log4J v1.x.

Please take this vulnerability seriously.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, IBM i (OS/400), Java, JMS, Linux, macOS (Mac OS X), MQ Auditor, MQ Batch Toolkit, Open Source, Programming, Raspberry Pi, Security, Universal File Mover, Unix, Windows Comments Off on Log4J Vulnerability And Capitalware Products

Merry Christmas and Happy New Year

I would like to wish everyone a Merry Christmas, Happy Hanukkah, Happy Kwanzaa, etc… and a Happy New Year. 🙂

Regards,
Roger Lacroix
Capitalware Inc.

General Comments Off on Merry Christmas and Happy New Year

IBM MQ For .NET Core Primer

I’m starting to see questions (even being asked) about IBM MQ for .NET Core and the challenges that people are having. I’m not a .NET developer, more of a “I’ll do it to get it done” .NET developer. Hence, I’ll explain it from an IBM MQ perspective.

The first thing you should know is that there are 2 different .NET environments: .NET Framework and .NET Core.

  • .NET Framework V1.0 was released in 2001 and the current release of .NET Framework is V4.8 and was released in 2019.
  • .NET Core V1.0 was released in 2016. Microsoft re-branded .NET Core to be called just .NET in 2020. The current release of .NET is V6 and was released in last month.

So far, so good!?!

Now to IBM MQ. IBM has 2 releases of IBM MQ called: IBM MQ classes for .NET Framework and IBM MQ classes for .NET Standard (aka Base .NET Classes).

  • IBM MQ classes for .NET Framework is for .NET Framework
  • IBM MQ classes for .NET Standard is for .NET Core (aka .NET)
    When you are developing MQ applications for .NET Framework or Core, you need to select the correct MQ DLL:

  • IBM MQ classes for .NET Framework uses amqmdnet.dll
  • IBM MQ classes for .NET Standard uses amqmdnetstd.dll

So, still with me!?!

I have posted a lot of IBM MQ C# sample applications that were built for .NET Framework and can also be built for .NET Core.

So, lets say you now want to build your MQ .NET applications for .NET Core. Well, the first thing you will need to do is check if you have .NET Core v3.1 or higher. To check, simply issue the dotnet –version command. Note: You can also use the dotnet –info command.
i.e.

C:\>dotnet –version
2.1.509

So, I don’t have the correct .NET Core version. To get .NET Core v3.1, simply go to Microsoft’s Download .NET Core 3.1 web page, download and then install it. As you see on the download page, you can get .NET Core V3.1 for Linux, macOS and Windows.

After you install .NET Core v3.1, you can issue the dotnet –version command again.
i.e.

C:\>dotnet –version
3.1.415

Now I have the correct .NET Core release to use the IBM MQ classes for .NET Standard.

I just copied my MQTest62L.cs (get messages in a loop) to a new directory. You can download the source code from here.

Next, we need to create a C# project file for it. The C# project file is used by the .NET Core compiler to build the executable. There are 2 important items in it: .NET Core version and where to find the amqmdnetstd.dll file. Simply name the C# project file with the same prefix as the source file. i.e. MQTest62L.csproj
i.e.

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
	<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
	<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
	<OutputPath>.</OutputPath>
    </PropertyGroup>
  <ItemGroup>
    <Reference Include="amqmdnetstd">
      <HintPath>C:\Program Files\IBM\MQ\tools\dotnet\samples\cs\core\base\bin\amqmdnetstd.dll</HintPath>
    </Reference>
  </ItemGroup>
</Project>

So, now we can compile the C# file as follows:

F:\dev\some\path\to\it\MQTest62L> dotnet build MQTest62L.csproj
Microsoft (R) Build Engine version 16.7.2+b60ddb6f4 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  MQTest62L -> F:\dev\some\path\to\it\MQTest62L\MQTest62L.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.66

The .NET Core compiler will generate a bunch of files in the working directory. Don’t worry about them, as long as it generated the MQTest62L.exe file.

So, now it is time to test the newly build application. I’ll put 10 test messages on the queue using MQ Visual Edit then run MQTest62L.exe to retrieve the messages.

F:\dev\some\path\to\it\MQTest62L>  MQTest62L.exe -h 127.0.0.1 -p 1414 -c TEST.CHL -m MQA1 -q TEST.Q1 -u tester -x mypwd
2021-12-03 16:49:26.799 MQTest62L: MQ:
2021-12-03 16:49:26.805 MQTest62L:   QMgrName ='MQA1'
2021-12-03 16:49:26.806 MQTest62L:   Output QName ='TEST.Q1'
2021-12-03 16:49:26.806 MQTest62L: Connection values:
2021-12-03 16:49:26.807 MQTest62L:   hostname = '127.0.0.1'
2021-12-03 16:49:26.807 MQTest62L:   userID = 'tester'
2021-12-03 16:49:26.807 MQTest62L:   port = '1414'
2021-12-03 16:49:26.808 MQTest62L:   transport = 'MQSeries Managed Client'
2021-12-03 16:49:26.808 MQTest62L:   channel = 'TEST.CHL'
2021-12-03 16:49:27.015 MQTest62L: MQTest62L successfully connected to MQA1
2021-12-03 16:49:27.020 MQTest62L: MQTest62L successfully opened TEST.Q1
2021-12-03 16:49:27.041 MQTest62L: Message Data: This is a test message #1
2021-12-03 16:49:27.042 MQTest62L: Message Data: This is a test message #2
2021-12-03 16:49:27.043 MQTest62L: Message Data: This is a test message #3
2021-12-03 16:49:27.043 MQTest62L: Message Data: This is a test message #4
2021-12-03 16:49:27.044 MQTest62L: Message Data: This is a test message #5
2021-12-03 16:49:27.044 MQTest62L: Message Data: This is a test message #6
2021-12-03 16:49:27.045 MQTest62L: Message Data: This is a test message #7
2021-12-03 16:49:27.045 MQTest62L: Message Data: This is a test message #8
2021-12-03 16:49:27.046 MQTest62L: Message Data: This is a test message #9
2021-12-03 16:49:27.048 MQTest62L: Message Data: This is a test message #10
2021-12-03 16:49:32.065 MQTest62L: No more messages.
2021-12-03 16:49:32.068 MQTest62L: closed: TEST.Q1
2021-12-03 16:49:32.080 MQTest62L: disconnected from MQA1

Hopefully the above information will help people get up and running using .NET Core and IBM MQ classes for .NET Standard.

If you are really adventurous, you can now build IBM MQ and .NET Core applications on Linux, macOS and Windows. Have fun!

Regards,
Roger Lacroix
Capitalware Inc.

.NET, C#, IBM MQ, IBM MQ Appliance, Linux, macOS (Mac OS X), Windows Comments Off on IBM MQ For .NET Core Primer

Piss Off Trolls, Spammers and All Other Creepy People

A couple of weeks ago, I had a bright idea for a future project, so I registered a domain name. Since then, I have received over 50 emails, 8 text messages and over 12 phone calls, offering their services for web design.

Enough is enough, you bunch of trolls. Stop wasting my time with this crap!!!

Can you imagine offering your services for web site design and the emails (text messages) are horrible with spelling mistakes and look like crap. Or the phone calls are so bad with so much noise from the call center that I can hardly hear the person, let alone, understand them through their thick accent.

Seriously, you are offering web site design, but you send an absolutely poorly designed email and you actually think you will get business. Seriously!! Your first impression to a potential customer is complete garbage? Seriously!! You think that will get you business – if you are actually legitimate.

You emails SHOULD be showing off your skills not your lack of skills!!! A 12 year old can create a better looking email than what I have seen so far.

Also, why aren’t you listing some of the web site you have designed? Of course, it better have a tag line at the bottom saying “Designed by” either your name or your company’s name.

If you cannot show proof that you actually have designed web sites then clearly you are a troll/spammer looking to fraudulently steal people’s money.

To other people registering domain names, I strongly suggest that if you get emails, text messages and/or phone calls claiming to do web site design just delete it or hang up on phone calls. The other option is to pay for a private registration when you register your domain name to avoid all this non-sense.

Regards,
Roger Lacroix
Capitalware Inc.

General Comments Off on Piss Off Trolls, Spammers and All Other Creepy People

IBM MQ V9.2.4 Announced

IBM has announced IBM MQ V9.2.4:
https://www.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/8/899/ENUSLP21-0278/index.html

Highlights:

MQ 9.2.4:

  • – Intelligent workload rebalancing with updates to uniform clusters
  • – Security enhancements that build on the existing robust security mechan
  • – MQ client support for new Java™ 11 runtimes
  • – MQ client support for Java 17 runtimes
  • – Updates to improve usability of the IBM MQ web console
  • MQ Advanced 9.2.4:

  • – The capabilities listed in MQ 9.2.4
  • – Transfer logs, available with MQ Managed File Transfer (MQ MFT)
  • MQ Appliance 9.2.4 firmware:

  • – MQ administration REST API enhancements
  • – Intelligent workload rebalancing with updates to uniform clusters
  • – Security enhancements
  • – Transfer logs, available with MQ MFT
  • – Updates to improve usability of the MQ web console
  • Planned availability for IBM MQ V9.2.4 is November 18, 2021 for Electronic software delivery.

    IBM MQ (aka WebSphere MQ) homepage
    https://www.ibm.com/products/mq

    Regards,
    Roger Lacroix
    Capitalware Inc.

    Fix Packs for MQ, IBM i (OS/400), IBM MQ, IBM MQ Appliance, Linux, Unix, Windows Comments Off on IBM MQ V9.2.4 Announced

    IBM MQ Fix Pack 9.2.0.4 Released

    IBM has just released Fix Pack 9.2.0.4 for IBM MQ V9.2 LTS:
    https://www.ibm.com/support/pages/node/6514427

    Regards,
    Roger Lacroix
    Capitalware Inc.

    Fix Packs for MQ, IBM i (OS/400), IBM MQ, IBM MQ Appliance, Linux, Unix, Windows Comments Off on IBM MQ Fix Pack 9.2.0.4 Released

    And Now for Something Completely Different.

    I love that line from Monty Python which is from the film of the same name.

    Last week, someone emailed me about running MQ Visual Edit on Microsoft Surface Pro X. For those who don’t know, the Surface Pro X comes with a Microsoft SQ1 or SQ2 ARM processor. Yes, ARM CPU and not an Intel CPU.

    After some internet searches and a bunch of reading, I discovered that besides Microsoft, there are other manufacturers making laptops with Windows on ARM.

    I noticed that Best Buy was having a sale (25% off) on Samsung Galaxy Book Go. So, I bought one. Always like a good deal. 🙂

      Specs for Samsung Galaxy Book Go:

    • CPU: Qualcomm Snapdragon 7c Gen 2 2.55GHz
    • RAM: 4GB
    • SSD: 128GB
    • Screen Size: 14.0”
    • Screen Resolution: 1920 x 1080
    • OS: Windows 10 Home

    Here’s screen-shots (click on the image to see a larger picture):

    Windows 10 on ARM will run native applications very well and will provide emulation for 32-bit Intel x86 applications. It does not provide support for 64-bit Intel x64 applications. Note: Microsoft says that Windows 11 on ARM will add support for emulation of 64-bit Intel x64 applications.

    I’m not a big fan of emulation but I did run several 32-bit x86 applications on my new Samsung laptop and everything worked.

    Here’s a screenshot of a 32-bit x86 release of MQ Visual Edit running on Windows on ARM (running in emulation):

    I installed the Microsoft build of OpenJDK for Windows 10 ARM64 and ran some test Java applications and everything worked fine. Next, I ran MQ Visual Edit in the OpenJDK for Windows 10 ARM64. And here’s a screenshot:

    So, I’m going to continue testing (aka playing around with my new laptop) and see what interesting things I can discover.

    Therefore, for those customers that want to run MQ Visual Edit, MQ Visual Browse, MQ Batch Toolkit and/or MQTT Message Editing Suite on Windows on ARM then let me know and I will provide you with either:

    • MQ Visual Edit for Windows 32-bit x86 release that will run in emulation
    • MQ Visual Edit for Windows on ARM with the JRE from OpenJDK for Windows 10 ARM64

    To go one step further, maybe IBM would like to join the party and provide a native release of IBM MQ for Windows on ARM. 🙂 IBM has already released developer versions of IBM MQ for macOS (client only) and Raspberry Pi (client & server), so why not provide a developer release for Windows on ARM!

    The future: Microsoft has taken a lot of flack over Windows on ARM, especially that first generation called Microsoft Surface RT which had a special build of Windows for it. Now this time around, Microsoft has learned its lesson and now provides the regular release of Windows 10 for ARM. It could be that since Apple has been successfully migrating from Intel CPUs to Apple ARM CPUs for their hardware, Microsoft probably figures it is time to get their shit together before they loose out on that market too.

    Its definitely interesting times. 🙂

    Regards,
    Roger Lacroix
    Capitalware Inc.

    Capitalware, IBM MQ, IBM MQ Appliance, Java, JMS, MQ Batch Toolkit, MQ Visual Browse, MQ Visual Edit, MQTT, MQTT Message Editing Suite, Programming, Windows Comments Off on And Now for Something Completely Different.