Skip to Content
1
Former Member
Jul 08, 2007 at 12:12 AM

Error in JCO Connection prorgam

11 Views

Hi Experts,

I am developing one tomcat application using servlet. In servlet i am connecting to R/3. For this i am writing JCO Connection code. This Java file is compiled, but while running the servlet in browser it is giving exception like

java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]. java.library.path [C:Tomcat 5.0bin;.;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:jdk1.5.0_12bin;C:Program Files (x86)AdobeFlex Builder 2Flex SDK 2bin;C:j2mej2me_cldcbinwin32;C:j2memidp1.0.3fcsbin;C:jdk1.5.0_12libsapjco.jar]
	com.sap.mw.jco.JCO.<clinit>(JCO.java:738)
	ConnectToR3.getConnection(ConnectToR3.java:25)
	HitServlet.doGet(HitServlet.java:29)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

How to slove this problem. Is their any other way to connect to SAP R/3 from Servlets. I created normal java program without servlets, it's wokring fine. But If paste the same code in servlets mean it is giving above Exception.

Please Help me........ Give any solution to this problem.

Regards,

Sunil