on 02-25-2004 8:40 PM
Hi,
I execute a servlet on the SAP J2EE 6.30 engine and I want to connect to SAP using JCO. However, I am running into the following error:
java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Exception
sapjco.jar is not included in the WEB-INF\lib directory and I use the following import statement:
import com.sap.mw.jco.*;
Is there any other configuration required in order to be able to call JCO from a servlet on a WAS 6.30 platform?
The servlet I am testing runs fine on a IIS/JRun platform.
Thanks,
Sorin Stancu
i don't understand wat's your problem, because i write an application (a connector between sap and cti) and never had this problem. You just have to put in your classpath, of your application(what kind of application do you have, an rfc server, a java stanalone application) a reference to sapjco.jar.
Best regards,
Florin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
nu este de ajuns doar sa scrii o referinta la sapjco.jar
trebuie sa copii si 2 *.dll-uri(sapjco.dll,librfc32.dll)
eu ti-as sugera sa folosesti eclipsul e super tare, are niste plugin-uri pentru foarte multe tipuri de aplicatii de la SAP(webdynpro, iviewuri)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Salut Florin,
Poate in viitor o sa folosesc eclipse - ideea e ca netweaver developer studio e construit pe eclipse deci ar trebui sa-l folosesc. Oricum, nu l-am folosit pt. ca deocamdata e plin de probleme si e numai in faza de ramp-up.
Multumesc pentru sfat, Sorin
-
I'm not using NetWeaver dev studio because at this stage is only available as a ramp-up - SAP provides the deploy tool --> which is supposed to deploy applications that follow the J2EE standard.
Hello Sorin,
what you need to do is to declare the library in the descriptors of web.xml. It may be also enough to declare the libs in your web project in the netweaver studio.
Regards,
Benny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Benny,
Thanks for your fast answer but I am not using netweaver studio for developing servlets (I use Forte) - would you happen to have an example of web.xml entry to point to the jco library ?
Because I don;t use netweaver studio, my web.xml doesn;t contain any entry for sapjco.jar and I'd have to make the entries manually, I assume is the <resource-ref> tag but I would need to know the <res-ref-name>, <res-type>, <res-auth> and <res-sharing-scope>.
Thanks again, Sorin
Hi Sorin,
so how do you deploy the stuff?
However, I went after this and found that usually not the web.xml is the place where such references are needed but application-j2ee-engine.xml keeps such references.
SAP specific descriptors can be found in the manual at: http://help.sap.com/webas_j2ee630/helpdata/en/3f/40bd71ae1a9b45a0f3eb6ff0a27aae/frameset.htm
the descriptor you're looking for is "reference".
Regards,
Benny
Hi Benny,
I deploy the applications using the SAP deploy tool. It works pretty well when not using sapjco library. It takes a web application file structure and it deploys it on the server. All fine except when you're using sapjco. Usually, external libraries should be included in the the WEB-INF/lib directory but as per OSS 542175 this is not supported in SAP J2EE and the fix provided in this note is valid only for WAS 620 and not WAS 630.
Thanks for the link, Sorin
Hi Benny!
> what you need to do is to declare the library in the
> descriptors of web.xml. It may be also enough to
> declare the libs in your web project in the netweaver
> studio.
On WAS 6.20 you put all libraries to be used by several applications (like sapjco.jar) in ...j2ee\cluster\server\additional-lib and referenced them from your application.
...j2ee\cluster\server\managers\library.txt:
library jco sapjco.jar
...j2ee\cluster\server\managers\reference.txt:
reference myApplication library:jco
Is this different with WAS 6.30 now?
Regards, Tanja
Hi,
The directory structure has been changed in WAS 630: there is no library.txt or reference.txt file under the
j2ee\cluster\server\managers directory (in fact there is no managers directory ).
But the solution to making references to libraries in WAS 630 is -as provided by SAP- : from the deploy tool --> deployer -> select ear -> descriptor -> extra info -> reference tab -> write name of the library and provider name. (obtain name/provider name from admin tool -> server -> libraries). For the jco library it would be:
target: com.sap.mw.jco
provider: sap.com
Sorin
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.