ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Priolkar" <dee...@TechMahindra.com>
Subject Issue with Service Invoked though RMIDispatcher
Date Mon, 25 Oct 2010 12:15:37 GMT
Hi,

 

I am trying to call a service through RMI, but I am getting some weird
exception.. it says ClassNtFound, for the class which is there in the
classpath.. Please help.. need some inputs asap L

 

2010-10-25 17:24:57,652 (RMI TCP Connection(4)-10.5.73.90) [
ServiceDispatcher.java:506:ERROR] 

---- exception report
----------------------------------------------------------

Service [updateScanResultTest] threw an unexpected exception/error

Exception: org.ofbiz.service.GenericServiceException

Message: Cannot find service [updateScanResultTest] location class
(com.pci.services.ASVEngineService )

---- cause
---------------------------------------------------------------------

Exception: java.lang.ClassNotFoundException

Message: com.pci.services.ASVEngineService 

---- stack trace
---------------------------------------------------------------

java.lang.ClassNotFoundException: com.pci.services.ASVEngineService 

java.net.URLClassLoader$1.run(URLClassLoader.java:200)

java.security.AccessController.doPrivileged(Native Method)

java.net.URLClassLoader.findClass(URLClassLoader.java:188)

 

Following are the configurations

 

Services.xml

<service name="updateScanResultTest" export="true" auth="false"
engine="java"

            location="com.pci.services.ASVEngineService "
invoke="updateScanResult">

        <description>add the scan details to the database</description>

        <attribute name="scanResult" type="String" mode="IN"
optional="false"/>

       <attribute name=" response" type="String" mode="OUT"
optional="true"/>

</service>

 

Ofbiz-container.xml

    <!-- RMI Service Dispatcher -->

    <container name="rmi-dispatcher"
class="org.ofbiz.service.rmi.RmiServiceContainer">

        <property name="bound-name" value="RMIDispatcher"/>

        <property name="bound-host" value="127.0.0.1"/>

        <property name="bound-port" value="1099"/>

        <property name="delegator-name" value="default"/>

        <property name="client-factory"
value="org.ofbiz.service.rmi.socket.zip.CompressionClientSocketFactory"/
>

        <property name="server-factory"
value="org.ofbiz.service.rmi.socket.zip.CompressionServerSocketFactory"/
>

        <!-- property name="ssl-keystore"
value="framework/base/config/ofbizrmi.jks"/>

        <property name="ssl-keystore-type" value="JKS"/>

        <property name="ssl-keystore-pass" value="changeit"/>

        <property name="ssl-keystore-alias" value="rmissl"/-->

        <property name="ssl-client-auth" value="false"/>

    </container>

 

 

Calling Client

 

package com.pci.test;

 

import java.net.MalformedURLException;

import java.rmi.Naming;

import java.rmi.NotBoundException;

import java.rmi.RemoteException;

import java.util.Map;

 

import org.ofbiz.base.util.UtilMisc;

import org.ofbiz.service.GenericServiceException;

import org.ofbiz.service.rmi.RemoteDispatcher;

 

public class CallingOfbizService 

{

      public static void main(String str[])

      {

            String endpoint;

            try{

                  endpoint = "rmi://127.0.0.1:1099/RMIDispatcher";

                  RemoteDispatcher remoteDisp = (RemoteDispatcher)
Naming.lookup(endpoint);

                  Map result =
remoteDisp.runSync("updateScanResultTest", UtilMisc.toMap("scanResult",
"Hello"));

            }catch (MalformedURLException e2) {

                  e2.printStackTrace();

            } catch (RemoteException e3) {

                  e3.printStackTrace();

            } catch (NotBoundException e) {

                  e.printStackTrace();

            } catch (GenericServiceException e) {

                  e.printStackTrace();

            }

      }

}

 

 


============================================================================================================================Disclaimer:
 This message and the information contained herein is proprietary and confidential and subject
to the Tech Mahindra policy statement, you may review the policy at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a>
externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a>
internally within Tech Mahindra.============================================================================================================================

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message