Friday, May 2, 2014

BizTalk MQSeries Adapter COM+ Error 80004005

When connecting BizTalk to Websphere MQ, you can choose between two options:

-       MQSC adapter (Client based)
-       MQSeries (Server based)

My current client chose to use the MQSeries adapter to connect to Websphere MQ. The core of this adapter is a COM+ component running on the BizTalk server which will handle all processing.

Issue

Normally, all processing runs smoothly. But sometimes, when executing a new installation of an application on BizTalk, we started receiving the following error-message:

“Retrieving the COM class factory for remote component with CLSID {} from machine xx failed due to the following error: 80004005”

Also, we noticed that all messages that were sent to the MQSeries adapter, were staying in status Started with the same error. All processing was gone and nothing was going to or coming from MQ.




When first checking the running component, we didn’t see anything weird. Everything was running fine. We looked into the issue for quite some hours but didn’t find anything that was causing the problems.

Solution

The problem itself lays in the fact that the COM+ component can recycle itself but that the recycle doesn’t work properly. So we don’t see any “extra” failing instances of the component but things change when we boot up the process explorer:




We see two instances of the component! We can tell this for sure since the MQSAgent2 is the only thing running under this specific account (check the properties of a process – right click – properties). So there is an instance running correctly, but an old one, which isn’t visible in the running, processes on the Component Services, but still present in the windows processes. This faulty component is still taking in all the incoming requests.

Only thing to figure out now is the process id of the component that is currently running. This process id is visible in the components mmc.


It’s now just a matter of killing the other component to resolve the issue.

Extra

The other measure we took to avoid extra downtime of the environment was raising the pool size of the component. This means that when a component starts to recycle another component is started which will automatically take in all the new requests while the other is still recycling. This can be set in the properties of the component.

Any questions can be put in the comments, or you can contact me through twitter directly.

Andrew De Bruyne (Twitter: @draitnn)

Friday, April 25, 2014

Bug in WebMethods OneData MDM 9.5 standard configuration

When you install WebMethods OneData MDM 9.5 using the Software AG installer, 2 database connections will be created by default as shown in the image below:
1) STG: connection to the Work Area
2) PRD: connection to the Release Area



The parameters for both connections are by default configured using JNDI. The corresponding full config details can be found in the Tomcat config file <install dir>\profiles\ODE\configuration\tomcat\conf\context.xml. These contain JDBC URL, username, password,... Although the username is specified in the JNDI context in the context.xml file, it is also by default specified in the connection details in OneData as shown in the image below.



The value of the User-ID parameter seems be generated automatically and composed out of the connection prefix you define during the installation in SAG Installer, concatenated with the suffix "_wa" for the work area connection and "_ra" for the release area connection.

Although it seems that this configuration is working fine, this is actually not 100% the case. It turns out that when the value in the User-ID parameter doesn't correspond with the actual Oracle username (which is very likely), some functionality like the "Schema Update" to create new Objects from existing tables in the Release Area will not work (existing tables are not shown in OneData UI). So in order to avoid potential unexpected behavior in OneData you should update the User-ID parameter after installation to the actual Oracle username (so identical to the username in context.xml).

Another solution is to not use the JNDI config and copy all the configuration details from the context.xml file to the corresponding fields in the Connection Parameters form in OneData.

This problem also seems to occur in OneData 9.0. I haven't been able yet to verify it in version 9.6. but I couldn't find any record of this error on Software AG Empower, so the bug probably still exists in version 9.6 also.

Author: Kristof Lievens

Monday, April 7, 2014

Fixing HTTP redirect for ARIS 9.5 Design Server after an IP address change

I recently moved a Windows Server 2012 virtual machine running ARIS 9.5 Design Server, from my laptop running VMWare Workstation to a VMWare ESX 5.5 host. My Windows Server 2012 VM has one single network adapter and changing the VM host implied that the IP address of the VM had to be changed because the VM hosts were running in different netwerk segements (my Windows Server 2012 network connection had DHCP enabled, so the IP address changed automatically actually).

After moving my VM, I was able to start ARIS Design Server without a problem, but to my surprise, my browser was redirected to my old IP address every time I tried to connect to the ARIS Design server at default port 5480, even when I used the new IP address of my server or "localhost" as hostname. Turns out that the old IP address was still used by the load balancer component in ARIS Design Server. To fix this problem, you have to update the "httpd.conf" configuration file in the folder <ARIS install root>\server\bin\work\work_loadbalancer_m\httpd\conf. Look for the "ServerName",  "RewriteCond" and "RewriteRule" parameters and update them with the new IP address. After restarting the ARIS Design Server, the redirect in my browser worked correctly.

Author: Kristof Lievens

Friday, March 7, 2014

Highlights of the London 2014 BizTalk Integration Summit

When you're following the hashtag #msbts on Twitter, you might have noticed that there was suddenly a lot going on about the BizTalk Summit in London, organised by BizTalk360. I8C was present at this event to find out about all the latest and greatest that our integration world has to offer.

In this overview, I’ll try to point out all of the things I remembered being the most important from those two days, so that when you weren’t able to make it, you still can have the feeling you haven’t been missing out.

BizTalk Server 2013 R2

Guru Venkataraman took the stage as first speaker to talk about the upcoming release of BizTalk Server 2013 R2. The guys at Microsoft have been working hard to put new stuff in there for us to discover and have tried to make it as much “error-less” as possible. This results in over 78.000 test which take a whopping 4 months to run! Guess we’ll have a pretty stable release coming up!

One constant during the two days was the following abbreviation: JSON. In BizTalk 2013 R2, JSON support will be present.

So in short, following elements will be there in the new release:

            - JSON support
            - Proxy support for SFTP
            - Healthcare accelerator improvements
                        à HL7 2.6
                        à 64 bit MLLP
                        à Dynamic Send Port support for MLLP
                        à ETW Tracking
            - Connectivity to on-prem ServiceBus
            - Authentication improvements for ServiceBus

And maybe most importantly, BizTalk 2013 R2 will be released in H2 2014!

Updates in WABS

Also WABS (Windows Azure BizTalk Services) is getting an upgrade, although this upgrade is quarterly, so more frequent than the upgrades in BizTalk on-prem versions. Harish Kumar Agarwal gave us a nice overview of all new updates in the following release.

Here’s what to expect:
            - Adapter extensibility
            - JSON support (yup!)
            - Pulling from LOB’s
            - AAD integration
            - BPM!
BPM is in fact coming SOON to WABS, using workflow, a rules engine and process- & rules designers.

Tools for moving to WABS

In his session, Jon Fancey showed us some interesting tools on how to make the move to WABS much easier.

            MAPS à MAPS
Maps in WABS have been rewritten, but there is still a possibility to convert old maps into the ‘new’ version. These maps can be converted using the BTMtoTRFMConvertor.exe tool.
            The tool still contains some errors but it’s a work in progress.

            PIPELINES à BRIDGES
Pipelines don’t exist in WABS. Bridges though can be seen as the new replacement for a combination of pipelines and processing. Bridges can also be paired to enable more complex processing.

            TRADING PARTNERS à TRADING PARTNERS
TPMDataMigrationTool can be used to convert trading partner configuration from on premise to Azure.

ORCHESTRATIONS & MESSAGING à WORKFLOW
Workflow will be coming, but a release date is still unclear. There should be also a tool available to convert XLANG orchs to WF (generating xamlx, cs & dll files). The conversion will be possible, but it won’t be without errors.

Jon Fancey also pointed out that not always everything needs to be moved. When connecting on prem to on prem, there’s no need to pass through the cloud. We need to think wisely on what to convert and what not.

Decision Framework

Richard Seroter has clearly succeeded during his session to make clear to all attendees that there are more options to do integration than just using BizTalk. He gave us insight into his own “Decision Framework” which he uses to determine which integration tools to use. Basic concepts of this framework are:

·      Functional Requirements: What is directly needed?
·      Non-functional Requirements: What is indirectly needed?
·      Derived Requirements: What is expected to be needed?
·      Organisational Strategy: What does the business want it to be?

On top of those concepts, there also need to be discussions about:

Design: Datavolumes, guaranteed delivery, sources & destinations, authentication, failure handling, etc.
Developers: Developer availability, learning curves, dev setup, IDE & tools, support community, etc.
Operations: Event logging, performance tuning, backup & restore, scriptability, etc.
Organisational strategy: Long term solution, vendor support, budget impact, build vs buy, risk tolerance, etc.

Only when all these decisions and discussions have formed a conclusion, an integration technology can be choses.

Mobile Services

During a session on Windows Azure Mobile Services, Kent Weare really pointed out the (future) importance of Mobile Services. It’s something that all CIO’s, CFO’s and CEO’s in current companies are looking at, therefore it’s important not to deny the existence. And for us, even more important, BizTalk Services can play a huge role in this progression towards mobility.

The enterprise mobility stack will consist of following building blocks on Azure:

·      BizTalk Services
·      Mobile Services
·      SQL
·      Service Bus
·      Active Directory

Using all these blocks together, corporate apps can be built to enhance integration on a more mobile scale.

BizTalk Mapping Patterns

Some great news from Sandro Pereira during his session: He’s currently writing a book about different mapping patterns that can be used as a reference when building maps in BizTalk. The ebook will be available for free and is a whopping 200 pages! Great!

Sessions worth viewing
           
There were also two sessions which were really fun to watch and both informative as well.

First of all, the session of Nino Crudele was absolutely awesome. Not only was it fun to see and listen, also the things he has been building over the last four months are absolutely insane. He created plugins for Visual Studio which make your life as a developer so much more easy. He packed so much info in his presentation, that you just need to see it to believe it. Check it out as soon as the videos come online on the website of BizTalk360!

Second, Tord Glad Nordahl gave a great overview of what things that can go wrong or are being messed up as an administrator or developer. Well, the title doesn’t says it all, since he pulled up so many real-life situations that it was very hard NOT to feel like he was talking about your own daily frustrations. Want to have a laugh? Check out his session on www.biztalk360.com as soon as they are online.

That’s about it! If you want more info, I’m referring to all the slides and videos that will be shared later next week by BizTalk360. It was great to see so much interest in integration, and the community surely is growing bigger and bigger. I hope to see more future events like this one since it’s extremely interesting to hear and see the evolution in the field we’re working in.

Thanks to Saravana Kumar and his team to host this awesome event, and hope to see you again next year!


Andrew De Bruyne (@draitnn)

Tuesday, December 31, 2013

BizTalk Services Mapper - WCF SQL Select Query - Cumulative Concatenate

Say you want to create a map in order to produce the SELECT statement for a WCF-SQL query and you start of with a list of values to include in the where clause.

How to achieve this with the BizTalk Services mapper?

The Source XML:
<ns0:GetProducts xmlns:ns0="http://GetProductsBizTalkService.Schemas">
  <Column>
    <Name>Name_0</Name>
    <Value>Value_0</Value>
  </Column>
  <Column>
    <Name>Name_1</Name>
    <Value>Value_1</Value>
  </Column>
  <Column>
    <Name>Name_2</Name>
    <Value>Value_2</Value>
  </Column>
</ns0:GetProducts>

The Destination XML:
<ns3:Select xmlns:ns3="http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/Products">
  <ns3:Columns>*</ns3:Columns>
  <ns3:Query>where Name_0='Value_0' and Name_1='Value_1' and Name_2='Value_2'</ns3:Query>
</ns3:Select>

First, how could we do this within XSLT?

This can be done with the following XSLT:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:s0="http://GetProductsBizTalkService.Schemas"
                xmlns:ns0="http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/Products"
                exclude-result-prefixes="msxsl s0">
  <xsl:output method="xml"
              indent="yes"/>

  <xsl:template match="/">
    <xsl:apply-templates select="/s0:GetProducts" />
  </xsl:template>
  <xsl:template match="/s0:GetProducts">
    <ns0:Select>
      <ns0:Columns>*</ns0:Columns>
      <xsl:if test="Column">
        <ns0:Query>
          <xsl:for-each select="Column">
            <xsl:if test='position() = 1'>where </xsl:if>
            <xsl:value-of select="Name"/>='<xsl:value-of select="Value"/>'
            <xsl:if test='position() != last()'> and </xsl:if>
          </xsl:for-each>
        </ns0:Query>
      </xsl:if>
    </ns0:Select>
  </xsl:template>
</xsl:stylesheet>

The result of the above will be:
<?xml version="1.0" encoding="utf-8"?>
<ns0:Select xmlns:ns0="http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/Products">
  <ns0:Columns>*</ns0:Columns>
  <ns0:Query>
    where Name_0='Value_0'
    and Name_1='Value_1'
    and Name_2='Value_2'
  </ns0:Query>
</ns0:Select>

Finally, how to achieve the same thing with the mapper:



What did we do?

First of all we need a list and the list will contain the list of expressions based on the column name and values:
Name_0='Value_0'
Name_1='Value_1'
Name_2='Value_2'

For this we use the new "Create List" functoid:

include the "ForEach Loop" functoid - in order to loop the "Column" records -:

use a "String Concatenate" in combination with the "Add Item to List" functoid to produce the above list:


Now that we have the list, how to produce the query statement? "Cumulative Concatenate" comes to the rescue:


Since the "Query" element in the destination schema is optional, I also included a "Conditional Assignment" functoid to only map the query in case we have columns on the input.
I also used the "Cumulative Count" functoid to count the number of items in the list and used the "Logical Expression" functoid to check if the value is greater than 0:


Based on that result we will create the "Query" element or not, but first we need to prefix the query with the "where" word using the "String Concatenate" functoid:


Simple!

The thing to remember here is to include a "ForEach" in the "Create List"...

Koen

Sunday, December 1, 2013

Installing Terracotta as a windows service



Since the release of webMethods 9.0, Software AG uses TerraCotta as distributed cache for their cluster solution on Integration Server. The software can be easily installed using the SoftwareAG installer, but has a big drawback on Microsoft Windows systems: there is no procedure to install Terracotta as a Windows Service. Therefore, the server needs to be started on command line with all its consequences.
Fortunately, there are several solutions available:
Tanuki java wrapper
Can be configured to work with Terracotta, but the community edition only supports 32-bit JVM. Due to its memory limitation, this is not a very good solution. You can find the software at http://wrapper.tanukisoftware.com/
In case you want to buy the software for 64-bit support, configuration can be done as follows:
  • ·        Download the wrapper and unzip in folder D:\SoftwareAG\Terracotta\wrapper 
  •       Make a wrapper file TerraCotta.conf with the following configuration and place it under D:\SoftwareAG\Terracotta. Suppose the Terracotta config file tc-config.xml can be found under D:\SoftwareAG\Terracotta\bin
# for logging
wrapper.java.command.loglevel=INFO
wrapper.java.command=D:\SoftwareAG\jvm\jvm170_32\bin\java
# Method 1 main class
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp
# classpath
wrapper.java.classpath.1=D:\Temp\wrapper\lib/wrapper.jar
wrapper.java.classpath.2=D:/SoftwareAG/Terracotta/lib/tc.jar
wrapper.java.library.path.1=D:\Temp\wrapper/lib
# Java Additional Parameters
wrapper.java.additional.1=-server
wrapper.java.additional.2=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.3=-Dcom.sun.management.jmxremote
wrapper.java.additional.4=-Dsun.rmi.dgc.server.gcInterval=31536000000
wrapper.java.additional.5=-Dnet.sf.ehcache.enableShutdownHook=false
wrapper.java.additional.6=-Dcom.tc.l2.db.factory.name=com.tc.objectserver.storage.derby.DerbyDBFactory
wrapper.java.additional.7=-Dtc.install-root=D:/SoftwareAG/Terracotta
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=512
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=512
# Application parameters. This is where you specify TC server main class
wrapper.app.parameter.1=com.tc.server.TCServerMain
wrapper.app.parameter.2=2
wrapper.app.parameter.3=-f
wrapper.app.parameter.4=D:\SoftwareAG\Terracotta\bin\tc-config.xml
wrapper.app.parameter.5=com.tc.admin.TCStop
wrapper.app.parameter.6=FALSE
wrapper.app.parameter.7=5
wrapper.app.parameter.8=-f
wrapper.app.parameter.9=D:\SoftwareAG\Terracotta\bin\tc-config.xml
wrapper.app.parameter.10=-n
wrapper.app.parameter.11=Server2
wrapper.app.parameter.12=9520
wrapper.logfile=D:\SoftwareAG\Terracotta/wrapper.log
# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO
# On exit behaviour
wrapper.on_exit.0=SHUTDOWN
wrapper.on_exit.default=RESTART

  • ·        You can install the service by running the following command: sc create Terracotta binPath= D:\SoftwareAG\Terracotta\wrapper\wrapper.exe -s D:\SoftwareAG\Terracotta\TerraCotta.conf start= auto

Yet Another Java Service Wrapper (YAJSW)
YAJSW is a pure java implementation of the Tanuki Java Wrapper. Its big advantage is that it’s free and supports both 32 and 64-bit JDK 5, 6 and 7. You can find the software at http://yajsw.sourceforge.net/
Configuration can be done as follows:
  • ·        Download and unzip the wrapper under D:\SoftwareAG\Terracotta\wrapper 
  •       Make a wrapper.conf file with the following configuration and place it under D:\SoftwareAG\Terracotta\wrapper. Important to mention is to use / instead of \ !!
wrapper.java.command=D:/SoftwareAG/jvm/jvm170_64/bin/java
wrapper.stop.conf = D:/SoftwareAG/Terracotta/wrapper/wrapper.stop.conf
wrapper.java.classpath.1= D:/SoftwareAG/Terracotta/wrapper/wrapper.jar
wrapper.java.classpath.2=D:/SoftwareAG/Terracotta/lib/tc.jar
wrapper.java.app.mainclass = com.tc.server.TCServerMain
wrapper.console.title = TerraCotta
wrapper.ntservice.name = TerraCotta
wrapper.ntservice.displayname = TerraCotta
wrapper.ntservice.description = TerraCotta
wrapper.app.parameter.1= -f
wrapper.app.parameter.2= D:/SoftwareAG/Terracotta/bin/tc-config.xml
wrapper.logfile=D:/logs/wrapper.log
wrapper.logfile.format=LPTM
wrapper.logfile.rollmode=DATE
wrapper.logfile.maxdays=10
wrapper.java.additional.1=-server
wrapper.java.additional.2=-Xms1024M
wrapper.java.additional.3=-Xmx1024M
wrapper.java.additional.4=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.5=-Dcom.sun.management.jmxremote
wrapper.java.additional.6=-Dsun.rmi.dgc.server.gcInterval=31536000000
wrapper.java.additional.7=-Dnet.sf.ehcache.enableShutdownHook=true
wrapper.java.additional.8=-Dcom.tc.l2.db.factory.name=com.tc.objectserver.storage.derby.DerbyDBFactory
wrapper.java.additional.9=-Dtc.install-root=D:/SoftwareAG/Terracotta
wrapper.java.additional.10=-Djava.net.preferIPv4Stack=true
wrapper.on_exit.0=SHUTDOWN
wrapper.on_exit.default=RESTART
  • ·        Also make a wrapper.stop.conf file in the same folder with the following configuration:
wrapper.stopper = true
wrapper.java.command=D:/SoftwareAG/jvm/jvm170_64/bin/java
wrapper.java.classpath.1= D:/SoftwareAG/Terracotta/wrapper/wrapper.jar
wrapper.java.classpath.2=D:/SoftwareAG/Terracotta/lib/tc.jar
wrapper.java.app.mainclass = com.tc.admin.TCStop
wrapper.app.parameter.1=-f
wrapper.app.parameter.2=D:/SoftwareAG/Terracotta/bin/tc-config.xml
wrapper.app.parameter.3=-n
wrapper.app.parameter.4=Server1
wrapper.app.parameter.5=9520
wrapper.logfile=D:/logs/wrapper_stop.log
wrapper.logfile.format=LPTM
wrapper.logfile.rollmode=DATE
wrapper.logfile.maxdays=10
wrapper.java.additional.1=-server
wrapper.java.additional.2=-Xms512M
wrapper.java.additional.3=-Xmx512M
wrapper.java.additional.4=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.5=-Dcom.sun.management.jmxremote
wrapper.java.additional.6=-Dsun.rmi.dgc.server.gcInterval=31536000000
wrapper.java.additional.7=-Dnet.sf.ehcache.enableShutdownHook=true
wrapper.java.additional.8=Dcom.tc.l2.db.factory.name=com.tc.objectserver.storage.derby.DerbyDBactory
wrapper.java.additional.9=-Dtc.install-root=D:/SoftwareAG/Terracotta
wrapper.java.additional.10=-Djava.net.preferIPv4Stack=true

·        You can test the configuration by running D:\SoftwareAG\Terracotta\wrapper\bat\runConsole.bat
In that case the wrapper will load the configuration file and start the process. This can be used to debug the wrapper configuration file. Afterwards the service can be installed using the D:\SoftwareAG\Terracotta\wrapper\bat\installService.bat command

For both wrappers you can define the wrapper on exit behavior. By setting wrapper.on_exit.0=SHUTDOWN the wrapper will do nothing when it gets a normal return code 0 from terracotta. For all other return codes the wrapper will automatically restart the terracotta service. We do this by setting wrapper.on_exit.default=RESTART.
We need this option in an active-mirror terracotta setup. If we shut down the passive node and restart it, we will get the following error in the terracotta server log:
ERROR com.tc.l2.ha.ClusterState -
********************************** ERROR ***********************************
* This server is running with persistence turned on and was stopped in
* PASSIVE-STANDBY state. Only the ACTIVE-COORDINATOR server is allowed  to
* be restarted without cleaning up the data directory with persistence
* turned on.
*
* Please clean up the data directory and make sure that the
* ACTIVE-COORDINATOR is up and running before starting this server. It is
* important that the ACTIVE-COORDINATOR is up and running before starting
* this server else you might end up losing data
****************************************************************************
[WrapperStartStopAppMain] ERROR tc.operator.event - NODE : Server2  Subsystem: CLUSTER_TOPOLOGY Message: Started with dirty database. Exiting!! Restart enabled
[WrapperStartStopAppMain] ERROR com.terracottatech.dso - Marking the object db as dirty ...
[WrapperStartStopAppMain] ERROR com.terracottatech.console - This standby Terracotta server instance had to restart to automatically wipe its database and rejoin the cluster.

Terracotta will stop with a return code different than 0. By using the on exit options, the wrapper automatically restarts the service.