on 07-09-2004 1:40 AM
Hi,
If i need to use an external jar file in a Webdynpro application and i add the same thro the application > properties> java settings , the same addition is missing the next time i compile the project.
So every time i do a compile i have to add the jar.
Moreover, sometime when the build time is very long like 5 minutes, the external jar goes missing halfway thro the compilation and gives me a build error that the file is missing.
Is there some work around for this?
Regards,
Balaji
Hey,
this was kinda tough! We were trying for ages to add the Oracle database driver classes12.jar to a Web Dynpro-DC and finally - with your suggestions - it worked!
We did the following:
1. We extracted the jar file into src / packages
I didnt try it with an extra DC that wraps the jar, maybe at a later stage. I'm so glad it works now...
The problems was that we're on SP09 which means there's no "External Library"-DC available, and none of the other workarounds worked (the ones you find on SDN).
Anyways, be sure to proceed as follows:
1. Development Component -> deploy
2. Web Dynpro > Applications -> Run
"Deploy new archive and run" somehow doesn't work!
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<b>It's as easy as importing the necesary jar files to the "lib" folder of your project in the navigator window.</b>
There's no need to create additional components, or extract the jar's source files to the src/Packages foldaer.
Regards,
Homer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For development components, you need to declare a new Java library component that wraps the jar files. I created one for all my build time libraries. Then it will work properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do you add the jar file to the Java Library component? I only see one XML file with no options for adding. Also, when you add the jar file to this project does it automatically add the jar to the DTR? After you add it to the java library DC, then do you create PP's to both use during compilation and deployment?
Thanks,
Dustin
There is a tab that says external jar files in the java library projects. But this only appears when you are building a non-DTR local project, IIRC.
This might have changed for the later service packs, where you might be able to add external jars in some magical way.
For our development in stack 3, however, our solution was to unpack entire jar file(s) into a folder using winRar. We then create a development component around this folder, making one public part for all the jars contained in this folder ( using the folder tree option). This set of includes can be made more granular.
When the development component gets compiled, it will generate a jar file that is identical to the external jar file's original format. You can then check in this whole beast into the DTR. The advantage of this approach is that you can decide if you want to put your jar files as another web dynpro component, or include them into your ear files.
Thank you very match NagaKishore,
step by step to success
I could code my syntax in my web-dynpro-component without syntax errors, but when I'm going to deploy and start my application, I got this error:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for view net.stauff.ActivitiesView. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:110)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.<init>(DelegatingView.java:41)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.createUninitializedView(ViewManager.java:487)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:524)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:422)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
...
What is wrong with my component ?
thx a lot.
greetings
sascha
My first fault was, that I wrapped the Jar's in a normal Java-Component, so I could not deploy it. ;-(
Now I put the Jars in a Web-Dynpro-Component. My Coding in the view is the same and correct, but the error I described, is the same.
Should I do something in my Application component ?
Thats the class:
Caused by: java.lang.NoClassDefFoundError: org/apache/poi/poifs/filesystem/POIFSFileSystem
thx a lot
armin
Message was edited by: Sascha Buhmann
Extracting external jars into a source catalog is in my opinion a nasty workaround.
I usually do the following:
1) Put the jar file in the lib folder inside the WebDynpro project
2) Add the jar to the project classpath by right clicking on the project and choose Properties/Java Build Path/Libraries/Add JARs
This makes the classes inside the jar available at compile time as well as runtime.
And this problem does not occur as long as i use the Rebuild project.
But when i use DC Build then it resets/removes the external jars that have been added.
Regards,
Balaji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.