on 07-12-2005 7:45 PM
Hello everyone:
I needed to include some jar files in my WebDynpro project, so I created a new J2EE Server Component -> Library and added the jar there in the Java Build Path -> Add external Jars.... so I successfully deployed the library in the server.... I heard that was enough to set the required jar file into the server.... but now, how can I get to "use" it in my deployed webDynpro app? I get the classNotFound thing.... how can I reference it? I can't get to do it, I think I'll end uploading the jar file and setting it in the server CLASSPATH =(
Thanks
ok this is what I did:
My main project is called Webform. It needs a jar called CCSDB.jar. When I compile Webform, it's ok since the jar is correctly imported in the libraries.
I created the Java Lib as I explained before and I called it CCSDB2. So I checked the server/provider and I replaced sap.com for "netwin" without the quotes. After that, I compiled CCSSDB2 and created a CCSSDB2.sda file, which I succesfully deployed.
Now I go back to WebForm and added an entry to project->properties->Web dynpro preferences with:
netwin/CCSSDB2
I rebuilt the project and successfully deployed.
now I run the Webform and I see the "login" screen... in that screen I have a GO button which is the one that calls the CCSSBD.jar......... but I keep getting the java.lang.NoClassDefFoundError for that specific classes....
Am I missing something? thanks a lot for your help, I appreciate it a lot.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
1.Open server/provider.xml
2. You should be able to see 4 tabs in the bottom of that window.
General,Jars,References,Source
3.In this select Jars -> click on Jars folder icon shown. Now add.
4.When u say add it will open a pop up which lists all the projects currently open.YOur webform will also be there if it is open
5.Select and expand it -> now you should be able to see
CCSDB.jar which you have added in the external jars of that project.
6.Add it .
7.Now build archive and deploy that archive.
8.Now take the webform project .Go to webdynproreferences ->library refernce -> add
sap.com/<the library proj name> the one which you have deployed.
Now run the application
Regards
Bharathwaj
thanks for everything.... I couldn't exactly test it since my dependencies broke, but it was my fault, due to unorganized projects.... I'm starting all over again.
However, I do believe that will do!
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Prerequisites: A library project
Now expand the project.Now you should be able to see it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI:
Where's the server/provider.xml?
Thanks a lot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello:
I've checked the .ear file and it has only the .wda and deployment descriptors inside.... no jars =(
After a closer look to the wda file I notice a lib dir and an app.jar file.. I wonder if I could put my jar inside that lib directory.... will refactoring and redeployment erase the current ear file (if i put inside the jar manually) for a new one?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello:
thanks for your help.
"Well after selecting the external jar in the libraries tab from the JAVA build path also try selecting the jar from the Order/Export Tab though not required.
Now if you have done that where are you getting the error. Are you able to access the class and its methods. Is it giving you a error at runtime or compile time."
I did add the jar file and so it does compile correctly. The thing is, I believe the "Deploy process" doesn't take the external jar too, so those classes does not exists in the server...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alejandro,
If you have made library project and deployed on server, then just make a reference of this loibrary project in your application.
For that goto properties of your project.then goto Webdynpro references-> library references.
there make one entry sap.com/<Library project name>
then it will take those JARs at runtime from server only.
Regards,
Bhavik
hi,
Go to properties -> WebDynpro References -> Library Reference ..here add sap.com/ur library proj name
Apply the changes and rebuild all .Now it will take the file from the server,
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Well after selecting the external jar in the libraries tab from the JAVA build path also try selecting the jar from the Order/Export Tab though not required.
Now if you have done that where are you getting the error. Are you able to access the class and its methods. Is it giving you a error at runtime or compile time.
regards
ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.