You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Shasta Willson <sh...@gmail.com> on 2009/06/03 07:41:07 UTC
OpenVMS Axis2 port difference?
I have some web service classes written and packaged into .jars on a
Vista box. Copied those .jar files up to an OpenVMS server with the
Axis2 port installed and classpath set to point at the relevant
lib/*.jar files.
When I run the code on Vista it's fine, but on OpenVMS I get this error:
Exception in thread "main" java.lang.NoSuchMethodError:
org.redacted.MyStub.addAnonymousOperations()V
(Including the V at the end -- not sure what that means?)
addAnonymousOperations() is defined in org.apache.Axis2.client.Stub.
I looked at the Axis2 API
(http://www.docjar.com/docs/api/org/apache/axis2/client/Stub.html#addAnonymousOperations)
and confirmed that, and I also used Eclipse to poke at the code and
wound up with the same conclusion. Next I tracked down the likely
.jar file and confirmed that it's on the classpath and present. So
then I wrote a jartester class to see what it looked like:
-------------------------------------------------
import java.lang.reflect.Method;
public class JarTester {
public static void main(String [] args)
throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
{
Class obj = Class.forName("org.apache.axis2.client.Stub");
Method [] methods = obj.getDeclaredMethods();
for (int i=0;i<methods.length;i++)
System.out.println(methods[i]);
System.out.println(obj.getSuperclass() + ": superclass");
System.out.println(obj.getPackage() + ": package");
}
}
--------------------------------------------------
I get this :
------------------------------------------------
protected void org.apache.axis2.client.Stub.finalize() throws
java.lang.Throwable
protected static org.apache.axiom.soap.SOAPFactory
org.apache.axis2.client.Stub.getFactory(java.lang.String)
public void org.apache.axis2.client.Stub.cleanup() throws
org.apache.axis2.AxisFault
public org.apache.axis2.client.ServiceClient
org.apache.axis2.client.Stub._getServiceClient()
public void org.apache.axis2.client.Stub._setServiceClient(org.apache.axis2.client.ServiceClient)
protected static org.apache.axiom.soap.SOAPEnvelope
org.apache.axis2.client.Stub.createEnvelope(org.apache.axis2.client.Options)
throws org.apache.axiom.soap.SOAPProcessingException
protected void org.apache.axis2.client.Stub.setServiceClientEPR(java.lang.String)
protected void org.apache.axis2.client.Stub.addHttpHeader(org.apache.axis2.context.MessageContext,java.lang.String,java.lang.String)
protected void org.apache.axis2.client.Stub.addPropertyToOperationClient(org.apache.axis2.client.OperationClient,java.lang.String,java.lang.Object)
protected void org.apache.axis2.client.Stub.addPropertyToOperationClient(org.apache.axis2.client.OperationClient,java.lang.String,boolean)
protected void org.apache.axis2.client.Stub.addPropertyToOperationClient(org.apache.axis2.client.OperationClient,java.lang.String,int)
protected void org.apache.axis2.client.Stub.setMustUnderstand(org.apache.axiom.om.OMElement,org.apache.axiom.om.OMNamespace)
protected void org.apache.axis2.client.Stub.addHeader(org.apache.axiom.om.OMElement,org.apache.axiom.soap.SOAPEnvelope,boolean)
protected void org.apache.axis2.client.Stub.addHeader(org.apache.axiom.om.OMElement,org.apache.axiom.soap.SOAPEnvelope)
class java.lang.Object: superclass
package org.apache.axis2.client: package
-----------------------------------------------
Notice that it confirms the package I'm looking at is
org.apache.axis2.client, however there is NO method in there by the
desired name, and that the parent is Object, so it's not from up the
chain. It's like the Vista port just missed that method...
I'm hoping someone can see something dumb I've done and point me in
the right direction, or has encountered this and can tell me how to
fix it.
- Shasta
Re: OpenVMS Axis2 port difference?
Posted by Shasta Willson <sh...@gmail.com>.
On Wed, Jun 3, 2009 at 9:25 AM, Caristi, Joe <jc...@whisolutions.com> wrote:
> This may be a version mismatch between jars. Check the versions of the jars on your classpath in both places.
Yes, it looks like you're spot-on. The port to OpenVMS is based on a
slightly older Axis2, iiuc, but it looks like I can substitute my
newer jar. I also encountered someone who simply removed the line
calling that method and claimed their client worked just fine without
it. I'd imagine that likely depends on what you're doing -- it must
have a purpose.
- Shasta
RE: OpenVMS Axis2 port difference?
Posted by "Caristi, Joe" <jc...@whisolutions.com>.
This may be a version mismatch between jars. Check the versions of the jars on your classpath in both places.
-----Original Message-----
From: Shasta Willson [mailto:shastaw@gmail.com]
Sent: Wednesday, June 03, 2009 1:41 AM
To: axis-user@ws.apache.org
Subject: OpenVMS Axis2 port difference?
I have some web service classes written and packaged into .jars on a
Vista box. Copied those .jar files up to an OpenVMS server with the
Axis2 port installed and classpath set to point at the relevant
lib/*.jar files.
When I run the code on Vista it's fine, but on OpenVMS I get this error:
Exception in thread "main" java.lang.NoSuchMethodError:
org.redacted.MyStub.addAnonymousOperations()V
(Including the V at the end -- not sure what that means?)
addAnonymousOperations() is defined in org.apache.Axis2.client.Stub.
I looked at the Axis2 API
(http://www.docjar.com/docs/api/org/apache/axis2/client/Stub.html#addAnonymousOperations)
and confirmed that, and I also used Eclipse to poke at the code and
wound up with the same conclusion. Next I tracked down the likely
.jar file and confirmed that it's on the classpath and present. So
then I wrote a jartester class to see what it looked like:
-------------------------------------------------
import java.lang.reflect.Method;
public class JarTester {
public static void main(String [] args)
throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
{
Class obj = Class.forName("org.apache.axis2.client.Stub");
Method [] methods = obj.getDeclaredMethods();
for (int i=0;i<methods.length;i++)
System.out.println(methods[i]);
System.out.println(obj.getSuperclass() + ": superclass");
System.out.println(obj.getPackage() + ": package");
}
}
--------------------------------------------------
I get this :
------------------------------------------------
protected void org.apache.axis2.client.Stub.finalize() throws
java.lang.Throwable
protected static org.apache.axiom.soap.SOAPFactory
org.apache.axis2.client.Stub.getFactory(java.lang.String)
public void org.apache.axis2.client.Stub.cleanup() throws
org.apache.axis2.AxisFault
public org.apache.axis2.client.ServiceClient
org.apache.axis2.client.Stub._getServiceClient()
public void org.apache.axis2.client.Stub._setServiceClient(org.apache.axis2.client.ServiceClient)
protected static org.apache.axiom.soap.SOAPEnvelope
org.apache.axis2.client.Stub.createEnvelope(org.apache.axis2.client.Options)
throws org.apache.axiom.soap.SOAPProcessingException
protected void org.apache.axis2.client.Stub.setServiceClientEPR(java.lang.String)
protected void org.apache.axis2.client.Stub.addHttpHeader(org.apache.axis2.context.MessageContext,java.lang.String,java.lang.String)
protected void org.apache.axis2.client.Stub.addPropertyToOperationClient(org.apache.axis2.client.OperationClient,java.lang.String,java.lang.Object)
protected void org.apache.axis2.client.Stub.addPropertyToOperationClient(org.apache.axis2.client.OperationClient,java.lang.String,boolean)
protected void org.apache.axis2.client.Stub.addPropertyToOperationClient(org.apache.axis2.client.OperationClient,java.lang.String,int)
protected void org.apache.axis2.client.Stub.setMustUnderstand(org.apache.axiom.om.OMElement,org.apache.axiom.om.OMNamespace)
protected void org.apache.axis2.client.Stub.addHeader(org.apache.axiom.om.OMElement,org.apache.axiom.soap.SOAPEnvelope,boolean)
protected void org.apache.axis2.client.Stub.addHeader(org.apache.axiom.om.OMElement,org.apache.axiom.soap.SOAPEnvelope)
class java.lang.Object: superclass
package org.apache.axis2.client: package
-----------------------------------------------
Notice that it confirms the package I'm looking at is
org.apache.axis2.client, however there is NO method in there by the
desired name, and that the parent is Object, so it's not from up the
chain. It's like the Vista port just missed that method...
I'm hoping someone can see something dumb I've done and point me in
the right direction, or has encountered this and can tell me how to
fix it.
- Shasta
STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc@whisolutions.com,
and destroy all copies of this message and any attachments.