on 09-14-2005 10:01 AM
Hello,
I have servlet in my web application module, and I try to make RFC call, within it. I use com.sap.mw.jco.*.
I compile it but when run the server respond with
Application error occurs during processing the request.
Details: java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO The ID of this error is
Exception id: [000C763FB7EE00390000001F000007E800043A148A45F9B4
I think that I should packaged the jco lib in my war and make it available to servlet, but how can I do this ?
Thank for any help.
Hello Miroslav,
You have to specify reference in your J2EE application to JCO library:
META-INF\application-j2ee-engine.xml:
<application-j2ee-engine>
...
<reference
reference-type="hard">
<reference-target
provider-name="sap.com"
target-type="library">com.sap.mw.jco</reference-target>
</reference>
...
</application-j2ee-engine>
Best regards, Maksim Rashchynski.
P.S. Please, close the thread if problem is solved and award points for useful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Thanks a lot Maksim, Bhavik, you helped me.
I try to make a reference and now the library ClassNotFound error is gone.
But now I have a next problem with RFC call, I also wrote it to post (Webdynpro VS. Java Servlet). I have a code in which I make RFC call. When I embed this code into regular Java aplication and run, it will return results as I expect. (of course I must run it with jco lib .jar in classpath). But when I run it on my servlet, I got an exception with message: "'mshost' missing"
I don't know what this supposed to mean, because I run the mentioned application, also from PC where I have j2ee engine installed and it work.
If you can please help.
(and thank for your help again (Maksim, Bhavik))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Koskar,
I guess you are developing this in NWDS and you have made one Web module project.
You also have developed Application project and added Web module project as module.
Now, in Application project open Application-j2ee-engine.xml file.
Here, Add one reference to your library com.sap.mw.jco as weak library reference by clicking on add button.
IT will add refernce of this library located on Server. So, runtime it won't give such error.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.