DotNet Connector Migration Guide
Due to technical limitations, it is not possible to run applications using the .NET connector version 1.x and version 2.x side-by-side on a single Anypoint installation. The Anypoint Studio or ESB Server instance which has previously hosted applications using the .NET connector version 1.0 applications will have support files installed for the 1.0 version of the connector. These .NET support files must be upgraded by the process explained below before the .NET Connector version 2.0 will work correctly.
Additionally, if you are running applications using the .NET connector version 1.x, you must migrate all applications to use the .NET Connector version 2.x and configure the Anypoint installation that hosts these applications to allow the .NET Connector 2.x to run.
Contact MuleSoft to obtain the migrationtool.
Identify which version of the .NET connector a Mule installation will support
Enumerate all deployed apps that use the .NET connector v1 on a standalone Mule instance
Upgrade the .NET support files specified Mule installation to allow the .NET connector version 2.0 or above to run
Migrate one or more Mule apps that use the .NET connector version 1.0 to version 2.0 (a workspace root or project directory may be selected, or an ESB Server runtime directory)
In addition to running the migrator tool against your Anypoint Studio instance, you must also ensure that the .NET connector 2.0 plugin is installed before you will see the .NET Connector available in the Studio palette.
The -analyze command will identify whether the Anypoint Studio or ESB Server instance must be upgraded, and if any Mule applications are using the .NET connector version 1.0 and must be migrated.
dotnet-connector-util -analyze c:\path\to\mule\or\studio\instance
The -upgrade command will remove the support files for the .NET connector 1.0, and configure an Anypoint Studio or ESB Server instance to host the .NET connector version 2.0 support files.
dotnet-connector-util -upgrade <path-to-mule-or-studio-installation>
The -migrate command will update the global element config of any Mule applications running on the specified ESB server instance (in-place migration) or the Mule project(s) in the specified workspace directory, allowing the application to take advantage of the .NET connector 2.0.
dotnet-connector-util -migrate <path-to-esb-server-or-workspace-or-app>
Once you have configured an Anypoint Studio or ESB Server instance to support the .NET connector 2.0, any application that uses the .NET connector version 1.0 will no longer run. You will see an error message such as the below when you attempt to run your application:
Can't initialize jni4net BridgeCan't load library: C:\Tools\AnypointStudio\plugins\org.mule.tooling.server.3.5.2.ee_184.108.40.206410031231\mule\lib\user\dotnetconnector\1.1\jni4net.n.w64.v40-0.8.6.0.dll ERROR 2015-01-05 16:25:23,613 [[dotnetdemo1].connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : Failed to invoke execute. Message payload is of type: String Code : MULE_ERROR--2 -------------------------------------------------------------------------------- Exception stack is: 1. Can't load library: C:\Tools\AnypointStudio\plugins\ \mule\lib\user\dotnetconnector\1.1\jni4net.n.w64.v40-0.8.6.0.dll (java.lang.UnsatisfiedLinkError) java.lang.ClassLoader:1854 (null) 2. Can't initialize jni4net Bridge (net.sf.jni4net.inj.INJException net.sf.jni4net.CLRLoader:56 (null)
If you see the following error when running an application that uses the .NET connector version 2.0, then the support files for the .NET connector 1.0 are still installed in the version of Anypoint Studio or ESB Server that you are running.
Follow the migration guidance in this document to overcome this issue:
java.lang.Exception: The Anypoint installation the application is running in is configured to allow the .NET Connector 1.x and this application references the .NET Connector 2.x. You must run the dotnet-version-selector utility to allow .NET Connector 2.x applications to run in this installation at org.mule.modules.dotnet.jni.DotNetBridge.<clinit>(DotNetBridge.java:185) at org.mule.modules.dotnet.DotNetConnector.<clinit>(DotNetConnector.java:80) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)