Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.sap.cloud.adk.archetype-adapter-component-reuse #39

Closed
ottfro1 opened this issue Jan 17, 2024 · 11 comments
Closed

com.sap.cloud.adk.archetype-adapter-component-reuse #39

ottfro1 opened this issue Jan 17, 2024 · 11 comments
Assignees
Labels
contribution Valuable Contribution follow-up-with/dev Clarification with development needed. size/l Requires large effort to get changed. type/examples-samples Related to existing examples/samples, or request for new examples/samples. type/outdated Something is outdated in the documentation. ua-review Under review by the UA team.

Comments

@ottfro1
Copy link

ottfro1 commented Jan 17, 2024

Issue description

We want to use the https://cxf.apache.org/docs/openapifeature.html

Hence we want ot use the
https://camel.apache.org/components/4.0.x/cxfrs-component.html
https://camel.apache.org/components/4.0.x/dataformats/jaxb-dataformat.html

When we use the archetype com.sap.cloud.adk.archetype-adapter-component-reuse for
<component.groupId>org.apache.camel</component.groupId>
<component.artifactId>camel-cxf</component.artifactId>
<component.version>${camel.version}</component.version>

We hit error :
Build failed: Dependency libs/spring-aop-5.3.23.jar is not a valid OSGi bundle

I guess this will be a very common error and it would be good if sap had a documented solution.

There are more spring components with the same problem
spring-beans, spring-context, spring-core, spring-expression, spring-jcl, spring-tx and a bunch of more components

We think the solution should be to use maven
org.apache.felix
maven-bundle-plugin
but so fare we have failed to make it work.

You may be able to use this mehtod https://help.sap.com/docs/integration-suite/sap-integration-suite/create-osgi-bundle?locale=en-US but then the point with using archetype and maven is lost - the process has massive amount of manual work.

A description of how to setup an IDE with java would be good.
SAP should have at least one proven to work IDE with one proven to work java.

When trying this I used NWDS 7.5 sp28 and the bundled maven in eclipse
using sap java SE 1.8
in NWDS "new maven project" and

Group Id se.mycompany.nip.cloud.adk
ArtifactId CIApacheCXF
adapterName : ApacheCXF
adapterId : camel-cxf ApacheCXFID
adapterVendor : org.apache.camel
adapterVersion : 1.0.0

Feedback Type (Optional)

content gaps

Page Title on SAP Help Portal (prefilled)

Develop Adapters Using Archetype

Page URL on SAP Help Portal (prefilled)

https://help.sap.com/docs/integration-suite/sap-integration-suite/develop-adapters-using-archetype

@SrutiSagaram SrutiSagaram added follow-up-with/dev Clarification with development needed. size/l Requires large effort to get changed. type/examples-samples Related to existing examples/samples, or request for new examples/samples. ua-review Under review by the UA team. labels Jan 17, 2024
@SrutiSagaram
Copy link

Hi @ottfro1
Thank you for your feedback, we are looking into it and will get back to you.

@ottfro1
Copy link
Author

ottfro1 commented Jan 17, 2024

in the pom.xml
<adk.version>2.3.0</adk.version>
<camel.version>3.14.7</camel.version>

@ottfro1
Copy link
Author

ottfro1 commented Jan 17, 2024

We also tested using
Eclipse
Version: 2023-06 (4.28.0)
Build id: 20230608-1333

But then we get error
[ERROR] Failed to execute goal �[32mcom.sap.cloud.adk:com.sap.cloud.adk.build.archive:2.3.0:generate-cmd�[m �[1m(generate-metadata)�[m on project �[36mCIApacheCXF�[m: �[1;31mExecution generate-metadata of goal com.sap.cloud.adk:com.sap.cloud.adk.build.archive:2.3.0:generate-cmd failed: A required class was missing while executing com.sap.cloud.adk:com.sap.cloud.adk.build.archive:2.3.0:generate-cmd: javax/xml/bind/JAXBException�[m
[ERROR] �[1;31m-----------------------------------------------------�[m
[ERROR] �[1;31mrealm = plugin>com.sap.cloud.adk:com.sap.cloud.adk.build.archive:2.3.0�[m
[ERROR] �[1;31mstrategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy�[m
[ERROR] �[1;31murls[0] = file:/C:/Users/O1706/.m2/repository/com/sap/cloud/adk/com.sap.cloud.adk.build.archive/2.3.0/com.sap.cloud.adk.build.archive-2.3.0.jar�[m
[ERROR] �[1;31murls[1] = file:/C:/Users/O1706/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/4.0.1/jakarta.xml.bind-api-4.0.1.jar�[m
[ERROR] �[1;31murls[2] = file:/C:/Users/O1706/.m2/repository/jakarta/activation/jakarta.activation-api/2.1.2/jakarta.activation-api-2.1.2.jar�[m
[ERROR] �[1;31murls[3] = file:/C:/Users/O1706/.m2/repository/org/apache/aries/subsystem/org.apache.aries.subsystem.api/1.1.0/org.apache.aries.subsystem.api-1.1.0.jar�[m
[ERROR] �[1;31murls[4] = file:/C:/Users/O1706/.m2/repository/org/apache/aries/org.apache.aries.util/1.1.0/org.apache.aries.util-1.1.0.jar�[m
[ERROR] �[1;31murls[5] = file:/C:/Users/O1706/.m2/repository/org/ow2/asm/asm/6.2.1/asm-6.2.1.jar�[m
[ERROR] �[1;31murls[6] = file:/C:/Users/O1706/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar�[m
[ERROR] �[1;31murls[7] = file:/C:/Users/O1706/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar�[m
[ERROR] �[1;31mNumber of foreign imports: 1�[m
[ERROR] �[1;31mimport: Entry[import from realm ClassRealm[maven.api, parent: null]]�[m
[ERROR] �[1;31m�[m
[ERROR] �[1;31m-----------------------------------------------------�[m
[ERROR] �[1;31m�[m: javax.xml.bind.JAXBException
[ERROR] -> �[1m[Help 1]�[m

A possible solution is to add dependency but we could not make it work

  <!-- https://mvnrepository.com/artifact/jakarta.xml.bind/jakarta.xml.bind-api -->
<dependency>
	<groupId>jakarta.xml.bind</groupId>
	<artifactId>jakarta.xml.bind-api</artifactId>
	<version>4.0.1</version>
</dependency>

We think the archetype should have the necessary dependencies from start.

@ottfro1
Copy link
Author

ottfro1 commented Jan 17, 2024

SAP Business Application Studio - is that a possible IDE?

@ottfro1
Copy link
Author

ottfro1 commented Jan 17, 2024

https://tools.hana.ondemand.com/#cloudintegration

The adapter development process using Eclipse plugin has been deprecated

We tested eclipse oxygen - the same error : Build failed: Dependency libs/spring-aop-5.3.23.jar is not a valid OSGi bundle

creating a project - maven project or adapter project?

@ottfro1
Copy link
Author

ottfro1 commented Jan 17, 2024

oxygene is from 2018 - obsolete and outdated?

2 similar comments
@ottfro1
Copy link
Author

ottfro1 commented Jan 17, 2024

oxygene is from 2018 - obsolete and outdated?

@ottfro1
Copy link
Author

ottfro1 commented Jan 17, 2024

oxygene is from 2018 - obsolete and outdated?

@HarshitaSuryavanshi
Copy link

Hi @ottfro1,
You can follow this blog: https://community.sap.com/t5/technology-blogs-by-sap/sap-cpi-adapter-development-consuming-an-external-jar-into-an-adapter/ba-p/13382631
to use an external service which is non-osgi.

We are in process of updating our Help portal documentation.

@ottfro1
Copy link
Author

ottfro1 commented Feb 22, 2024

Hi @ottfro1, You can follow this blog: https://community.sap.com/t5/technology-blogs-by-sap/sap-cpi-adapter-development-consuming-an-external-jar-into-an-adapter/ba-p/13382631 to use an external service which is non-osgi.

We are in process of updating our Help portal documentation.

Hi Harshita, thanks for the link, unfortunately we have not been able make the linked solution work for the "reuse archetype" scenario. I think SAP should fix the "reuse archetype" so non-osgi ar packed/bundled automatically. At least there should be a clear path to the solution documented.

@HarshitaSuryavanshi HarshitaSuryavanshi added the type/outdated Something is outdated in the documentation. label May 10, 2024
@SrutiSagaram SrutiSagaram added the contribution Valuable Contribution label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution Valuable Contribution follow-up-with/dev Clarification with development needed. size/l Requires large effort to get changed. type/examples-samples Related to existing examples/samples, or request for new examples/samples. type/outdated Something is outdated in the documentation. ua-review Under review by the UA team.
Projects
None yet
Development

No branches or pull requests

4 participants