cancel
Showing results for 
Search instead for 
Did you mean: 

Solving some issues

Former Member
0 Kudos

Welcome programmers,

I would like to find some concrete solutions on the famous SP16 bug, where Developer Studio doesn't include the .jar file to the .sda file when creating an External Library DC.

It seems that there has been a JDI patch to solve this, but to my understanding it only created a new problem, which is that it had problems with building the .sda file.

This problem with getting the .jar into the .sda file is going on now for a while and other topics are referring

to it as well. Some solutions were give, but were not really helpfull to me. This cause I am not really a master at programming in SAP, but I do know some of it.

So I'll try to explain what I did and what went wrong, and highlighting some issues at those problems. So maybe we can solve this for all of us. (especially those who need to work with SP 16)

Concerning the first post:

<b>Solution 1</b>

Quoting Ken Miller

-


I'm still waiting - we've had a few exchanges, and Sap is current investigating.

Near as I can tell, the generated build scripts are broken in Sp16. In Sp15, there's a snippet in the build.xml file that does this:

<copy todir="D:\src\.dtc\LocalDevelopment\t\8A5BD61AD0687C82F61ED34994AAE013/sda" flatten="yes">

<fileset dir="D:\src\.dtc\LocalDevelopment\DCs\sap.com\zzz\test\ext\_comp\gen\default\public\assembly\">

<include name="*/.jar"/>

</fileset>

</copy>

This bit of code is missing in the SP16 build.xml file. There's a fileset definition, but the copy wrapper is excluded. The other strange thing is that the fileset definition looks at the src directory, and not the libraries directory.

I'll be sure to post an update when I know more

-


I think this solution would only work when you find the standard template of the build.xml file Developer Studio uses, cause it will only overwrite it everytime you try to build, archive, or run your project. Thus losing the added code. This is only given from my experience, correct me if I am wrong.

<b>Solution 2</b>

Quoting Marc Wirth

-


Hi,

yes, there's an issue with the SP16 build plugins.

As another workaround you can create a "postbuild.vm" file in the cfg/-folder of the xternal library DC with the following content:

#StartProject("dummy" "build" ".")

#StartTarget("build")

#foreach($pp in $dc_public_parts)

<delete file="$/public/${pp.getName()}/PublicPartFileList.xml"/>

#end

#EndTarget()

#EndProject()

This will simply delete the content descriptor for the public parts of the external library DC. Afterwards the Jar files are correctly included in the J2EE library.

Hopefully, SAP will provide a patch soon.

Best regards,

Marc

-


Don't know if it works, because I've not tried this in my project yet. I do not fully understand the meaning of deleting the content descriptor. I don't think this is really needed, but I'd like to hear from some people who have tried this solution and if it worked.

<b>Solution 3</b>

Quoting Abhay Mhatre

-


I had similar problem with wrapping external jar in Development Component, in NW 2004s SP7 environment.

Here is how I solved it,

1. Open the .SDA file using WinZip.

2. Added the jar file to .SDA file.

3. Added following entry that was missing from provider.xml file

<jars>

<jar-name>mdm4j.jar</jar-name>

</jars>

4. Deployed the updated .SDA using SDM.

Abhay

-


We've tried this, but without really gaining a step towards the solutions. This is because you still need to manually add the .jar file and editing the .xml file. So this is, according to me, only just a temporary solution.

<b>Solution 4</b>

Quoting Ivan Belic

-


Well, the solution is (which is strange) just not to add anything to Entity References of defLib public part, just both public parts from External library DC to Used DCs of Java library DC and then, in DC's where you use jars, just add defLib public part to Used DCs.

Ivan

-


I have not used any Entity References in my project, and neither got trouble from the DCs, but still no .jar.

I really hope someone has tried these solutions and would share his/her experience about it. Or that there is even a person who found the ultimate solution for this. Cause this bug in SP16 is really bugging me. And doing all these steps manually everytime is time-consuming, irritating and not the way to program.

I want to thank you all in advance for all the research about this issue.

Regards,

Philip

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Philip,

is the solution proposed in note 935334 workable for you? (Checking in the ext.Lib and just synching the build results in the IDE).

Regards,

Marc