on 10-22-2020 11:54 AM
Hi all,
we have begun to make our first steps in developing a custom adapter using the Data Provisioning SDK for the DP Agent.
But for now we unfortunately have some issues in trying to be able to use the debugging functionalities.
In the tutorial we tried to follow the steps „Import the Launch Configuration“ (https://help.sap.com/viewer/e974128d984d4bfeaa0c0b582ce24d79/2.0_SPS04/en-US/ccb45b9cd2e14e17808a790...)
The issue in detail: we do not find the launch configuration to import into HANA Studio…
… and therefore cannot proceed with the following steps to debug our code, but this is essential in diving deeper into the code and develop sophisticated logic.
The launch configuration does not exist in the folder of our DPA Installation (2.5.1.1) (<dpa-root>/ui) as described in the SDK guide:
BTW: We could successfully fulfill installation steps „Install the Data Provision Feature“ and „Create a Custom Adapter Using a New Plug-in Project“ of the SDK guide, so we are able to build and deploy our custom adapter.
Any inspiring idea is welcome! 🙂
Thanks a lot in advance,
Marco
Attachments:
Java-Version
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
local DPAgent-Version
dpagent.version=2.5.1.1
lcmsdk.version=2.5.28
dpagentservice.version=2.5.0
dpadapters.version=2.5.0
repagent.syb.version=15.7.1SP210
repagent.sybfilter.version=15.7.1SP214
sqlanywhere.version=16.0.0.1691
ms.vcredist.2010.version=10.0.40219
ms.vcredist.2015.version=14.0.24212
ocs.version=16.0.03.06
ci.version=1.9.0-rc-2
dataservices.engine.version=14.2.14.2681
dataservices.lib.version=14.2.8.1504
dpagent.build.version=2.5.1.1
Interesting. I was about to argue that it must be there, checked my Linux installation and indeed there is a file AgentConfig.launch in the ui directory. Then I wanted simulate an import on the windows computer and no such file can be found!
Anyway, this is the content of the AgentConfig.launch file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/AgentConfig"/>
<booleanAttribute key="default" value="true"/>
<booleanAttribute key="default_auto_start" value="true"/>
<intAttribute key="default_start_level" value="4"/>
<booleanAttribute key="includeOptional" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dframework.debug.headers=true -DinstallDir=. -Dframework.log.dir=./log"/>
<stringAttribute key="pde.version" value="3.3"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="target_bundles" value="com.sap.hana.dp.adapterframework@default:default,com.sap.hana.dp.agent@default:default,com.sap.hana.dp.log4jfragment@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.console@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<stringAttribute key="workspace_bundles" value="TestAdapter@default:default"/>
</launchConfiguration>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Werner,
thank you very, very much! It is working like a charm. 🙂
Only little thing I had to change was the working directory under the 'Arguments' tab to point to my local DPAgent-Installation-folder,
MIstakenly it was pointing to 'c:\windows\system32' for whatever reason. 🙂
If I had known earlier, that I get the right answer within 6 hours here, I would not have opened an high priority incident nearly 2 weeks ago and still waiting for an answer from SAP support team.
But just out of interest: Where did you find the AgentConfig.launch file, if you had no luck in finding it in your Linux/Windows installation, as well?
You made my day. 🙂
Marco
Hi werner.daehn,
hi all.
After some testing I am struggeling with another challenge:
I created the AgentConfig.launch file and copied your content into it. So, I was able to start und launch my local installation of the DPAgent and connect in to our HANA (onPremise).
Unfortunately, in the conosole window I am missing the "osgi>" prompt and therefore I am not able to call framework methods like "dplogin" or "dpregisteradapter".
Do you (or anyone else) have an idea, what I am (eventually) doing wrong? Or maybe a bundle in the configuration is missing?
Thanks a lot for your time and support,
Marco
Worth a try.
If SAP would get rid of the OSGi Framework and use Maven as everybody else, that would help us all as well.
Hi werner.daehn ,
sorry to bother you again. But maybe this one is also easy for you to solve?
https://answers.sap.com/questions/13175118/data-provisioning-adapter-sdk-no-pushdown-of-adapt.html
Thank you very much in advance,
Marco
BTW: Using eclipse to launch our local dpagent in debug mode shows the "osgi>" prompt! 🙂 Eclipse-Version: 2020-09 (4.17.0) Build id: 20200910-1200
User | Count |
---|---|
74 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.