cancel
Showing results for 
Search instead for 
Did you mean: 

Missing "mw" package inside sapjco.jar

Former Member
0 Kudos

Hello Guys,

I'm new to SAP as well to SAPJCo. I just have fair background of Java.

I'm trying to implement a Listener to receive IDOCS from SAP system.

I am using sapjco.jar...for the purpose

dummy code is below

import com.sap.mw.*;

import com.sap.conn.jco.*;

public class SapListener extends JCO.Server {

...... }

I have included the jar file in the build path. It is not recognizing the first import statement when i compile. The second import statement is being recognized.

When I extracted all the contents of the sapjco.jar I didnt find any " mw " package in there.

Any idea as to what is wrong??

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Following are the steps on a windows machine

To install JCo for Windows unzip the appropriate distribution package into an arbitrary directory {sapjco-install-path}.

If you already have an older librfc32.dll in the {windows-dir}\system32 directory, please replace it with the one that comes with JCo.

Then add {sapjco-install-path} to the PATH environment variable.

Finally, add {sapjco-install-path}\sapjco.jar to your CLASSPATH environment variable.

Regards

Ayyapparaj

Answers (1)

Answers (1)

Former Member
0 Kudos

Well, you should actually be using the sapidocjco.jar instead of the sapjco.jar to work with IDocs (sending as well as recieving). The sapidocjco needs the sapjco jar in the background though. You can find the sapidocjco.jar also in the service marketplace where you found the sapjco.jar.

As far as the missing "mw" package is concerned, you probably haven't set the sapjco.jar in your classpath correctly. The problem has nothing to do with the dlls lying under System32 although that is something which you need to take care of too.

T00th

Former Member
0 Kudos

Hey thanks a lots guys....

sameer I am using eclipse...and I have the imported the jars...so do i still need to set the classpath?

that why I made a comment...

that my first import is not working while second one working.....

Former Member
0 Kudos

Hi,

I am not exactly sure what you mean by "imported" the jars in Eclipse - I use NetBeans not Eclipse. What I meant is you need to add the jars in the buildpath, not the classpath. My bad.

Generally you find the option of adding jars to the build path by right clicking the project and then you should see some place where you can add jars to the build path. Make sure your sapjco.jar lies there. Then refresh/reload the project and you should be on the right track.

T00th

Former Member
0 Kudos

Exactly...my apology.... i meant buildpath ( i have added them as external jars).....still aint working.....

as I said I extracted the contents of jar file...but cudnt find the " mw " package.........

Former Member
0 Kudos

Could you list the jars that you are using? As far as I know, all sapjco.jars had the mw structure in them. Either your sapjco.jar is corrupt or you are using a completely wrong jar which has simply been named as sapjco.jar.

T00th

Former Member
Former Member
0 Kudos

Once again thanks guys....

I am using a Jar file named as .... sapjco3 (excutable jar file)

The Content Structure sapjco3 is as follows (after extracting using winrar)

sapjco3

then u have ' com ' and ' META-INF '

inside com u have ' sap ' and within sap u have ' conn ' , ' i18n ' and ' tc ' (no mw)

Former Member
0 Kudos

Well, there you go. There is no sapjco3 jar. There is always just the sapjco jar and it has no conn, i18n and tc in it. You have the wrong jar.

Download the sapjco.jar from http://service.sap.com/connectors and try again. And like I said, for IDocs, you will need the sapidocjco.jar which is also available at the location above.

T00th

Former Member
0 Kudos

Both sapjco.jar (version 2.x) and sapjco3.jar (version 3.0) are available on the SAP Marketplace (http://service.sap.com/connectors).

JCo 3.x has changed incompatibly compared to previous versions. To upgrade from an older version of SAP JCo, please consult the migration guide and the documentation.

- Raj