RMI exception problem

Hi guys. I am developing distributed application based on RMI, but I have problem I cannot solve.
I compile my project, generate stubs for implementation classes and then run Server class. But each time I get following errors:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
        java.lang.ClassNotFoundException: Server_Stub
        at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Sou
rce)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Sour
ce)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
n Source)
        at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
        at sun.rmi.server.UnicastRef.invoke(Unknown Source)
        at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
        at java.rmi.Naming.rebind(Unknown Source)
        at Server.main(Server.java:341)I run the name server in the same folder, than all other code and all class files should be there also. Do you have any thought, why is this happening? Thanks

Look at the stack trace. You will see:
(a) Registry.bind(), which means you are invoking a Registry operation
(b) ServerException, which means that whatever the exception was it happened in the server you were calling, not in your own code. In this case it happened inside the Registry's implementation of bind().
So it is the Registry that can't find the class.

Similar Messages

  • RMI Marshalling Problem:  weblogic.Admin PING

    WebLogic 5.1.0 with service pack 8 has been installed on a HPUX server. I'm
    trying to ping the server from an NT box, but I'm getting some RMI
    marshalling problems.
    Here is the command that I run on NT:
    C:\weblogic\jre1_2\jre\bin\java -classpath
    c:weblogic/lib/weblogic510sp.jar;c:/weblogic/classes;c:/weblogic/lib/weblogi
    caux.jar weblogic.Admin t3://HPServer:7001 PING > MarshallingProblem.txt
    Here is what is in MarshallingProblem.txt (modified server name):
    Failed to connect to t3://HPServer:7001 due to:
    [weblogic.rmi.UnexpectedException: Marshalling:
    - with nested exception:
    [weblogic.rjvm.PeerGoneException:
    - with nested exception:
    [weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Exception
    creating response stream ] - with nested exception:
    [java.io.InvalidClassException:
    weblogic.security.acl.internal.AuthenticatedUser; Local class not
    compatible: stream classdesc serialVersionUID=6699361079932480379 local
    class serialVersionUID=2825328378974757378]]]]
    I previously had similar problems pinging the server from the server itself
    until I included the servicepack in the classpath.
    Anyone have any idea what going on in this situation?
    Cameron Taggart

    Cameron
    Can you test with sp8 installed on your NT machine too ? And also make
    sure you set the classpath with the sp8 jar files on NT before you run
    weblogic.Admin PING
    Raj Alagumalai
    Cameron Taggart wrote:
    WebLogic 5.1.0 with service pack 8 has been installed on a HPUX server. I'm
    trying to ping the server from an NT box, but I'm getting some RMI
    marshalling problems.
    Here is the command that I run on NT:
    C:\weblogic\jre1_2\jre\bin\java -classpath
    c:weblogic/lib/weblogic510sp.jar;c:/weblogic/classes;c:/weblogic/lib/weblogi
    caux.jar weblogic.Admin t3://HPServer:7001 PING > MarshallingProblem.txt
    Here is what is in MarshallingProblem.txt (modified server name):
    Failed to connect to t3://HPServer:7001 due to:
    [weblogic.rmi.UnexpectedException: Marshalling:
    - with nested exception:
    [weblogic.rjvm.PeerGoneException:
    - with nested exception:
    [weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Exception
    creating response stream ] - with nested exception:
    [java.io.InvalidClassException:
    weblogic.security.acl.internal.AuthenticatedUser; Local class not
    compatible: stream classdesc serialVersionUID=6699361079932480379 local
    class serialVersionUID=2825328378974757378]]]]
    I previously had similar problems pinging the server from the server itself
    until I included the servicepack in the classpath.
    Anyone have any idea what going on in this situation?
    Cameron Taggart

  • RMI Exception in OraBPEL~OC4J_BPEL~default_island~1 log file

    Hi,
    I am facing following rmi exception in my OraBPEL~OC4J_BPEL~default_island~1 log file:
    09/04/09 19:16:50 java.lang.NullPointerException
    09/04/09 19:16:50      at com.evermind.server.rmi.RMIServer.run(RMIServer.java:464)
    09/04/09 19:16:50      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    This exception is restricting me to call BPEL Service from java.
    I ckecked all rmi configuration but dont find exact place where the wrong configuration is.
    Your help is really appreciated,
    Rupesh.
    Edited by: user10994198 on Apr 9, 2009 7:04 AM

    Hi Rupesh,
    Please follow this link : http://orasoa.blogspot.com/2007/06/calling-bpelesb-webservice-from.html, and see this configuration will help you overcome NPE.
    Hope this helps!
    Cheers
    Anirudh Pucha

  • RMI Exception between EJB calls

    Hi folks,
    After adding some methods to an existing EJB, we are getting RMI exception,
    as follows:
    at
    weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:76)
    at
    omega.fidens.ventas.WFVentaSessionBeanEOImpl_WLStub.recuperarPersona(WFVenta
    SessionBeanEOImpl_WLStub.java:3328)
    Our architecture is the following
    1. A Statefull EJB, is calling a stateless EJB. The first one is
    WFVentaSessionBean, the second , VentaSessionBean.
    2. The same WF is calling another EJB, stateless also, and everything is ok.
    Any hint?
    Regards
    Ivan

    Looking at: [no sapjcorfc in java.library.path]
    it seems like the environment that has the class with the method m does not have the platform dependent part of the JCO setup.
    Try to create a standalone program on the same server that just uses JCO and see if it works first.
    Cheers,
    Kalle

  • Exception:Problem building schema

    Hi all,
    I want to make a web service call to a service deployed in weblogic, I copied the wsdl to a local file and I created a PartnerLink referring to the wsdl in my local file. I put an Invoke action, create an input variable, everything work fine. However when I try to explore the input variable I got exception:Problem building schema.
    Is there anything wrong with the WSDL? I've validate it and it was ok.
    Thanks in advance,
    santoso
    Here is the WSDL of the service:
    <?xml version='1.0' encoding='UTF-8'?>
    <definitions name="ProposalWSServiceDefinitions" targetNamespace="http://com/my/ws" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:s0="http://com/my/ws" xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
    <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://www.my.com/opl" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://com/my/ws" xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.my.com/opl">
    <complexType name="Proposal">
    <sequence>
    <element name="id" type="int"/>
    <element name="title" type="string"/>
    <element name="creator" type="string"/>
    <element name="status" type="string"/>
    <element name="customerId" type="int"/>
    </sequence>
    </complexType>
    <element name="ProposalData" type="tns:Proposal"/>
    </schema>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://com/my/ws" xmlns:s0="http://com/my/ws" xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="insertProposal">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="proposal" type="opl:Proposal" xmlns:opl="http://www.my.com/opl"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </types>
    <message name="insertProposal">
    <part element="s0:insertProposal" name="parameters"/>
    </message>
    <portType name="ProposalWS">
    <operation name="insertProposal" parameterOrder="parameters">
    <input message="s0:insertProposal"/>
    </operation>
    </portType>
    <binding name="ProposalWSServiceSoapBinding" type="s0:ProposalWS">
    <s1:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="insertProposal">
    <s1:operation soapAction="" style="document"/>
    <input>
    <s1:body parts="parameters" use="literal"/>
    </input>
    </operation>
    </binding>
    <service name="ProposalWSService">
    <port binding="s0:ProposalWSServiceSoapBinding" name="ProposalWSSoapPort">
    <s1:address location="http://172.16.208.45:7001/SBSWebService/ProposalWS"/>
    </port>
    </service>
    </definitions>

    I've solved it just by upgrading to BPEL 10.1.3.1 (was 10.1.2.0)

  • RMI exception calling web service from proxy class

    I am getting the following error attempting to call a web service from a proxy. It appears to relate to the type of objects I am trying to send vs the type that is expected. Following the exception I am adding a copy of the control where calling the web service is sucessful, a copy of the proxy class that I am using to make this unsucessful call, and the controller.jpf that has the formBean where I am creating my objects
    Caught Exception Calling the Web Service from the Proxy. The Exception is the f
    ollowing: java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SO
    APException: failed to serialize class org.openuri.www.CreateAccountCheckingReq
    uestweblogic.xml.schema.binding.SerializationException: type mapping lookup fail
    ure on class=class controls.CheckingService$anyType TypeMapping=TYPEMAPPING SIZE
    =5
    ENTRY 1:
    class: org.openuri.www.CreateAccountCheckingResponse
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
    ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
    deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
    ENTRY 2:
    class: org.openuri.www.FundingInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
    ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
    deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
    ENTRY 3:
    class: org.openuri.www.AccountInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
    ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
    deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
    ENTRY 4:
    class: org.openuri.www.CustomerInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
    ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
    deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
    ENTRY 5:
    class: org.openuri.www.CreateAccountCheckingRequest
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
    ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
    deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
    ; nested exception is:
    javax.xml.soap.SOAPException: failed to serialize class org.openuri.www
    .CreateAccountCheckingRequestweblogic.xml.schema.binding.SerializationException:
    type mapping lookup failure on class=class controls.CheckingService$anyType Typ
    eMapping=TYPEMAPPING SIZE=5
    ENTRY 1:
    class: org.openuri.www.CreateAccountCheckingResponse
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
    ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
    deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
    ENTRY 2:
    class: org.openuri.www.FundingInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
    ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
    deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
    ENTRY 3:
    class: org.openuri.www.AccountInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
    ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
    deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
    ENTRY 4:
    class: org.openuri.www.CustomerInfoAnonType
    xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
    ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
    deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
    ENTRY 5:
    class: org.openuri.www.CreateAccountCheckingRequest
    xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
    ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
    deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
    Java Control for the web service:
    package controls;
    import weblogic.webservice.context.WebServiceContext;
    * @jc:location http-url="http://localhost:7001/Checking.jws"
    * @jc:wsdl file="#CheckingWsdl"
    * @jc:handler callback="MessageHandler" operation="MessageHandler"
    public interface CheckingService extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
    public static class CustomerInfo
    implements java.io.Serializable
    public java.lang.String FirstName;
    public java.lang.String LastName;
    public java.lang.String MiddleName;
    public int SSN;
    public int CustomerNumber;
    public java.util.Calendar CreationDate;
    public java.util.Calendar LastModifiedDate;
    public static class FundingInfo
    implements java.io.Serializable
    public float Amount;
    public java.util.Calendar CurrentDate;
    public int AccountNumber;
    public static class anyType
    implements java.io.Serializable
    public com.bea.xml.XmlObject[] t;
    public static class AccountInfo
    implements java.io.Serializable
    public int AccountNumber;
    public float Balance;
    public int CustomerNumber;
    public java.util.Calendar LastModifiedDate;
    public WebServiceContext context = CheckingService.context;
    * @jc:protocol form-post="false" form-get="false"
    public AccountInfo CreateAccountChecking (CustomerInfo CustomerInfo, FundingInfo FundingInfo, anyType CommonHeader);
    static final long serialVersionUID = 1L;
    /** @common:define name="CheckingWsdl" value::
    <?xml version="1.0" encoding="utf-8"?>
    <!-- @editor-info:link autogen="false" source="" -->
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
    <types>
    <s:schema targetNamespace="http://www.openuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema">
    <s:element name="CreateAccountCheckingRequest">
    <s:complexType>
    <s:sequence>
    <s:element name="CustomerInfo">
    <s:complexType>
    <s:sequence>
    <s:element name="FirstName" type="s:string" nillable="false"/>
    <s:element name="LastName" type="s:string" nillable="false"/>
    <s:element name="MiddleName" type="s:string" nillable="true"/>
    <s:element name="SSN" type="s:int"/>
    <s:element name="CustomerNumber" type="s:int"/>
    <s:element name="CreationDate" type="s:dateTime"/>
    <s:element name="LastModifiedDate" type="s:dateTime"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="FundingInfo">
    <s:complexType>
    <s:sequence>
    <s:element name="Amount" type="s:float"/>
    <s:element name="CurrentDate" type="s:dateTime"/>
    <s:element name="AccountNumber" type="s:int"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="CommonHeader" type="s:anyType"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="CreateAccountCheckingResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="AccountInfo">
    <s:complexType>
    <s:sequence>
    <s:element name="AccountNumber" type="s:int"/>
         <s:element name="Balance" type="s:float"/>
         <s:element name="CustomerNumber" type="s:int"/>
         <s:element name="LastModifiedDate" type="s:dateTime"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="string" nillable="true" type="s:string"/>
    </s:schema>
    </types>
    <message name="CreateAccountCheckingSoapIn">
    <part name="parameters" element="s0:CreateAccountCheckingRequest"/>
    </message>
    <message name="CreateAccountCheckingSoapOut">
    <part name="parameters" element="s0:CreateAccountCheckingResponse"/>
    </message>
    <portType name="CheckingSoap">
    <operation name="CreateAccountChecking">
    <input message="s0:CreateAccountCheckingSoapIn"/>
    <output message="s0:CreateAccountCheckingSoapOut"/>
    </operation>
    </portType>
    <binding name="CheckingSoap" type="s0:CheckingSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="CreateAccountChecking">
    <soap:operation soapAction="http://www.openuri.org/CreateAccountChecking" style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="Checking">
    <port name="CheckingSoap" binding="s0:CheckingSoap">
    <soap:address location="http://localhost:7001/Checking.jws"/>
    </port>
    </service>
    </definitions>
    FOLLOWING IS THE PROXY CLASS THAT IS UNSUCCESSFUL
    import controls.CheckingService.anyType;
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.HandlerRegistry;
    import org.openuri.CreateAccountCheckingResponseDocument.CreateAccountCheckingResponse;
    import org.openuri.www.CustomerInfoAnonType;
    import org.openuri.www.FundingInfoAnonType;
    import weblogic.jws.proxies.*;
    import weblogic.webservice.context.WebServiceContext;
    import weblogic.webservice.context.WebServiceSession;
    import weblogic.webservice.core.handler.WSSEClientHandler;
    import weblogic.webservice.tools.pagegen.result;
    import weblogic.xml.security.UserInfo;
    import weblogic.xml.security.wsse.Security;
    import weblogic.xml.security.wsse.SecurityElementFactory;
    //import weblogic.jws.proxies.WebServiceB;
    //import weblogic.jws.proxies.WebServiceB_Impl;
    //import weblogic.jws.proxies.WebServiceBSoap;
    public class CheckingWSProxy
    public static void CallWS(Controller.CreateAccountCheckingForm form)
    String user;
    String pass;
    try{
    * Instantiate the main proxy class. The proxy class has the same name as the
    * web service, with "_Impl" appended.
    Checking myservice = new Checking_Impl("http://localhost:7001/ConsumerAccountApp/schemas/CheckingService.wsdl");
    WebServiceContext context = myservice.context();
    WebServiceSession session = context.getSession();
    * Registers a handler for the SOAP message traffic.
    HandlerRegistry registry = myservice.getHandlerRegistry();
    List list = new ArrayList();
    list.add(new HandlerInfo(WSSEClientHandler.class, null, null));
    registry.setHandlerChain(new QName("Checking"), list);
    * Set the username and password token for SOAP message sent from the client, through
    * the proxy, to the web service.
    user = form.getUsername();
    pass = form.getPassword();
    UserInfo ui = new UserInfo(user, pass);
    session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
    * Adds the username / password token to the SOAP header.
    SecurityElementFactory factory = SecurityElementFactory.getDefaultFactory();
    Security security = factory.createSecurity(null);
    security.addToken(ui);
    session.setAttribute(WSSEClientHandler.REQUEST_SECURITY, security);
    * Get the protocol-specific proxy class.
    CheckingSoap msg=myservice.getCheckingSoap();
    * Invoke the web service method
    msg.createAccountChecking((CustomerInfoAnonType)form.getProxyCustomerInfo(), (FundingInfoAnonType)form.getProxyFundingInfo(), (Object)form.get_CommonHeader());
    catch (Exception ex)
    System.out.println("Caught Exception Calling the Web Service from the Proxy. The Exception is the following: " + ex.toString());
    FOLLOWING IS THE FORMBEAN IN THE CONTROLLER.JPF FILE
    * FormData get and set methods may be overwritten by the Form Bean editor.
    public static class CreateAccountCheckingForm extends FormData
    private anyType _CommonHeader;
    private controls.CheckingService.FundingInfo _FundingInfo;
    private controls.CheckingService.CustomerInfo _CustomerInfo;
    private java.util.Date dOut;
    private java.util.Calendar cOut;
    private CustomerInfo proxyCustomerInfo;
    private FundingInfo proxyFundingInfo;
    private String stringDate;
    private String currentDate;
    private String lastModifiedDate;
    private String creationDate;
    private String systemMessage;
    private String username;
    private String password;
    private String accountType;
    private String trashTransferAccount;
    private String trashAccountNumber;
    private boolean secureFlag;
    public void set_CustomerInfo(controls.CheckingService.CustomerInfo _CustomerInfo)
    _CustomerInfo.CreationDate = parseDate(getCreationDate());
    _CustomerInfo.LastModifiedDate = parseDate(getLastModifiedDate());
    this._CustomerInfo = _CustomerInfo;
    public controls.CheckingService.CustomerInfo get_CustomerInfo()
    if(this._CustomerInfo == null)
    this._CustomerInfo = new controls.CheckingService.CustomerInfo();
    _CustomerInfo.CreationDate = dateNow();
    _CustomerInfo.LastModifiedDate = dateNow();              
    return this._CustomerInfo;
    public CustomerInfo getProxyCustomerInfo()
    this.proxyCustomerInfo = (CustomerInfo)this._CustomerInfo;
    return this.proxyCustomerInfo;
    public void set_FundingInfo(controls.CheckingService.FundingInfo _FundingInfo)
    _FundingInfo.CurrentDate = parseDate(getCurrentDate());
    this._FundingInfo = _FundingInfo;
    public controls.CheckingService.FundingInfo get_FundingInfo()
    if(this._FundingInfo == null)
    this._FundingInfo = new controls.CheckingService.FundingInfo();
    _FundingInfo.CurrentDate = dateNow();
    return this._FundingInfo;
    public FundingInfo getProxyFundingInfo()
    this.proxyFundingInfo = (FundingInfo)this._FundingInfo;
    return this.proxyFundingInfo;
    public void set_CommonHeader(anyType _CommonHeader)
    this._CommonHeader = _CommonHeader;
    public anyType get_CommonHeader()
    if(this._CommonHeader == null)
    this._CommonHeader = new anyType();
    return this._CommonHeader;
    public java.util.Calendar dateNow()
    this.dOut = new Date();
    Calendar cOut = this.cOut.getInstance();
    cOut.setTime(this.dOut);
    this.cOut = cOut;
    return this.cOut;
    public java.util.Calendar parseDate( String strDate )
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    Calendar cOut = this.cOut;
    df4.setLenient( false );
    try
    this.dOut = df4.parse( strDate );
    } catch ( ParseException e )
    cOut.getInstance();
    cOut.setTime(dOut);
    this.cOut = cOut;
    return this.cOut;
    public void setStringDate( String stringDate )
    this.stringDate = stringDate;
    public String getStringDate()
    return this.stringDate;
    public void setCurrentDate( String currentDate )
    this.currentDate = currentDate;
    public String getCurrentDate()
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    this.currentDate = df4.format(_FundingInfo.CurrentDate.getTime());
    return this.currentDate;
    public void setLastModifiedDate( String lastModifiedDate )
    this.lastModifiedDate = lastModifiedDate;
    public String getLastModifiedDate()
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    this.lastModifiedDate = df4.format(_CustomerInfo.LastModifiedDate.getTime());
    return this.lastModifiedDate;
    public void setCreationDate( String creationDate )
    this.creationDate = creationDate;
    public String getCreationDate()
    SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
    this.creationDate = df4.format(_CustomerInfo.CreationDate.getTime());
    return this.creationDate;
    public void setUsername( String username )
    this.username = username;
    public String getUsername()
    return this.username;
    public void setPassword( String password )
    this.password = password;
    public String getPassword()
    return this.password;
    public void setAccountType( String accountType )
    this.accountType = accountType;
    public String getAccountType()
    return this.accountType;
    public void setTrashTransferAccount( String trashTransferAccount )
    this.trashTransferAccount = trashTransferAccount;
    public String getTrashTransferAccount()
    return this.trashTransferAccount;
    public void setTrashAccountNumber( String trashAccountNumber )
    this.trashAccountNumber = trashAccountNumber;
    public String getTrashAccountNumber()
    return this.trashAccountNumber;
    public void setSystemMessage( String systemMessage )
    this.systemMessage = systemMessage;
    public String getSystemMessage()
    return this.systemMessage;
    public void setSecureFlag( boolean secureFlag )
    this.secureFlag = secureFlag;
    public boolean getSecureFlag()
    return this.secureFlag;
    }

    This exception means that xml namespaces are different.
    Etc. soap has xml element which doesn't belong to namespace of parent xml element and namespace is set without prefix.
    I had such problem.
    Try to set namespace prefix for this element.
    Example:
    <el1>
    <el2 xmlns="http://..."/>
    </el1>
    Should be
    <el1>
    <q:el2 xmlns:q="http://..."/>
    </el1>

  • Java.rmi.ServerException Problem

    The exception that has occured is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: Process00Impl_Stub
    I have the interface, Client, Server and the Implementation java files
    in the same machine.
    11/29/2002 08:52p 282 Process00.class
    11/29/2002 08:25p 221 Process00.java
    11/29/2002 07:40p 215 Process00.java.bak
    11/29/2002 08:56p 1,008 Process00Client.java
    11/29/2002 08:55p 1,010 Process00Client.java.bak
    11/29/2002 08:57p 451 Process00Impl.class
    11/29/2002 08:57p 936 Process00Impl.java
    11/29/2002 08:52p 934 Process00Impl.java.bak
    11/29/2002 08:57p 2,153 Process00Impl_Skel.class
    11/29/2002 08:57p 3,938 Process00Impl_Stub.class
    11/29/2002 08:56p 995 Process00Server.class
    11/29/2002 08:57p 645 Process00Server.java
    11/29/2002 08:56p 643 Process00Server.java.bak
    I also have the _Stub.class. I do not know why I get this error. If any
    one have an idea, kindly share with me.
    Thanks.

    Hi,
    I had the same problem. In my machine, path was having jre1.1.7 before my jdk 1.4. So it was picking up from jre1.1.7.
    Java was happy when I moved my jdk1.4 path to the beginning of the path variable.
    Hope this helps you.

  • RMI SSL problem

    Hi, I am learning RMI whit SSL and I have a problem, I cant run the example form the RMI SSL tutorials.
    I can run the server, and bind the object but the client throw this exception:
    HelloClient exception: error during JRMP connection establishment; nested exception is:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:274)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at HelloClient.main(HelloClient.java:60)...
    can you help me???

    Hi,
    Dis you solved the probelm ? I am facing the similar exception. I am using jre1.5.0_11.
    Regards,
    Titas Mutsuddy

  • RMI connectivity problem (multi-NIC)

    I'm developing a simple photo share program with Java RMI.
    I connect rmiregistry (192.168.100.3), it returns the object reference, but when I invoke a method I get problems.
    My server (remote) - 192.168.100.3 - reply with an address of another NIC - 192.168.62.1 (from VMware). I print out the Proxy object, and I was surprised when I saw 192.167.62.1 address, instead 192.168.100.3. My client is running on 192.168.100.1 address.
    Why is this happening?
    When I turned off the VMware virtual NICs, I was successful. I want to understand what is going on, and if is there a way to fix this issue.
    $ java rmi.Client
    Looking...object found!
    Proxy[PhotoShare,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[192.168.62.1:58343](remote),objID:[4cc5973e:11de2bb065b:-7fff, 4037313925566802436]]]]]
    Exception in thread "main" java.rmi.ConnectIOException: Exception creating connection to: 192.168.62.1; nested exception is:
         java.net.SocketException: Network is unreachable
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:614)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
         at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
         at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
         at $Proxy0.listaFotos(Unknown Source)
         at rmi.Client.main(Client.java:26)
    Caused by: java.net.SocketException: Network is unreachable
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:469)
         at java.net.Socket.<init>(Socket.java:366)
         at java.net.Socket.<init>(Socket.java:180)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
         ... 7 moreEdited by: pantony on Nov 28, 2008 3:26 AM
    Edited by: pantony on Nov 28, 2008 3:27 AM

    See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].

  • RMI observer problem

    Hello
    I want to write a client server application using rmi and eclipse, where many clients are able to register to the server. The server has a string attribute and a client should be able to pass a string object to the server and the server replaces the value of his attribute with the sent string and notifies all registered clients of the new value. In a later step the server writes to a mysql database and notifies the clients about changes in the database, but that is later...
    I use eclipse for developing.
    Here is the remoteinterface of the server:
    package com.iz.rmi.server;
    import java.rmi.*;
    import java.rmi.server.*;
    import com.iz.rmi.client.IObserver;
    public interface ISubject extends Remote
         public void registerClient(IObserver obs) throws RemoteException, ServerNotActiveException;
         public void notifyObervers() throws RemoteException, ServerNotActiveException;
    } the remoteinterface of the client:
    package com.iz.rmi.client;
    import java.rmi.*;
    import java.rmi.server.*;
    public interface IObserver extends Remote
         public void sendNotify(String notification) throws RemoteException, ServerNotActiveException;
    }the implementation of the server interface:
    package com.iz.rmi.server;
    import java.net.MalformedURLException;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.rmi.registry.*;
    import java.util.*;
    import com.iz.rmi.client.*;
    public class Subject extends UnicastRemoteObject implements ISubject
         private Vector<IObserver> obs;
         private String service;
         public Subject() throws java.rmi.RemoteException
              super();
              this.obs = new Vector<IObserver>();
         @Override
         public void notifyObervers() throws RemoteException, ServerNotActiveException
              Iterator<IObserver> obsIt = this.obs.iterator();
              while(obsIt.hasNext())
                   IObserver o = obsIt.next();
                   try
                        o.sendNotify("blabla");
                   catch (Exception e)
                        e.printStackTrace();
         @Override
         public void registerClient(IObserver obs) throws RemoteException, ServerNotActiveException
              System.out.println("client registered");
              this.obs.add(obs);
         public static void main(String[] args)
              if (System.getSecurityManager() == null)
                System.setSecurityManager(new SecurityManager());
              try
                String name = "Observable";
                ISubject engine = new Subject();
                //ISubject stub = (ISubject) UnicastRemoteObject.exportObject(engine, 0);
                LocateRegistry.createRegistry(1099);
                Registry registry = LocateRegistry.getRegistry(1099);
                registry.rebind(name, engine);
                System.out.println("ComputeEngine boundlll");
              catch (Exception e)
                System.err.println("ComputeEngine exception:");
                e.printStackTrace();
    } and the implementation of the client interface
    package com.iz.rmi.client;
    import java.rmi.*;
    import java.rmi.server.*;
    import com.iz.rmi.server.*;
    public class Observer extends UnicastRemoteObject implements IObserver
         private String host;
         private String service;
         private ISubject sub;
         public Observer(String host, String service) throws RemoteException
              this.host = host;
              this.service = service;
              System.out.println("Service: " + service);
              try
                   this.sub = (ISubject) Naming.lookup(this.service);
                   this.sub.registerClient(this);
                   System.out.println(" istered");
              catch(Exception e)
                   System.out.println("Unable to connect and register with subject.");
                   e.printStackTrace();
         @Override
         public void sendNotify(String notification) throws RemoteException,
                   ServerNotActiveException
         public static void main(String[] args)
              try {
                   new Observer("192.168.1.34:1099", "Observable");
              } catch (RemoteException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }Both programs get started with this vm-argument:
    -Djava.security.policy=C:\daten\noSpring\Obsv\wideopen.policy
    where wideopen.policy looks like this for testing:
    grant {
         // Allow everything for now
         permission java.security.AllPermission;
    };when I start the server all looks fine, but when I start the a client i become just the output.
    Service: Observable
    isteredinstead of
    Service: Observable
    client registerd
    isteredThere are no exceptions or something like that, but it seems that the registerClient()-method does not get called on the server when the client starts. There were many changes since the last time I used rmi, so I don't know what's wrong here. I hope some one can help me with this problem.
    Kind regards,
    Michael

    The server's System.out.prints will go to the server's console on the server host.
    Not interleaved wih the client's output on the client's console on the client host.

  • Got a RMI Client problem

    HI all im really not sure how to fix this error that im having, to be honest im not really sure what i have done wrong, or where im going wrong with pulling information from my interface or and implimentation.
    Okies here is all the code
    Interface:
    public interface RMIServ
    extends java.rmi.Remote {
    public String PassCheck(String pass, String user)
    throws java.rmi.RemoteException;
    Implimentation:
    public class RMIServImpl
    extends
         java.rmi.server.UnicastRemoteObject
    implements RMIServ {
    // Implementations must have an
    //explicit constructor
    // in order to declare the
    //RemoteException exception
    public RMIServImpl()
    throws java.rmi.RemoteException {
    super();
         public String PassCheck(String pass, String user)//takes the user and switch number
    throws java.rmi.RemoteException {
         String result;
         int password = Integer.parseInt(pass);//converts the string to an int
              int info = Integer.parseInt(user);//converts the string to an int
    if (password==72)//checks password
         switch(info)                         //start switch.
              case 1: result="Hello my name is Gareth Gates.";break;
              case 2: result= "My student number is 0302814.";break;
              case 3: result= "I am Taking Computer Science and Robotics.";break;
              case 4: result= "This semester i am taking 4 units, this is one.";break;
              case 5: result= "my project is on server times.";break;
              case 6: result= "i live in luton during the week.";break;
              case 7: result= "i work in a garden centre.";break;
              case 8: result= "please let me know what you think of my server.";break;
              case 9: result= "Email: [email protected]";break;
              case 10: result= "Email me any time, thanks.";break;
              default : result= "You entered a number bigger then 10 please try again.";break;
              }                                        //end switch.
         return result;                         //sends string back to client.
    else
         return result= "You entered the wrong password";//send back an error
    Server:
    import java.rmi.Naming;
    public class RMIServServer {
    public RMIServServer() {
    try {
    RMIServ c = new RMIServImpl();
    Naming.rebind("rmi://localhost:1099/RMIServService", c);
    } catch (Exception e) {
    System.out.println("Trouble: " + e);
    public static void main(String args[]) {
    new RMIServServer();
    Client:
    import java.rmi.Naming;
    import java.rmi.RemoteException;
    import java.net.MalformedURLException;
    import java.rmi.NotBoundException;
    import javax.swing.*;
    public class RMIServClient {
    public static void main(String[] args) {
    try {
    RMIServ c = (RMIServ)
    Naming.lookup("rmi://localhost/RMIServService");
    String password = JOptionPane.showInputDialog("Please enter your password");
    if (password == c.PassCheck(pass)){
    JOptionPane.showMessageDialog(null, "Password Correct");
    catch (MalformedURLException murle) {
    System.out.println();
    System.out.println(
    "MalformedURLException");
    System.out.println(murle);
    catch (RemoteException re) {
    System.out.println();
    System.out.println(
    "RemoteException");
    System.out.println(re);
    catch (NotBoundException nbe) {
    System.out.println();
    System.out.println(
    "NotBoundException");
    System.out.println(nbe);
    catch (
    java.lang.ArithmeticException
    ae) {
    System.out.println();
    System.out.println(
    "java.lang.ArithmeticException");
    System.out.println(ae);
    Any light that you could shed on my problem would be much appreciated, thanks for the help in advance
    the bold is where my problem lies
    Joe de Ronde
    Message was edited by:
    joederonde

    try
    String password = JOptionPane
              .showInputDialog("Please enter your password");
    if (password == c.PassCheck(password, "username")) {
         JOptionPane.showMessageDialog(null, "Password Correct");
    }Also your implementation is wrong, you better take a look at some examples (like the java tutorial, including the rmi tutorial, or if you're using eclipse there are some working ready to use examples in the rmi plugin for eclipse (google it).

  • RMI Exception

    I'm getting an ExportException coming from one class (SGJmsWriter) but not from the other classes I have that are basically the same thing. I've looked all around for a resolution to this problem, and I solved one problem where I hadn't called connection.start(), but I still have this one. Basically, I have multiple threads on the same box going to the virtual machine for JMS stuff. I have at least 2 other threads that are connecting in the same way that don't throw an exception. Any help is appreciated.
    connectionFactory = new ActiveMQConnectionFactory(
                   ActiveMQConnection.DEFAULT_USER,
                   ActiveMQConnection.DEFAULT_PASSWORD, "vm://localhost");
             connection = connectionFactory.createQueueConnection();
             connection.start();
             session = connection.createQueueSession(false,
                   QueueSession.AUTO_ACKNOWLEDGE);
             queue = session.createQueue(QUEUE_NAME);
             producer = session.createProducer(queue);
             producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
    java.rmi.server.ExportException: internal error: ObjID already in use
         at sun.rmi.transport.ObjectTable.putTarget(Unknown Source)
         at sun.rmi.transport.Transport.exportObject(Unknown Source)
         at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
         at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
         at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
         at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
         at sun.rmi.registry.RegistryImpl.setup(Unknown Source)
         at sun.rmi.registry.RegistryImpl.<init>(Unknown Source)
         at java.rmi.registry.LocateRegistry.createRegistry(Unknown Source)
         at org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:382)
         at org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:301)
         at org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:154)
         at org.apache.activemq.broker.jmx.ManagementContext.start(ManagementContext.java:78)
         at org.apache.activemq.broker.BrokerService.start(BrokerService.java:391)
         at org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:113)
         at org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:52)
         at org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:43)
         at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:77)
         at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:227)
         at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:242)
         at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:211)
         at org.apache.activemq.ActiveMQConnectionFactory.createQueueConnection(ActiveMQConnectionFactory.java:173)
         at com.gdc4s.muos.nms.fcap.fmtds.source.SGJmsWriter.initialize(SGJmsWriter.java:130)
         at com.gdc4s.muos.nms.fcap.fmtds.source.SGJmsWriter.run(SGJmsWriter.java:167)
         at java.lang.Thread.run(Unknown Source)

    You are trying to start two Registries in the same JVM.

  • Java.rmi.NoSuchObjectException problems

    Hello,
    After calling home.create() in my code, passing in primary key and
    additional column data, when I call home.findByPrimaryKey (primkey)
    followed by a call to one of the methods in the bean, I immediately get
    a a java.rmi.NoSuchObjectException.
    An exception is not thrown when calling home.findByPrimaryKey (primkey)
    so it is safe to assume that a reference has been obtained to the bean
    with the data I am looking for, correct? If so, why am I getting this
    exception:
    java.rmi.NoSuchObjectException: Bean with primary key: 'Pat Hardy' not
    found in
    home: 'Student'
    at
    weblogic.ejb.internal.EntityEJBContext.load(EntityEJBContext.java:153
    at
    weblogic.ejb.internal.EntityEJBContext.afterBegin(EntityEJBContext.ja
    va:212)
    at
    weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulE
    JBObject.java:162)
    etc.
    etc.
    etc.
    Any ideas of what I might be doing wrong?
    Thanks for your help in advance.

    We had a similar problem, although I don't know if it was the same
    thing. We are using WL 5.1, sp5, with Oracle 8.1.6.
    I have a stateless session bean, which had a transactional attribute
    of 'Supports'. It would call an entity bean with transactional attribute
    of 'RequiresNew' for all methods. The session bean would do a finder
    on the entity bean, and if it got an ObjectNotFoundException, it would
    then create the entity bean with a call to home.create(id). Then, it would
    call a business method on the entity bean.
    For some reason, in the case where the session bean is called from within
    a thread that already had a transaction started, the call to the entity
    bean business method would hang, if an only if it had to create a new
    bean first. If the finder of the bean succeeded, there would be no hang.
    Sometimes, instead of hanging, it would return a NoSuchObjectException.
    If the stateless bean were called outside of a transaction, would always
    succeed, regardless.
    So, my fix, was to set the transactional attribute for the stateless bean to
    'NotSupported' for all methods. It now seems to work in all cases,
    no more hangs or NoSuchObjectExceptions....
    Is this expected behavior? Is this related to the same problem?
    The BEA recomendations to use READ-COMMITTED are useless for
    the case where you are running a clustered environment, and where you
    need to have the bean deployed on all servers in the cluster for
    fail-over reliability.....
    Jason
    "Korey Shronts" <[email protected]> wrote in message
    news:[email protected]...
    I dont' know about the mapping to CHAR but we've managed to fix our nosuch
    object problem.
    BEA sent me this snippet:
    The bug is as follows
    In Oracle (8.0.5), if there is a primary key constraint AND you use an
    isolation
    level of SERIALIZABLE, an insert followed by an update in the same
    transaction
    fails. Specifically, the insert succeeds (to all outward indications),
    but the update fails (the returned count is 0) after some number of
    iterations.
    What's the workaround? If the customer is not sharing the database with
    any
    other app or running it under a cluster, tell them to set the isolation
    level to
    read_committed. Serializable only slows them down without any added
    benefit.
    If clustering is on, and serializable behavior is deemed essential for
    this
    particular bean, maybe they can deploy the bean on only one of the
    servers
    to reduce it to the case above.
    I set the isolation level on our beans to read_commited. Fixed theproblem
    although we're using Oracle 8i not 8.0.5.
    <[email protected]> wrote in message
    news:[email protected]...
    Well, it appears, that you cannot map a java.lang.String to a CHAR inOracle.
    A java.lang.String can be mapped to a VARCHAR2.
    Is this a bug?
    [email protected] wrote:
    I just install WebLogic server 5.1.0 and SP5 on a new machine.
    Still have the same problems.
    Will keep you posted.
    Korey Shronts wrote:
    We're having the same problem. I've opened a case with BEA but
    haven't
    heard anything yet. If you find the solution let me know!
    [email protected]
    <[email protected]> wrote in message
    news:[email protected]...
    I accidently omitted the first line in the exception. Sorry aboutthat.
    Here it is again from the beginning:
    Thu Sep 21 08:52:12 EDT 2000:<I> <EJB JAR deploymentC:/wlogic/lib/S.jar>
    Transa
    ction: '969540638993_1' rolled back due to EJB exception:
    java.rmi.NoSuchObjectException: Bean with primary key: 'Pat Hardy'not
    found in
    home: 'Student'
    at
    weblogic.ejb.internal.EntityEJBContext.load(EntityEJBContext.java:153
    at
    weblogic.ejb.internal.EntityEJBContext.afterBegin(EntityEJBContext.ja
    va:212)
    at
    weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulE
    JBObject.java:162)
    etc.
    etc.
    etc.
    Any ideas of what I might be doing wrong?
    Thanks for your help in advance.
    [email protected] wrote:
    Hello,
    After calling home.create() in my code, passing in primary key
    and
    additional column data, when I call home.findByPrimaryKey(primkey)
    followed by a call to one of the methods in the bean, Iimmediately get
    a a java.rmi.NoSuchObjectException.
    An exception is not thrown when calling home.findByPrimaryKey(primkey)
    so it is safe to assume that a reference has been obtained to
    the
    bean
    with the data I am looking for, correct? If so, why am I gettingthis
    exception:
    java.rmi.NoSuchObjectException: Bean with primary key: 'Pat
    Hardy'
    not
    found in
    home: 'Student'
    at
    weblogic.ejb.internal.EntityEJBContext.load(EntityEJBContext.java:153
    at
    weblogic.ejb.internal.EntityEJBContext.afterBegin(EntityEJBContext.ja
    va:212)
    at
    weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulE
    JBObject.java:162)
    etc.
    etc.
    etc.
    Any ideas of what I might be doing wrong?
    Thanks for your help in advance.

  • RMI activation problem under LINUX

    When I try to run the activation example from the RMI tutorial, I get the following exception:
    Exception in thread "main" java.rmi.activation.ActivationException: ActivationSystem not running; nested exception is:
    java.rmi.NotBoundException: java.rmi.activation.ActivationSystem
    at java.rmi.activation.ActivationGroup.getSystem(ActivationGroup.java:453)
    at examples.activation.Setup.main(Setup.java:68)
    Caused by: java.rmi.NotBoundException: java.rmi.activation.ActivationSystem
    at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:106)
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
    at sun.rmi.transport.Transport$1.run(Transport.java:148)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    at java.lang.Thread.run(Thread.java:536)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Naming.java:84)
    at java.rmi.activation.ActivationGroup.getSystem(ActivationGroup.java:449)
    ... 1 more
    This is with J2SE 1.4.1 on RedHat 7.3 running a vanilla 2.4.18 kernel. I'm running everything out of shell scripts to keep from getting bitten by typos.
    Here's the punchline: The identical code works just fine on RedHat 6.2 (kernel 2.2.14 or so) - same 1.4.1.
    Netstat tells me there is something listening on the appropriate ports, and output from strace suggests that there is some traffic back and forth to the server. There is no firewall running - I unloaded ipchains in the interest of paranoia. (There is firewalling running on the working system, go figure...)
    Help? I can post more details if that would help resolve the problem.

    I wrote
    When I try to run the activation example from the RMI
    tutorial, I get the following exception:<snip>
    The key was this:
    The identical code works just
    fine on RedHat 6.2 (kernel 2.2.14 or so) - same 1.4.1."Identical" really was - I'd used a tar archive to make a complete copy of the code running on the RH 6.2 system. The copy included the file log/Logfile.1, written by rmid (or rmiregistry). This contains lots of IP addresses; I suspect it's more than a log. Since the original machine and the clone are separated by a firewall, attempts by the clone to contact the original failed.
    Deleting the "log" directory made the problem go away.

  • RMI Exceptions

    Hello, I am new to java RMI,
    I have written a simple program, I can run Server without problems, but when I try to run Client I get these exceptions:
    Exception in thread "main" java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:13371 connect,resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
         at java.security.AccessController.checkPermission(AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:475)
         at java.net.Socket.<init>(Socket.java:372)
         at java.net.Socket.<init>(Socket.java:186)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
         at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at Client.<init>(Client.java:47)
         at Client.main(Client.java:104)Here is my "Communication" interface:
    import java.rmi.*;
    public interface Communication extends Remote{
         public void receiveUsername(String username) throws RemoteException;
         public void receivePassword(String password) throws RemoteException;
    }Here is the part of my Server class:
    System.setSecurityManager(new RMISecurityManager());
    try {
         address_ = (InetAddress.getLocalHost()).toString();
    } catch (UnknownHostException e) {
         e.printStackTrace();
         System.exit(1);
    port_ = 13371;
    try {
         registry_ = LocateRegistry.createRegistry(port_);
         registry_.rebind("MyServer", this);
    } catch (RemoteException e) {
         e.printStackTrace();
         System.exit(1);
    System.out.println("Server succesfully started...");
    System.out.println("{Address = " + address_ + ", port = " + port_ + "}");
    System.out.println("Waiting for tasks...");Here is the part of my Client class:
    System.setSecurityManager(new RMISecurityManager());
    System.out.println("Trying to connect to " + SERVER_ADDRESS + " via " + PORT);
    try {
         registry_ = LocateRegistry.getRegistry(SERVER_ADDRESS, PORT);
         server_ = (Communication) (registry_.lookup("MyServer"));
    } catch (RemoteException e) {
         e.printStackTrace();
         System.exit(1);
    } catch (NotBoundException e) {
         e.printStackTrace();
         System.exit(1);
    }This is how I compile and run my server:
    javac Server.java
    rmic Server
    java Server
    This is how I compile and run my client:
    javac Client.java
    java Client
    Can somebody help me to find out what I am doing wrong, and what I need to fix this?
    Thanks for any help, I appreciate it.

    Alright so, I have specified externally reachable ip, and I got these exceptions on server:
    Exception in thread "RMI TCP Connection(idle)" java.security.AccessControlException: access denied (java.net.SocketPermission xxx.xxx.xx.xx:49926 accept,resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
         at java.security.AccessController.checkPermission(AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkAccept(SecurityManager.java:1157)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.checkAcceptPermission(TCPTransport.java:636)
         at sun.rmi.transport.tcp.TCPTransport.checkAcceptPermission(TCPTransport.java:275)
         at sun.rmi.transport.Transport$1.run(Transport.java:158)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:619)
    and exceptions on client side:
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.io.EOFException
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:209)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at Client.<init>(Client.java:47)
         at Client.main(Client.java:104)
    Caused by: java.io.EOFException
         at java.io.DataInputStream.readByte(DataInputStream.java:250)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:195)
         ... 4 more

Maybe you are looking for

  • Sharing is there a better way to do this?

    First time user of Pages (recently purch imac and have always used pc and office). So my scenerio is this: 1.) I have a receipt that I have to send to a customer. I go online to our vendor my acct and get receipt. I see where I can click on many opti

  • I lost my Contacts and Notes

    I wanted to switch my e-mail account on my iPhone 5 so I deleted my current account and added the new mail account. The account I deleted from my phone is the same as my iTunes /iCloud account, and it appears that is how I deleted my phone contacts.

  • Itunes update server could not be contacted

    I am trying to update itunes for my computer (with windows 7) but every time I press "Check for updates" under the "Help" tab in itunes, a box pops up and tells me that "The itunes update server could not be contacted." It tells me to test my interne

  • Patching with physical standby document

    There is this old document targeting 9i. Is there anything for 11g of a similar nature: Applying Patch Sets / Interim Patches with Physical Standby Database in Place in Oracle 9i [ID 187242.1]

  • INCOMING EMAIL MAIL.

    INCOMING EMAIL  NO ATTACHMENTS WHY?