Skip to main content

#MuleSoft Connectors / SDK / DevKit1 discussing

Questions and answers about MuleSoft Connectors/SDK/DevKit, best practices, and use cases.

Hi Experts,

 

I am trying to call a BAPI using SAP connector execute BAPI sRFC.

But the BAPI name contains slash "/" (ex: /NAMESPACE/BAPINAME)

 

The slash is causing errors when the api has been executed.

 

Here is the error message:

**An exception occured while parsing XML.

The markup in the document preceding the root element must be well-formed.**

 

Please provide solution.

 

Thanks,

Veera

4 answers
  1. May 17, 7:11 PM

    The issue is caused by the “/” in the BAPI namespace. Try upgrading the SAP connector or use a wrapper RFC without “/” in the name. The error occurs due to invalid XML generation.

0/9000
3 answers
  1. Apr 3, 2022, 7:17 AM

    Hi @Saddam Shaikh​ 

    Went with article, but I would not find about RFH2 headers,

    Here I want to send user property like FileName in RFH2 header

    would you help on this

0/9000

Hello,

 

I've been struggling with upgrading our custom connector to be java 17 compatible, it works for java 8 and 11 but for java 17 I get this error message when building with maven locally:

 

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.51 s <<< FAILURE! -- in org.mule.extension.azure.authentication.azureauthenticationOperationsTestCase

[ERROR] org.mule.extension.azure.authentication.azureauthenticationOperationsTestCase.initializationError -- Time elapsed: 0.008 s <<< ERROR!

org.mule.runtime.api.exception.MuleRuntimeException: Error while building the 'ArtifactClassLoaderHolder'

Caused by: org.mule.runtime.api.exception.MuleRuntimeException: java.lang.IllegalCallerException: java.lang is not open to unnamed module @1a27aae3

Caused by: java.lang.IllegalCallerException: java.lang is not open to unnamed module @1a27aae3

at java.base/java.lang.Module.addOpens(Module.java:836)

at org.mule.runtime.jpms.api.JpmsUtils.lambda$openToModule$25(JpmsUtils.java:510)

at java.base/java.util.Optional.ifPresent(Optional.java:178)

at org.mule.runtime.jpms.api.JpmsUtils.lambda$openToModule$26(JpmsUtils.java:507)

at java.base/java.util.Optional.ifPresent(Optional.java:178)

at org.mule.runtime.jpms.api.JpmsUtils.openToModule(JpmsUtils.java:506)

at org.mule.runtime.jpms.api.JpmsUtils.openPackages(JpmsUtils.java:265)

at org.mule.runtime.jpms.api.JpmsUtils.createModuleLayerClassLoader(JpmsUtils.java:208)

at org.mule.test.runner.classloader.container.DefaultTestContainerClassLoaderAssembler.createContainerClassLoader(DefaultTestContainerClassLoaderAssembler.java:99)

at org.mule.test.runner.classloader.IsolatedClassLoaderFactory.createArtifactClassLoader(IsolatedClassLoaderFactory.java:146)

at org.mule.test.runner.api.ArtifactIsolatedClassLoaderBuilder.build(ArtifactIsolatedClassLoaderBuilder.java:302)

at org.mule.test.runner.ArtifactClassLoaderRunner.createClassLoaderTestRunner(ArtifactClassLoaderRunner.java:295)

at org.mule.test.runner.ArtifactClassLoaderRunner.<init>(ArtifactClassLoaderRunner.java:147)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)

at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:107)

at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)

at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)

at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)

at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)

at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:314)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)

at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)

at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)

at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)

at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)

at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

With this pom.xml:

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

 

<modelVersion>4.0.0</modelVersion>

<groupId>6dbcc47a-fdf8-451c-86a7-b85588612515</groupId>

<artifactId>azure-authentication-connector</artifactId>

<version>3.0.0</version>

<packaging>mule-extension</packaging>

<name>azure-authentication-extension</name>

 

<parent>

<groupId>org.mule.extensions</groupId>

<artifactId>mule-modules-parent</artifactId>

<version>1.8.0</version>

</parent>

<properties>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<maven.compiler.source>1.8</maven.compiler.source>

<maven.compiler.target>1.8</maven.compiler.target>

</properties>

<dependencies>

<dependency>

<groupId>com.azure</groupId>

<artifactId>azure-identity</artifactId>

<version>1.13.1</version>

<scope>provided</scope>

</dependency>

<dependency>

<groupId>com.azure</groupId>

<artifactId>azure-core</artifactId>

<version>1.54.0</version>

</dependency>

</dependencies>

<repositories>

<repository>

<id>Central</id>

<name>Central</name>

<url>https://repo.maven.apache.org/maven2</url>

<layout>default</layout>

<snapshots>

<enabled>false</enabled>

</snapshots>

</repository>

<repository>

<id>mulesoft-releases</id>

<name>MuleSoft Releases Repository</name>

<url>https://repository.mulesoft.org/releases/</url>

<layout>default</layout>

<snapshots>

<enabled>false</enabled>

</snapshots>

</repository>

<repository>

<id>anypoint-exchange-v3</id>

<name>Anypoint Exchange V3</name>

<url>https://maven.anypoint.mulesoft.com/api/v3/maven</url>

<layout>default</layout>

<snapshots>

<enabled>false</enabled>

</snapshots>

</repository>

<repository>

<id>azure-releases</id>

<url>https://maven.azure.com/artifactory/azure</url>

<snapshots>

<enabled>false</enabled>

</snapshots>

</repository>

</repositories>

<pluginRepositories>

<pluginRepository>

<id>mulesoft-releases</id>

<name>mulesoft release repository</name>

<layout>default</layout>

<url>https://repository.mulesoft.org/releases/</url>

<snapshots>

<enabled>false</enabled>

</snapshots>

</pluginRepository>

</pluginRepositories>

<distributionManagement>

<repository>

<id>xxxxxxxxxxx</id>

<url>xxxxxxxxxx</url>

<snapshots>

<enabled>false</enabled>

</snapshots>

</repository>

</distributionManagement>

</project>

I have tested changing the version of mule-modules-parent, added the mule-sdk as a dependency but nothing makes the build green. Any help or guidance is much appreciated.

1 answer
0/9000

I am trying to access Shared drive location using SMB connector which was working till last week but all of sudden in local i am getting below error

 

org.mule.runtime.api.connection.ConnectionException: Different server found for same hostname '<serverhost>', disconnecting...\r\n\tat

3 answers
  1. Apr 7, 2025, 9:46 AM

    Hi ,

     

    i am facing similar issue, i tried all above suggestion didn't work

     

    14 minutes ago - 2025-04-07 15:00:00.138 GMT+5:30 - DefaultExceptionListener - e06f0310-1392-11f0-9a0a-46b883fc266b

    Replica gfv5k

    $[MuleRuntime].uber.15250: [tc--od].uk-gta.BLOCKING @78d7293 -

    ********************************************************************************

    Message : Different server found for same hostname 'xxx.xx.xx', disconnecting...

     

    I am using the same credentials in 3 projects it is working fine in one application, and remaining 2 it is creating issue.

     

    Thanks,

    Arjun Reddy

0/9000

Hi,

 

i installed a custom connector with devKit but i can not uninstall it.

Anybody know how can i uninstall a custom connector?

 

I have the v3.7

 

thanks

12 answers
0/9000

I have a backend API with 100 methods/resources. In my Mule API in front of this, I want to transform the payload for only 2 of these resources before passing the request to my backend API. For the rest of my resources, I simply want to pass through the request to the backend.

 

Is it possible to do this with APIkit router without having to create 98 separate flows for each of the pass through resources? Can the 98 resources be handled in a default type way of routing?

3 answers
  1. Jan 16, 2023, 2:13 PM

    Yes, it is possible to handle the 98 pass-through resources in a default way using APIkit Router.

     

    One way to achieve this is to use the APIkit Router with a catch-all routing strategy. You can create a single flow that handles the payload transformation for the 2 specific resources, and then use the APIkit Router's catch-all routing strategy to route all other requests to the backend API.

     

    Here's an example of how you can configure the APIkit Router to handle the pass-through resources:

     

    <apikit:router config-ref="APIkit_config" >

    <apikit:router-entry catchAll="true" resource="your_backend_resource_name" target="pass-through-flow"/>

    </apikit:router>

    In this example, all requests that don't match any of the explicitly defined router-entry elements will be routed to the "pass-through-flow" flow, which can simply proxy the request to your backend API.

     

    You can also use the "default-entry-point" attribute to route all requests that don't match any of the explicitly defined router-entry elements to a specific flow.

     

    It's also important to note that you will need to add the catchAll attribute as true to all the resources other than the 2 resources for which you need to handle the payload transformation.

0/9000
5 answers
  1. Jul 6, 2018, 5:28 PM

    @rajesh0708, I am assuming you are creating the project from a maven archetype considering these statements. You are allset, in my opinion. I hope you know how to install maven dependencies to your local repositories. Just use the below commands.

     

    mvn install:install-file -Dfile=sapjco3.jar -DgroupId=com.sap.conn.jco -DartifactId=sapjco3 -Dversion=3 -Dpackaging=jar -Dclassifier=windowsx86_64

    mvn install:install-file -Dfile=sapidoc3.jar -DgroupId=com.sap.conn.jco -DartifactId=sapidoc3 -Dversion=3 -Dpackaging=jar

    mvn install:install-file -Dfile=sapjco3.dll -DgroupId=com.sap.conn.jco-native -DartifactId=sapjco3 -Dversion=3 -Dpackaging=dll

    mvn install:install-file -Dfile=sapjco3.jar -DgroupId=com.sap.conn.jco -DartifactId=sapjco3 -Dversion=3 -Dpackaging=jar -Dclassifier=linuxx86_64

    mvn install:install-file -Dfile=libsapjco3.so -DgroupId=com.sap.conn.jco-native -DartifactId=sapjco3 -Dversion=3 -Dpackaging=so

     

    Also, you should see a Profiles tag in your pom.xml file. On Windows based OS, it should activate by default to Windows. Although, while deploying to cloudhub, you'll need to build by specifying the Linux profile, as Cloudhub is deployed on a Linux based OS. So your command for build before deploying should `mvn clean package -P Linux`(or whatever is the profile id in your pom.xml file)

0/9000

Hi,

 

I am trying to add the SAP jar dependencies for AnyPoint Studio 7.1.

I managed to successfully add the jar files (sapjco3.jar and sapidoc.jar) by installing them as local maven dependencies, but am stuck with the JCo native library (sapjco3.dll). I wasn't able to find any examples for the latest Studio version.

 

Anyone has an idea how it's supposed to be done? Any insights would be greatly appreciated.

Thank you all.

 

Dependencies in my pom.xml so far:

 

<dependency>

<groupId>org.mule.connectors</groupId>

<artifactId>mule-sap-connector</artifactId>

<version>4.0.0</version>

<classifier>mule-plugin</classifier>

</dependency>

<dependency>

<groupId>com.sap.conn.idoc</groupId>

<artifactId>com.sap.conn.idoc.sapidoc3</artifactId>

<version>3.0.16</version>

</dependency>

<dependency>

<groupId>com.sap.conn.jco</groupId>

<artifactId>com.sap.con.jco.sapjco3</artifactId>

<version>3.0.15</version>

</dependency>

 

Shared libraries:

 

<sharedLibraries>

<sharedLibrary>

<groupId>com.sap.conn.idoc</groupId>

<artifactId>com.sap.conn.idoc.sapidoc3</artifactId>

</sharedLibrary>

<sharedLibrary>

<groupId>com.sap.conn.jco</groupId>

<artifactId>com.sap.con.jco.sapjco3</artifactId>

</sharedLibrary>

</sharedLibraries>

6 answers
  1. May 4, 2018, 3:33 PM

    Hi, @tane, as a quick fix, manually download the sapjco3.dll file, place it in your project folder. In the Studio's Package Explorer, right click on the file, Build Path > Add to Build Path. It just worked for me.

0/9000

Hi ,

 

I have requirement to connect NetSuite File Cabinet from Mule and access the files from NetSuite File Folders, rename the file etc. I could explore the MuleSoft provided NetSuite Connector but file integration API does not exists in the list.Please let me know the solution or alternate design approach for the same.

 

Thanks

Viji

2 answers
  1. Oct 30, 2017, 6:53 PM

    Hi, @viji_winzet, MuleSoft's NetSuite Connector does have direct solution or workaround for your approach.

    1) To access the files from NetSuite File Folders - Use GetRecord operation, and provide the internalId of the file.

    2) To rename a file - (No direct operation through MuleSoft NetSuite Connector.) You can read the content of the file with the GetRecord operation as mentioned above, then using AddFile operation you can create a new file with the desired file name (which will result in the creation of a new file with a new internalId), and store the payload in the new file and then delete the old file using DeleteRecord operation.

0/9000

Hi,

I imported template in my studio(6.3.0),i added the security plugin to my studio also.

One of the component shows unknown.

In configuration, XML look like

---------------------------------------------------------------------------------------

 

<mule-ss:delegate-security-provider

name="memory-provider" delegate-ref="authenticationManager" />

</mule-ss:security-manager>

----------------------------------------------------------------------------------------

Unknown component in my flow?

 

thank you,

 

1 answer
  1. Sep 6, 2017, 6:43 AM

    Hi, @info143, the component displays 'Unknown' only graphically. It is a piece of code snippet directly from the spring framework. More information on it is here.

0/9000