Context Initialization Error from Java client

I am writing a Java client to invoke a WebMethods service. The first lines are:
Context context = null;
context = new Context();

And then the context is used to connect to the server. This client code was generated by WebMethods.

I get the following error on the “context = new Context();” line: Cannot create context: java.lang.ExceptionInInitializerError: java/lang/RuntimeException

I have the com.wm.app.b2b.client.Context class imported in the code.
Does anyone know why I cannot create the context?

Thanks,
Rumana

two things:

  1. import all the classes using “client.*”
  2. you should probably be using TContext, not Context. check out the java api reference for the client classes to see sample code for using TContext.

hope that helps,

rob