Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
6 replies Latest Post - ‏2010-09-22T11:13:02Z by Titton
SystemAdmin
SystemAdmin
217 Posts
ACCEPTED ANSWER

Pinned topic Error when invoke RAM1 - web service API

‏2010-04-20T07:10:48Z |
When I try to invoke RAM web service API, I got error about authentication. The web service client is generated based on correct wsdl by WID. When I test some operations like create community or list asset types, then I got this. Would you help me to find solution, thank you in advance.

java.lang.SecurityException: Signers of 'org.eclipse.core.runtime.IExtensionRegistry' do not match signers of other classes in package
at java.lang.ClassLoader.checkPackageSigners(ClassLoader.java:305)
at java.lang.ClassLoader.defineClass(ClassLoader.java:247)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:589)
at java.net.URLClassLoader.access$400(URLClassLoader.java:123)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1034)
at java.security.AccessController.doPrivileged(AccessController.java:279)
at java.net.URLClassLoader.findClass(URLClassLoader.java:491)
at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:258)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:589)
at java.net.URLClassLoader.access$400(URLClassLoader.java:123)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1034)
at java.security.AccessController.doPrivileged(AccessController.java:279)
at java.net.URLClassLoader.findClass(URLClassLoader.java:491)
at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:130)
at com.ibm.ws.extension.ExtensionRegistryFactoryImpl.<clinit>(ExtensionRegistryFactoryImpl.java:66)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:194)
at com.ibm.wsspi.extension.ExtensionRegistryFactory.<clinit>(ExtensionRegistryFactory.java:53)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:194)
at com.ibm.ws.runtime.util.StreamHandlerUtils.<clinit>(StreamHandlerUtils.java:94)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:194)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:130)
at com.ibm.ws.ssl.provider.AbstractJSSEProvider.queryHandler(AbstractJSSEProvider.java:1225)
at com.ibm.ws.ssl.provider.AbstractJSSEProvider.addHandlers(AbstractJSSEProvider.java:1083)
at com.ibm.ws.ssl.provider.AbstractJSSEProvider.initializeHandlers(AbstractJSSEProvider.java:123)
at com.ibm.ws.ssl.provider.IBMJSSE2Provider.<init>(IBMJSSE2Provider.java:46)
at com.ibm.ws.ssl.JSSEProviderFactory.getInstance(JSSEProviderFactory.java:215)
at com.ibm.ws.ssl.JSSEProviderFactory.getInstance(JSSEProviderFactory.java:71)
at com.ibm.ws.ssl.config.SSLConfigManager.<init>(SSLConfigManager.java:138)
at com.ibm.ws.ssl.config.SSLConfigManager.getInstance(SSLConfigManager.java:145)
at com.ibm.websphere.ssl.JSSEHelper.getInstance(JSSEHelper.java:230)
at com.ibm.websphere.ssl.protocol.SSLSocketFactory.<init>(SSLSocketFactory.java:72)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1328)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:9)
at org.apache.axis.components.net.JSSESocketFactory.initFactory(JSSESocketFactory.java:61)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:79)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at com.ibm.ram.internal.client.RAMHTTPSender.invoke(RAMHTTPSender.java:41)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.ibm.ram.repository.web.ws.core.v72.RAM1SoapBindingStub.getAllAssetTypes(RAM1SoapBindingStub.java:9319)
at com.ibm.ram.repository.web.ws.core.v72.RAM1Proxy.getAllAssetTypes(RAM1Proxy.java:656)
2010-4-20 14:59:25 com.ibm.ws.ssl.config.SSLConfigManager
信息: ssl.disable.url.hostname.verification.CWPKI0027I
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.SocketException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.SocketException
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:5)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at com.ibm.ram.internal.client.RAMHTTPSender.invoke(RAMHTTPSender.java:41)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.ibm.ram.repository.web.ws.core.v72.RAM1SoapBindingStub.getAllAssetTypes(RAM1SoapBindingStub.java:9319)
at com.ibm.ram.repository.web.ws.core.v72.RAM1Proxy.getAllAssetTypes(RAM1Proxy.java:656)

{http://xml.apache.org/axis/}hostname:IBM-JURSONNB

java.net.SocketException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
at com.ibm.ram.internal.client.RAMHTTPSender.invoke(RAMHTTPSender.java:41)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.ibm.ram.repository.web.ws.core.v72.RAM1SoapBindingStub.getAllAssetTypes(RAM1SoapBindingStub.java:9319)
at com.ibm.ram.repository.web.ws.core.v72.RAM1Proxy.getAllAssetTypes(RAM1Proxy.java:656)
Caused by: java.net.SocketException
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:5)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
... 13 more
Updated on 2010-09-22T11:13:02Z at 2010-09-22T11:13:02Z by Titton
  • SystemAdmin
    SystemAdmin
    217 Posts
    ACCEPTED ANSWER

    Re: Error when invoke RAM1 - web service API

    ‏2010-04-20T07:13:42Z  in response to SystemAdmin
    Complement: I have pass with correct username and password, as RAM info center said, like Stub.setusername(...); Stub.setpassword(...). Also get the same error.
  • ricky1
    ricky1
    84 Posts
    ACCEPTED ANSWER

    Re: Error when invoke RAM1 - web service API

    ‏2010-04-20T14:55:20Z  in response to SystemAdmin
    Hi,

    This isn't a problem with userid/passwords. This is a problem with signed jars and certificates.

    Are you running this as a policy on the server, or as a client from Eclipse? It looks like you are trying to do this on the server because there are websphere classes in the stack trace.

    First, we don't recommend using ramclient on the host. But if you do, you need ONLY the ramclient.jar. The rest of jars are not required on the host because the host already has them. That would cause conflicts when running.
    • SystemAdmin
      SystemAdmin
      217 Posts
      ACCEPTED ANSWER

      Re: Error when invoke RAM1 - web service API

      ‏2010-04-22T06:12:27Z  in response to ricky1
      Thanks, ricky1.
      Actually I have run this code from java application, not on server. Before this error, I meet error like this,
      Cannot find the specified class java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory
      So I add com.ibm.ws.security.crypto_6.1.0.jar to dependency path, this error resolved. I guess that is why you saw something about websphere.
      Then this error about signer coming...
      I know there are two kinds of API for RAM at least, one is this web service, the other is java client. As you recommend, web service client can be invoked from server or locally?
      • ricky1
        ricky1
        84 Posts
        ACCEPTED ANSWER

        Re: Error when invoke RAM1 - web service API

        ‏2010-04-22T12:28:31Z  in response to SystemAdmin
        Hi,

        The only client that is supported API is the Java client (RAMClient). But that causes problems when used inside a policy on the server. It is best from a client to the server.

        Are you using this standalone (i.e. not running inside Eclipse) or are you running from within Eclipse?

        Either way I don't know why it would be asking for Websphere classes. That is not normal. There must some configuration info that is causing that. Are you trying to use a java jre that comes with Websphere, or are you using your own.

        Thanmks,
        Rich
        • ricky1
          ricky1
          84 Posts
          ACCEPTED ANSWER

          Re: Error when invoke RAM1 - web service API

          ‏2010-04-22T12:33:17Z  in response to ricky1
          Hi,

          BTW: The web services client is internal and not API.

          Rich
  • Titton
    Titton
    1 Post
    ACCEPTED ANSWER

    Re: Error when invoke RAM1 - web service API

    ‏2010-09-22T11:13:02Z  in response to SystemAdmin
    Hello
    I'm with the same error. When I try to connect i got this, with correct and wrong user.
    I can't understand what is happening.