on 04-02-2007 9:25 PM
I tried to use the external libraries - POI Jars for Excel API.
I followed the steps stated in this blog:
/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro
A bit of (impractical) scripting for Web Dynpro
From the few forum posts that I have read, I get to know that this blog is outdated and it is not suitable for SP16.
In fact, I read quite some number of post in SDN about using external libraries in WDP DC. But I can't really find anything fit for SP16.
I am quite upset that this little thing spent me so many hours. And I don't understand something works in SP11, and end up outdated and not working for the newer version for DC architeture.
I just wish someone can write a blog on this (as I really see so many people having the same problem like I do... most of the posts on this topic are not answered yet).
I really need help on this.
Please advise.
Thanks in advance.
Kent
Hi Kent,
I dont know why it is not working with you. But, I have used external library for excel upload and it is running perfectly for my application.
My application is running on NW04 SP17. I have no issues with this procedure.
What error it is giving to you? Or what issue you are facing wih this procedure?
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kent... i m getting same error. pls tell me how u solve this.
regards,
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I just ended up going through this pain as well. I'm on 2004s SP10.
Basically, <a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro's blog</a> is perfectly suited to accomplish what you're trying to do. The only thing you have to check in 2004s is that the External Lib DC's public part should have <i><b>assembly</b></i> as its purpose (it defaults to <b><i>compilation</i></b>). Make this change, and then rebuild exteranal lib DC & and check in any related activities.
This has worked for me.
Good luck!
Roman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kent,
Just got another point for your problem,
You are creating an External library DC right? Do you use the Software
Component (SC) of your Track or r u using the Local Development SC
(MyComponents) as shown in both the blogs??
If so, then please use the SC of your track to create the external library and its
Wrapper DC (J2EE Library) . If you have already being doing so, then i'll get back if
I come across any thing new wrt your problem.
Regards,
Alka.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kent,
My blog outlines certain steps that must be executed in order. Please try to verify every step and say when you fails.
1. Create External library project, add jars, expose public part, build
Does you it performed correctly? Can you see public part ExternalLib jar created on file system in NW IDE?
2. Create J2EE Server / Library project, build it.
Does built executed successfuly? Can you see defLib.jar or your custom public part?
3. Deploy server library.
Is it deployed correctly? Can you see it in VisualAdministrator?
4. Create WD project, add public part and <b>runtime reference</b> to necessary library.
As it noted by readers in comments to blog, sometimes not all public parts are created automatically in steps [1]-[2]. So just create them manually.
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Valery.
I still get the same error after re-try.
First, when build the poi/jars, it does not generate the <var>ExternalLibs</var> Public Parts, so I did it manually. The built is sucessful without any error.
Second, after adding the ExternalLibs PP to poi/lib DC as Used PP. Then I built it. It has finished with Warning.
Then I check this:
In poi/lib DC, <var>gen/default/deploy</var> folder, I don't see the 3 jars that I added to Used PP.
Only in <var>gen/default/plublic/defLib/lib/java</var> folder, I see the 3 jars.
Here is the warning message:
<Error Message>
<i>Apr 7, 2007 12:20:10 AM /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] WARNING: poi/lib: built with warnings sap.com/poi/lib(MyComponents) in variant "default" (1.407 sec) :
-
Build log -
Development Component Build (2007-04-07 00:20:09)
Component name: poi/lib
Component vendor: sap.com
SC compartment: MyComponents
Configuration: LocalDevelopment
Location: local
Source code location: KCHAI@SEALKC
DC root folder: C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\DCs\sap.com\poi\lib\_comp\
DC type: J2EE Server Component
DC subtype: Library
Host: SEALKC
DC Model check:
[dcmake] All used DCs are available locally
[dcmake] validating dependency to build plugin "sap.com/tc/bi/bp/addLib"
[dcmake] validating dependency to public part "ExternalLibs" of DC "sap.com/poi/jars"
[dcmake] DC model check OK
Start build plugin:
[dcmake] using build plugin: sap.com/tc/bi/bp/addLib
[dcmake] starting build plugin from : C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\
Build Plugin 'AdditionalLibraryPlugin', Version 7.00 SP 9 (645_VAL_REL, built on 2006-08-26 18:16:50 CEST)
development component: poi/lib (sap.com)
software component: MyComponents (demo.sap.com)
location: local
type: J2EE Server Component, subtype Library
build variant: default
source location: KCHAI@SEALKC
plugin start time: 2007-04-07 00:20:09 GMT-05:00 (EDT)
Java VM: Java HotSpot(TM) Client VM, 1.4.2_09-b05 (Sun Microsystems Inc.)
General options:
convert *.xlf to *.properties: yes
include sources for debugging: yes
Warning: Source folder does not exist, will be ignored: server
Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
Plugin initialized in 0.062 seconds
Preparing data context..
No 'default' JDK defined, will use running VM.
Generating application-dd.xml
Data context prepared in 0 seconds
Executing macro file..
Using macro file: C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\macros\build.vm
Creating output file: C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\DCs\sap.com\poi\lib\_comp\gen\default\logs\build.xml
Macro file executed in 0.11 seconds
Starting Ant..
Using build file: C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\DCs\sap.com\poi\lib\_comp\gen\default\logs\build.xml
Using build target: build
Generation folder: C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\t\0F4CF3B8D71561AB9FB1D5C4FF35791A
Using Ant version: 1.6.2
createPublicParts:
[mkdir] Created dir: C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\DCs\sap.com\poi\lib\_comp\gen\default\public\defLib\lib\java
[copy] Copying 3 files to C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\DCs\sap.com\poi\lib\_comp\gen\default\public\defLib\lib\java
createDeployArchive:
[mkdir] Created dir: C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\t\0F4CF3B8D71561AB9FB1D5C4FF35791A\sdaprep
[cda] Creating descriptor server/provider.xml ...
[cda] WARNING: Ignoring invalid runtime dependency on poi/jars (sap.com), type External Library
packDeployArchive:
[srcpacker] Creating source archive
[srcpacker] No sources available for packing, no archive will be created.
[timer] Source archive creation finished in 0.031 seconds
[dcinfo] Creating deploy archive info
[jarsap] Info: JarSAP version 20041217.1600
[jarsap] Info: JarSAPProcessing version 20060104.1634 / JarSL version 20060518.1400
[jarsap] Property jarsap.info.dir is not set.
[jarsap] Building: C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\DCs\sap.com\poi\lib\_comp\gen\default\deploy\sap.compoilib.sda with compression
[timer] JarSAP finished in 0.266 seconds
Ant runtime 1.172 seconds
Ant build finished with WARNINGS
Build plugin finished at 2007-04-07 00:20:10 GMT-05:00 (EDT)
Total build plugin runtime: 1.344 seconds
Build finished with WARNING
</i>
</Error Message>
To help you guys understand my error, I attached the link for the print screens of the DC structure.
<a href="http://sapnetweaverforum.blogspot.com/2007/04/using-external-jars-in-web-dynpro.html">Link for Print Screens for poi/jars and poi/lib DCs</a>
Thanks for advise again.
Kent
In fact, I remove the whole DC, and recreate a new one with different name. But the same result persists.
I wonder I can just open up the.sda zip and put in the jar files , and re-zip again, then deploy to the server with SDM.
Or is that going to works if I move the jar files directly to the server (under the ..\j2ee\cluster\server0\bin\ext), then configure the properties from the studio.
I wonder anyone have done this before.
Thanks for advise.
Kent
Hi Kent,
It seems weird. It should work otherwise you missed something.
Please check following things one by one.
1. You have created External Library and you have included 3 Jars in it.
2. You have created public parts for these Libraries. There should be two public parts.
i. Public part of type API.
ii. Public part of type Assembly
Make sure that you have included all 3 jars in both public parts.
3. Make sure that above created public parts are added in Used DCs in Java Library type DC.
4. Now, if all above steps are fine then sync used dcs for Java Library DC.
5. Rebuild Java Library DC.
6. Now, check in deploy folder for this Java library dc. It should be there.
Let me know each step result.
Regards,
Bhavik
Hi Kent,
The method of using external library as mentioned in the blog works fine with me, even in NWDS04s. But if it is not working with you then u can use the technique mentioned in the following blog:
/people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas
The method is somewhat similar here, bu does not create an extra DC of type J2EE Library.
Hope it helps.
Regards,
Alka.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,Alka.
The blog mentioned that we just need to build one DC with External Library type.
I followed all the steps, but when come to adding the jars to:
ExternalLibCompilation and ExternalLibAssembly. When I right click the jar, click Add to Public Part, it does not provided me the option to choose:
1) Provides an API for developing/compiling other DCs
2) Can be packaged into other build results (e.g. SDAs)
This option will only available for the DC of J2EE Server Component -> Library type, not for the ExternalLibrary DC type (at least in my SP16 Dev Studio, I am not sure there is a bug on that). When I add the jar to the Public Parts, it added straight away without letting me select these options.
I am not sure I need to take suggestion that I should install some SP version, and build and deploy the DC to the server, and get back to SP 16 later.
Please advise.
Alka, I am able to create the PoiCompilation and PoiAssembly now.
But during the DC build. I have this warning.
Apr 4, 2007 2:08:01 AM /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] WARNING: poi/jars: built with warnings lenovo.com/poi/jars(MyComponents) in variant "default" (0.328 sec) :
-
Build log -
Development Component Build (2007-04-04 02:08:01)
Component name: poi/jars
Component vendor: xxx.com
SC compartment: MyComponents
Configuration: LocalDevelopment
Location: local
Source code location: xxxxx
DC root folder: C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\DCs\xxx.com\poi\jars\_comp\
DC type: External Library
Host: xxxxx
DC Model check:
[dcmake] All used DCs are available locally
[dcmake] validating dependency to build plugin "sap.com/tc/bi/bp/externalarchive"
[dcmake] DC model check OK
Start build plugin:
[dcmake] using build plugin: sap.com/tc/bi/bp/externalarchive
[dcmake] starting build plugin from : C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\externalarchive\_comp\gen\default\public\lib\
Build Plugin 'ExternalArchivePlugin', Version 7.00 SP 9 (645_VAL_REL, built on 2006-08-26 18:16:42 CEST)
development component: poi/jars (xxx.com)
software component: MyComponents (demo.sap.com)
location: local
type: External Library
build variant: default
source location: xxxxx
plugin start time: 2007-04-04 02:08:01 GMT+08:00 (CST)
Java VM: Java HotSpot(TM) Client VM, 1.4.2_09-b05 (Sun Microsystems Inc.)
General options:
convert *.xlf to *.properties: yes
include sources for debugging: yes
Plugin initialized in 0.031 seconds
Preparing data context..
No 'default' JDK defined, will use running VM.
Data context prepared in 0.016 seconds
Executing macro file..
Using macro file: C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\externalarchive\_comp\gen\default\public\lib\macros\build.vm
Creating output file: C:\Documents and Settings\KCHAI\.dtc\LocalDevelopment\DCs\xxx.com\poi\jars\_comp\gen\default\logs\build.xml
Macro file executed in 0.031 seconds
Starting Ant..
Using build file: C:\Documents and Settings\xxx\.dtc\LocalDevelopment\DCs\xxx.com\poi\jars\_comp\gen\default\logs\build.xml
Using build target: build
Generation folder: C:\Documents and Settings\xxx\.dtc\LocalDevelopment\t\AF4208745BE190431BA27123536001B0
Using Ant version: 1.6.2
createPublicParts:
[pppacker] Packing assembly public part 'PoiAssembly'
[pppacker] Packed 1 file for entity poi-2.5.1-final-20040804.jar (Archive/Java Library)
[pppacker] Packed 1 file for entity poi-contrib-2.5.1-final-20040804.jar (Archive/Java Library)
[pppacker] Packed 1 file for entity poi-scratchpad-2.5.1-final-20040804.jar (Archive/Java Library)
[pppacker] Packed 3 entities for assembly public part 'PoiAssembly'
[timer] Packing of assembly public part 'PoiAssembly' finished in 0.031 seconds
[pppacker] Packing compilation public part 'PoiCompilation'
[pppacker] Packed 1 file for entity poi-2.5.1-final-20040804.jar (Archive/Java Library)
[pppacker] Packed 1 file for entity poi-contrib-2.5.1-final-20040804.jar (Archive/Java Library)
[pppacker] Packed 1 file for entity poi-scratchpad-2.5.1-final-20040804.jar (Archive/Java Library)
[pppacker] WARNING: Can not overwrite file C:\Documents and Settings\xxx\.dtc\LocalDevelopment\DCs\xxx.com\poi\jars\_comp\gen\default\public\PoiCompilation\lib\java\poi-scratchpad-2.5.1-final-20040804.jar
[pppacker] WARNING: Can not overwrite file C:\Documents and Settings\xxx\.dtc\LocalDevelopment\DCs\xxx.com\poi\jars\_comp\gen\default\public\PoiCompilation\lib\java\poi-contrib-2.5.1-final-20040804.jar
[pppacker] WARNING: Can not overwrite file C:\Documents and Settings\xxx\.dtc\LocalDevelopment\DCs\xxx.com\poi\jars\_comp\gen\default\public\PoiCompilation\lib\java\poi-2.5.1-final-20040804.jar
[pppacker] Packed 3 entities for compilation public part 'PoiCompilation'
[timer] Packing of compilation public part 'PoiCompilation' finished in 0.031 seconds
Ant runtime 0.093 seconds
Ant build finished with WARNINGS
Build plugin finished at 2007-04-04 02:08:01 GMT+08:00 (CST)
Total build plugin runtime: 0.187 seconds
Build finished with WARNING
And as expected , I added these Public Parts to my Excel WebDynpro DC. It throws me the same error:
java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
Please advise.
Thanks.
Kent
Hi Kent,
I'm not sure of the warnings you got in creation of the External Library but for the Web Dynpro DC, i would like to ask if you followed the last step mentioned in the BLOG which says...
Caveat confector:
One should always remember this significant and valid point: 'Use ONLY DC Builds to create the deployable archive if you work with assembly public parts.'. Let me explain this clearly. We have added a public part of type 'Assembly' to the WD DC and hence, the local create archive options are not supported. <b>So, never use the function 'Create archive' or 'Deploy new archive and run' while working with 'Assembly' type public parts. Instead, always use the DC 'Build', after that DC 'Deploy' and then simply 'Run' the WD application.</b>
if not please follow them, I think it should work.
Hope it solves the problem.
Regards,
Alka.
Hi Kent,
I am not sure what is the problem out there with your external library creation and
its deployment. I have consulted my other colleagues too, but we are not getting
the problem. I would just like to say that, please try building Web Dynpro DC
again, then DC deploy and then Run. Also make sure that
you have build your External Library project after
creating the new public parts, before building the Web
Dynpro DC.
I know you must have followed the steps mentioned in the
Blog very well, but just to give it a try please change
the dependency type of the compilation type Public Part
to build time and run time.
If this does not solve the problem, then I don't think i will be able to help in that case.
Regards,
Alka.
Message was edited by:
Alka Panday
Hi Kent,
I guess you have done all things but didn't provide Library reference in your WD project. Because of this, it is giving you a ClassNotFoundException at runtime.
Right click on your WD project and select Properties. Here, in properties, select Webdynpro References.
goto Library references tab and add reference for your J2EE library you have deployed on the server.
For Example,
if Provider is sap.com then, sap.comdc<library dc name>
Also you can check it out, exact name for reference in Visual administrator under deploy services.
Let me know if it is still not working.
Regards,
Bhavik
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.