Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
kurzkano
Contributor III
Contributor III

tELTSAPMap: BAPI failed to start the background job

Hi community,

we're running Talend Cloud API Services with Studio R2020-07-7.3.1, the SAP modules installed are from TEDK910058.zip. Using tELTSAPMap to extract data from several tables we run into an error AFTER the data has been extracted and placed on the FTP server:

-

[ERROR] org.talend.sap.impl.SAPConnectionFactory- BAPI failed to start the background job

[FATAL] sapservices.sap_tablejoin_0_1.SAP_TableJoin- tELTSAPMap_1 BAPI failed to start the background job

java.lang.RuntimeException: BAPI failed to start the background job

at org.talend.sap.impl.model.table.SAPBatchDataIndexBased.nextReader(SAPBatchDataIndexBased.java:153) ~[sap-impl-8.0.1.jar:?]

at org.talend.sap.impl.model.table.SAPBatchDataIndexBased.nextRow(SAPBatchDataIndexBased.java:136) ~[sap-impl-8.0.1.jar:?]

at sapservices.sap_tablejoin_0_1.SAP_TableJoin.tELTSAPMap_1Process(SAP_TableJoin.java:1443) [classes/:?]

at sapservices.sap_tablejoin_0_1.SAP_TableJoin.runJobInTOS(SAP_TableJoin.java:2505) [classes/:?]

at sapservices.sap_tablejoin_0_1.SAP_TableJoin.main(SAP_TableJoin.java:2138) [classes/:?]

Exception in component tELTSAPMap_1 (SAP_TableJoin)

java.lang.RuntimeException: BAPI failed to start the background job

at org.talend.sap.impl.model.table.SAPBatchDataIndexBased.nextReader(SAPBatchDataIndexBased.java:153)

at org.talend.sap.impl.model.table.SAPBatchDataIndexBased.nextRow(SAPBatchDataIndexBased.java:136)

at sapservices.sap_tablejoin_0_1.SAP_TableJoin.tELTSAPMap_1Process(SAP_TableJoin.java:1443)

at sapservices.sap_tablejoin_0_1.SAP_TableJoin.runJobInTOS(SAP_TableJoin.java:2505)

at sapservices.sap_tablejoin_0_1.SAP_TableJoin.main(SAP_TableJoin.java:2138)

-

The data files remain on the FTP server.

A trace on SAP side shows no problems. The configured FTP user can create, read and delete files in the FTP directory.

Any ideas what is going wrong?

Best regards

Norbert

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

Update 2020-09-16:

Running the job in JAVA TRACE mode in Studio, this exception is thrown:

-

Exception in thread "main" java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.ExceptionInInitializerError: Illegal JCo archive "sapjco3-6.0.0.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar".

at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:230)

at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:99)

at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)

at com.sap.conn.jco.rt.RuntimeEnvironment.<init>(RuntimeEnvironment.java:43)

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

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

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

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

at java.base/java.lang.Class.newInstance(Class.java:584)

at com.sap.conn.jco.ext.Environment.getInstance(Environment.java:155)

at com.sap.conn.jco.ext.Environment.registerDestinationDataProvider(Environment.java:259)

at org.talend.sap.impl.AbstractSAPFactory.<clinit>(AbstractSAPFactory.java:41)

at sapservices.sap_tablejoin_0_1.SAP_TableJoin.tELTSAPMap_1Process(SAP_TableJoin.java:1379)

at sapservices.sap_tablejoin_0_1.SAP_TableJoin.runJobInTOS(SAP_TableJoin.java:2486)

at sapservices.sap_tablejoin_0_1.SAP_TableJoin.main(SAP_TableJoin.java:2141)

-

The SAPJCO3.JAR version is 3.0.14. Does this help to identify the error?

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

Update 2020-09-16 after further investigation:

The last mentioned exception "It is not allowed to rename or repackage the original archive sapjco3.jar" seems to refer to an old bug and is only thrown when using SAPJCO3.JAR version 3.0.14 and also the most actual 3.1.2. See https://jira.talendforge.org/browse/TUP-23506

It is NOT thrown when using SAPJCO3.JAR version 3.0.10! With this old version the original exception "BAPI failed to start the background job" is thrown.

-

I'll open a support case now.

Labels (2)
1 Solution

Accepted Solutions
kurzkano
Contributor III
Contributor III
Author

Thanks to Tripti from Talend Support things are clear right now:

First of all: the SAPJCO version related error has nothing to do with the tELTSAPMap topic. Though the mentioned exception is thrown when running a JAVA TRACE tELTSAPMap works as expected - if the configuration is correct :).

Ok, tELTSAPMap has two components:

  • The SAP part extracts data and writes it to files configured in the FTP path item (e.g. "/sapftp/talend/" ). You need to specify the full path here as the user running the according BAPI needs to where to put the files.
  • The FTP part is running with the configured FTP user which has nothing to do with the SAP user running the BAPI. In our case this FTP user is configured to use "/sapftp/talend/" as root path "/" and is not allowed to change path to "/sapftp/talend/".

You can verify your configuration by just using a FTP job. In our case this throws the error "Failed to change remote directory."

View solution in original post

2 Replies
kurzkano
Contributor III
Contributor III
Author

Thanks to Tripti from Talend Support things are clear right now:

First of all: the SAPJCO version related error has nothing to do with the tELTSAPMap topic. Though the mentioned exception is thrown when running a JAVA TRACE tELTSAPMap works as expected - if the configuration is correct :).

Ok, tELTSAPMap has two components:

  • The SAP part extracts data and writes it to files configured in the FTP path item (e.g. "/sapftp/talend/" ). You need to specify the full path here as the user running the according BAPI needs to where to put the files.
  • The FTP part is running with the configured FTP user which has nothing to do with the SAP user running the BAPI. In our case this FTP user is configured to use "/sapftp/talend/" as root path "/" and is not allowed to change path to "/sapftp/talend/".

You can verify your configuration by just using a FTP job. In our case this throws the error "Failed to change remote directory."

Anonymous
Not applicable

Hello,

Thanks for sharing it with us on community. I will set this topic as resolved to help other find it easily.

Best regards

Sabrina