IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How can I access webMethods classes from my own jar?

  • 1.  How can I access webMethods classes from my own jar?

    Posted Mon February 16, 2004 08:24 AM

    We have an existing jar file, lets call it myclasses.jar. Although we’re writing some new code to interact with webMethods 6.0, we’d like to re-use a lot of our existing code in myclasses.jar.

    So in myclasses.jar, I have some code that tries to return a SystemException (i.e. com.wm.app.b2b.server.ServiceException). I have myclasses.jar on CLASSPATH and the code compiles fine within Developer.

    However, at run-time (on the Integration Server) I get a NoClassDefFound exception within myclasses.jar on the line where it tries to return the ServiceException.

    It seems that myclasses.jar can’t ‘see’ client.jar or server.jar, which are not on the CLASSPATH but ARE on the Server Classpath. Moving these jars onto the CLASSPATH causes a number of webMethods exceptions that prevent the Integration Server from even starting (I think they have the same problem ‘seeing’ their own classes). Moving myclasses.jar onto the server classpath has no effect (I guess the server still finds the one on CLASSPATH first).

    What should the correct approach be to accessing webMethods classes from myclasses.jar?


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: How can I access webMethods classes from my own jar?

    Posted Tue February 17, 2004 07:58 AM

    Put your jar into IntegrationServer/packages/myPackage/code/jars. At runtime it will then be able to see:
    4. all classes in myPackage/code/classes and myPackage/code/jars.
    3. everything in all packages that myPackage has package dependencies on.
    2. everything on server classpath.

    1. everything on application classpath.

    HTH,
    Fred


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB