Invoke remote method

my program require to invoke server method (mathematics and transfer of data) on mouseClick on Canvas of client applet.
What should i use ?

You could use RMI, or use HTTP with servlets, jsps, etc.

Similar Messages

  • Connection problem while invoking remote method from client using oracle 8.1.6 server

    while using a connection object to make connection to oracle in all remote methods(in EJB)only the first remote method called from the EJB client is getting invoked and the connection stops.It gives me COMM_FAILURE while invoking the second method in oracle 8.1.6.Help me out in this aspect immediately please.

    r singh wrote:
    >
    I am getting "No Suitable Driver" exception from WebLogic 6.1 (sp1) at
    the start up of the server.
    My settings:
    - WLS 6.1 on a solaris 8 machine and Oracle 8.1.6 on a WIN2K machine.
    - I created the connection pool for oracle with the following
    parameters:
    connection name: OracleConnectionPool
    url: jdbc.oracle.thin:@myOracleServer:1521:myDBName
    driver class name: oracle.jdbc.driver.OracleDriver
    properties: user=scott
    password=tiger
    - I have also downloaded classes12.zip and nls_charset12.zip from
    Oracle.com
    and have placed under $WL_HOME/lib.
    - I have added $WL_HOME/lib/classes12.zip:$WL_HOME/lib/nls_charset12.zip
    in
    front of the $CLASSPATH in the startWeblogic.sh script. The echoed
    classpath
    from the startup script is:
    /opt/tools/bea/wlserver6.1/lib/classes12.zip:/opt/tools/bea/wlserver6.1/lib/nls_
    charset12.zip:/opt/tools/bea/wlserver6.1:/opt/tools/bea/wlserver6.1/lib/weblogic
    _sp.jar:/opt/tools/bea/wlserver6.1/lib/weblogic.jar
    - Still I get the error:
    <Jan 16, 2002 1:38:45 PM EST> <Error> <JDBC> <Cannot startup
    connection pool "Or
    acleConnectionPool" No suitable driver>
    Can somebody point me out if i am doing anything wrong here.
    Thanks.
    RamanandHi,
    Sure. Your URL should be "jdbc:oracle:thin:@myOracleServer:1521:myDBName"
    not "jdbc.oracle.thin:@myOracleServer:1521:myDBName"
    Joe

  • Cannot invoke remote method

    can you please tell whatis wrong in the program.
    //the interface
    package com.nanotech.nanopos.synchronize.actions.user;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import java.security.Key;
    import org.w3c.dom.Document;
    public interface ISyncUser extends Remote {
        public void updateUsers(Document d, Key keyEncryptKey) throws RemoteException;
    }// the object
    package com.nanotech.nanopos.synchronize.actions.user;
    import com.nanotech.framework.Framework;
    import com.nanotech.nanopos.user.bl.IUserBO;
    import com.nanotech.nanopos.user.bl.UserBO;
    import com.nanotech.nanopos.user.delegate.IUserDelegate;
    import java.rmi.MarshalledObject;
    import java.rmi.RemoteException;
    import java.rmi.activation.Activatable;
    import java.rmi.activation.ActivationID;
    import java.security.Key;
    import javax.crypto.SecretKey;
    import javax.crypto.SecretKeyFactory;
    import javax.crypto.spec.DESedeKeySpec;
    import org.apache.xml.security.encryption.XMLCipher;
    import org.apache.xml.security.utils.EncryptionConstants;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    public class SyncUser extends Activatable implements ISyncUser{
        Document d;
        public SyncUser(ActivationID id, MarshalledObject data) throws RemoteException {
            super(id, 0);
        public void updateUsers(Document doc, Key keyEncryptKey) throws RemoteException {
            try {
                d = decryptFile(doc,keyEncryptKey);
                Element  root1 = d.getDocumentElement();
                NodeList nusers = root1.getChildNodes();
                Framework nanoFramework = Framework.getInstance();
                IUserDelegate userDelegate = (IUserDelegate) nanoFramework.getBean("userDelegate");
                for(int j=0; j < nusers.getLength(); j++){
                    Node n = nusers.item(j);
                    String s = n.getAttributes().getNamedItem("status").getNodeValue();
                    NodeList nl = n.getChildNodes();
                    IUserBO user = new UserBO();
                    user.setUserId(nl.item(0).getFirstChild().getNodeValue());
                    user.setUserName(nl.item(1).getFirstChild().getNodeValue());
                    user.setPassword(nl.item(2).getFirstChild().getNodeValue());
                    user.setRights(Integer.parseInt(nl.item(3).getFirstChild().getNodeValue()));
                    user.setStatus("S");
                    if(s.equalsIgnoreCase("A")){
                        userDelegate.addUser(user);
                    }else if(s.equalsIgnoreCase("E")){
                        userDelegate.updateUser(user);
                    }else if(s.equalsIgnoreCase("D")){
                        userDelegate.deleteUser(user.getUserId());
            } catch (Exception ex) {
                ex.printStackTrace();
        public Document decryptFile(Document doc, Key EncryptKey) throws Exception{
            // load the encrypted file into a Document
            Document document = doc;
            org.apache.xml.security.Init.init();
            // get the encrypted data element
            String namespaceURI = EncryptionConstants.EncryptionSpecNS;
            String localName = EncryptionConstants._TAG_ENCRYPTEDDATA;
            Element encryptedDataElement =
                    (Element)document.getElementsByTagNameNS(namespaceURI,
                    localName).item(0);
            // Load the key encryption key.
            String jceAlgorithmName = "DESede";
            // File kekFile = new File(fileName);
            DESedeKeySpec keySpec = new DESedeKeySpec(EncryptKey.getEncoded());
            SecretKeyFactory skf =  SecretKeyFactory.getInstance(jceAlgorithmName);
            SecretKey key = skf.generateSecret(keySpec);
            Key keyEncryptKey = key;
            // initialize cipher
            XMLCipher xmlCipher = XMLCipher.getInstance();
            xmlCipher.init(XMLCipher.DECRYPT_MODE, null);
            xmlCipher.setKEK(keyEncryptKey);
            // do the actual decryption
            xmlCipher.doFinal(document, encryptedDataElement);
            return document;
    //server
    package com.nanotech.nanopos.synchronize.actions.server;
    import com.nanotech.nanopos.synchronize.actions.user.ISyncUser;
    import java.net.MalformedURLException;
    import java.rmi.MarshalledObject;
    import java.rmi.Naming;
    import java.rmi.RMISecurityManager;
    import java.rmi.RemoteException;
    import java.rmi.activation.Activatable;
    import java.rmi.activation.ActivationDesc;
    import java.rmi.activation.ActivationException;
    import java.rmi.activation.ActivationGroup;
    import java.rmi.activation.ActivationGroupDesc;
    import java.rmi.activation.ActivationGroupID;
    import java.rmi.activation.UnknownGroupException;
    import java.util.Properties;
    public class SyncUserServer {
        public SyncUserServer(){
            try {
                System.setSecurityManager(new RMISecurityManager());
                Properties props = new Properties();
                props.put("java.security.policy", "com/nanotech/nanopos/synchronize/actions/security/security.policty");
                ActivationGroupDesc.CommandEnvironment ace = null;
                ActivationGroupDesc exampleGroup = new ActivationGroupDesc(props, ace);
                ActivationGroupID agi =
                        ActivationGroup.getSystem().registerGroup(exampleGroup);
                String location =  "file:com/nanotech/nanopos/synchronize/actions/user/";
                MarshalledObject data = null;
                ActivationDesc desc = new ActivationDesc
                        (agi, "com.nanotech.nanopos.synchronize.actions.user.SyncUser",location, data);
                ISyncUser syncUser = (ISyncUser)Activatable.register(desc);
                System.out.println("Got the stub for SyncUser");
                Naming.rebind("SyncUser1", syncUser);
                System.out.println("Exported from registration");
            } catch (RemoteException ex) {
                ex.printStackTrace();
            } catch (UnknownGroupException ex) {
                ex.printStackTrace();
            } catch (MalformedURLException ex) {
                ex.printStackTrace();
            } catch (ActivationException ex) {
                ex.printStackTrace();
    }//the client
    package com.nanotech.nanopos.synchronize.actions.user;
    import com.nanotech.framework.Framework;
    import com.nanotech.framework.action.IAction;
    import com.nanotech.nanopos.controller.NanoPOSController;
    import com.nanotech.nanopos.user.bl.IUserBO;
    import com.nanotech.nanopos.user.delegate.IUserDelegate;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.registry.Registry;
    import java.util.ArrayList;
    import java.util.Iterator;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import org.w3c.dom.Attr;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import java.security.Key;
    import javax.crypto.SecretKey;
    import javax.crypto.KeyGenerator;
    import org.apache.xml.security.keys.KeyInfo;
    import org.apache.xml.security.encryption.XMLCipher;
    import org.apache.xml.security.encryption.EncryptedData;
    import org.apache.xml.security.encryption.EncryptedKey;
    public class UserSyncAction implements IAction {
        public void execute(Object controller) throws Exception {
            NanoPOSController nanoPOSController = (NanoPOSController) controller;
            Framework nanoFramework = Framework.getInstance();
            IUserDelegate userDelegate = (IUserDelegate) nanoFramework.getBean("userDelegate");
            ArrayList users = userDelegate.getAllUnSyncUsers();
            try {
                DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                DocumentBuilder db = dbf.newDocumentBuilder();
                org.w3c.dom.Document d = db.newDocument();
                Element root =  d.createElement("nanoPOS");
                Iterator i =  users.iterator();
                while(i.hasNext()){
                    Element user = d.createElement("user");
                    IUserBO  userBO = (IUserBO) i.next();
                    Element userId = d.createElement("userid");
                    Element userName = d.createElement("username");
                    Element password = d.createElement("password");
                    Element rights = d.createElement("rights");
                    userId.appendChild(d.createTextNode(userBO.getUserId()));
                    userName.appendChild(d.createTextNode(userBO.getUserName()));
                    password.appendChild(d.createTextNode(userBO.getPassword()));
                    rights.appendChild(d.createTextNode(userBO.getRights().toString()));
                    user.appendChild(userId);
                    user.appendChild(userName);
                    user.appendChild(password);
                    user.appendChild(rights);
                    Attr status = d.createAttribute("status");
                    status.setValue(userBO.getStatus());
                    user.setAttributeNode(status);
                    root.appendChild(user);
                d.appendChild(root);
                Registry reg = LocateRegistry.getRegistry();
                ISyncUser syncUser = (ISyncUser) reg.lookup("SyncUser");
                syncUser.updateUsers(encryptFile(d),keyEncryptKey);
            } catch (DOMException ex) {
                ex.printStackTrace();
            } catch (ParserConfigurationException ex) {
                ex.printStackTrace();
            } catch (TransformerFactoryConfigurationError ex) {
                ex.printStackTrace();
        private Key GenerateSymmetricKey() throws Exception {
            String jceAlgorithmName = "AES";
            KeyGenerator keyGenerator =
                    KeyGenerator.getInstance(jceAlgorithmName);
            keyGenerator.init(128);
            return keyGenerator.generateKey();
        private  SecretKey GenerateKeyEncryptionKey() throws Exception {
            String jceAlgorithmName = "DESede";
            KeyGenerator keyGenerator =
                    KeyGenerator.getInstance(jceAlgorithmName);
            SecretKey keyEncryptKey = keyGenerator.generateKey();
            return keyEncryptKey;
        private void storeKeyFile(Key keyEncryptKey) throws IOException {
            byte[] keyBytes = keyEncryptKey.getEncoded();
            File keyEncryptKeyFile = new File("keyEncryptKey");
            FileOutputStream outStream = new FileOutputStream(keyEncryptKeyFile);
            outStream.write(keyBytes);
            outStream.close();
            System.out.println("Key encryption key stored in: "
                    + keyEncryptKeyFile.toURL().toString());
    Key keyEncryptKey;
        public Document encryptFile(Document d) throws Exception{
            org.apache.xml.security.Init.init();
            // generate symmetric key
            Key symmetricKey = GenerateSymmetricKey();
            // Get a key to be used for encrypting the symmetric key
            keyEncryptKey = GenerateKeyEncryptionKey();
            // Write the key to a file
            storeKeyFile(keyEncryptKey);
            // initialize cipher
            XMLCipher keyCipher =
                    XMLCipher.getInstance(XMLCipher.TRIPLEDES_KeyWrap);
            keyCipher.init(XMLCipher.WRAP_MODE, keyEncryptKey);
            // encrypt symmetric key
            EncryptedKey encryptedKey = keyCipher.encryptKey(d, symmetricKey);
            // specify the element to encrypt
            Element elementToEncrypt = d.getDocumentElement();
            // initialize cipher
            XMLCipher xmlCipher =
                    XMLCipher.getInstance(XMLCipher.AES_128);
            xmlCipher.init(XMLCipher.ENCRYPT_MODE, symmetricKey);
            // add key info to encrypted data element
            EncryptedData encryptedDataElement =
                    xmlCipher.getEncryptedData();
            KeyInfo keyInfo = new KeyInfo(d);
            keyInfo.add(encryptedKey);
            encryptedDataElement.setKeyInfo(keyInfo);
            // do the actual encryption
            boolean encryptContentsOnly = true;
            xmlCipher.doFinal(d,elementToEncrypt,encryptContentsOnly);
            return d;
    }//policy file
    grant {
    Permission java.security.AllPermission;
    //command used to run the program
    first i start the rmiregistryby the following command
    start rmiregisry
    the rmid deamon
    start rmid -J-Djava.security.policy=com\nanotech\nanopos\synchronize\actions\security\security.policy
    when i arn the program i getting the following exception
    java.rmi.activation.ActivateFailedException: activation failed; nested exception is:
    java.rmi.activation.ActivationException: Activatable object must provide an activation constructor; nested exception is:
    java.lang.NoSuchMethodException: com.nanotech.nanopos.synchronize.actions.user.SyncUser.<init>(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)
    at sun.rmi.server.ActivatableRef.activate(ActivatableRef.java:285)
    at sun.rmi.server.ActivatableRef.invoke(ActivatableRef.java:114)
    at com.nanotech.nanopos.synchronize.actions.user.SyncUser_Stub.updateUsers(Unknown Source)
    at com.nanotech.nanopos.synchronize.actions.user.UserSyncAction.execute(UserSyncAction.java:86)
    at com.nanotech.nanopos.controller.NanoPOSController.actionPerformed(NanoPOSController.java:582)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1766)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Caused by: java.rmi.activation.ActivationException: Activatable object must provide an activation constructor; nested exception is:
    java.lang.NoSuchMethodException: com.nanotech.nanopos.synchronize.actions.user.SyncUser.<init>(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)
    at sun.rmi.server.ActivationGroupImpl.newInstance(ActivationGroupImpl.java:273)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    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:595)
    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:126)
    at java.rmi.activation.ActivationGroup_Stub.newInstance(Unknown Source)
    at sun.rmi.server.Activation$ObjectEntry.activate(Activation.java:1277)
    at sun.rmi.server.Activation$GroupEntry.activate(Activation.java:972)
    at sun.rmi.server.Activation$ActivatorImpl.activate(Activation.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    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:595)
    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:126)
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:179)
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
    at $Proxy17.activate(Unknown Source)
    at java.rmi.activation.ActivationID.activate(ActivationID.java:96)
    at sun.rmi.server.ActivatableRef.activate(ActivatableRef.java:258)
    ... 28 more
    Caused by: java.lang.NoSuchMethodException: com.nanotech.nanopos.synchronize.actions.user.SyncUser.<init>(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)
    at java.lang.Class.getConstructor0(Class.java:2647)
    at java.lang.Class.getDeclaredConstructor(Class.java:1953)
    at sun.rmi.server.ActivationGroupImpl$1.run(ActivationGroupImpl.java:228)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.server.ActivationGroupImpl.newInstance(ActivationGroupImpl.java:222)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    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:595)

    i have done what u have said no i am getting following exception.
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
    java.io.EOFException
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
    at sun.rmi.server.ActivatableRef.invoke(ActivatableRef.java:124)
    at com.nanotech.nanopos.synchronize.actions.user.SyncUser_Stub.updateUsers(Unknown Source)
    at com.nanotech.nanopos.synchronize.actions.user.UserSyncAction.execute(UserSyncAction.java:85)
    at com.nanotech.nanopos.controller.NanoPOSController.actionPerformed(NanoPOSController.java:582)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1766)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Caused by: java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:243)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)
    ... 29 more
    also on the rmid console i am getting the following exception.
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:Exception in thread "RMI TCPConnection(2)-192.168.0.4" java.security.AccessControlException: access denied (java.net.SocketPermission 192.168.0.4:1630 accept,resolve)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at java.security.AccessController.checkPermission(AccessController.java:427)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at java.lang.SecurityManager.checkAccept(SecurityManager.java:1157)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.checkAcceptPermission(TCPTransport.java:560)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at sun.rmi.transport.tcp.TCPTransport.checkAcceptPermission(TCPTransport.java:208)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at sun.rmi.transport.Transport$1.run(Transport.java:152)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at java.security.AccessController.doPrivileged(Native Method)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at java.lang.Thread.run(Thread.java:595)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:Exception in thread "RMI TCPConnection(2)-192.168.0.4" java.security.AccessControlException: access denied (java.net.SocketPermission 192.168.0.4:1641 accept,resolve)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at java.security.AccessController.checkPermission(AccessController.java:427)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at java.lang.SecurityManager.checkAccept(SecurityManager.java:1157)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.checkAcceptPermission(TCPTransport.java:560)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at sun.rmi.transport.tcp.TCPTransport.checkAcceptPermission(TCPTransport.java:208)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at sun.rmi.transport.Transport$1.run(Transport.java:152)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at java.security.AccessController.doPrivileged(Native Method)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    Sat Jul 01 16:07:32 GMT+05:00 2006:ExecGroup-1:err:at java.lang.Thread.run(Thread.java:595)
    Sat Jul 01 16:06:24 GMT+05:00 2006:ExecGroup-0:err:at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    Message was edited by:
    abdulKhaliq
    Message was edited by:
    abdulKhaliq

  • RMI: connection refused error while invoking remote method from client mac.

    Hi All,
    when i run client program, which is calling remote object from other system, it shows the below error.
    please help me solving this issue, i also have policy file and installed security manager.
    Exception in Cliendjava.rmi.ConnectException: Connection refused to host: 10.66.
    112.137; nested exception is:
    java.net.ConnectException: Connection refused: connect
    thanks in advance.
    Regards,
    Anand.

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

  • JApplet gets an exception when tries to invoke remote method

    yes, look at the screen shot here (Status bar in Iexplorer)
    http://www.geocities.com/pyc_delf/exception.html
    Can anyone help me out with this thing. I have an applet which retrieves some data from remote rmi server through RMI. somehow its not working when put on web-server, particularly in jakarta-tomcat. Does it have to do with server settings or with that whole java thing (rmi, applet security blah, blah, which i have little idea about) I suspect it has to do with registry, but cant figure out what exactly is happening. Both remote server and applet are on the same machine, i.e. localhost. jakarta provides it's services also in localhost but through port number 8080. it's just in case u might think the problem is in web-server.
    Thank you
    applet screenshot:
    http://www.geocities.com/pyc_delf/

    btw, it works perfectly fine when jakarta is not started, i.e. i can view applet in html file perfectly without going through web-server address. i.e. C:\..blah,blah\rating.html works perfectly. but "http://localhost:8080/myapp/rating.html" doesnt work! help!

  • How to realize timeout while invoking a method in remote sesssion bean using my session bean running on wls5.1

    I am using WL5.1 SP11 on a project. I have a stateless session bean inside which
    I will invoke a method defined in another stateless session bean in a remote weblogic
    server 5.1. The performance of the remote server is very low and sometimes when
    I invoke the method through RMI, I got to wait for a long time. So I want to set
    a timeout for my session bean while doing RMI call. The only parameter I could
    find in weblogic-ejb-jar.xml is the "transaction-timeout", but even if I set transaction
    attribute for my session bean, it always block there to wait for the response
    from the remote session bean. The configuation did not work.
    Is there any other solutions to my problem? Please give me some advice if anyone
    has experience on it, Thank you very much.

    I am using WL5.1 SP11 on a project. I have a stateless session bean inside which
    I will invoke a method defined in another stateless session bean in a remote weblogic
    server 5.1. The performance of the remote server is very low and sometimes when
    I invoke the method through RMI, I got to wait for a long time. So I want to set
    a timeout for my session bean while doing RMI call. The only parameter I could
    find in weblogic-ejb-jar.xml is the "transaction-timeout", but even if I set transaction
    attribute for my session bean, it always block there to wait for the response
    from the remote session bean. The configuation did not work.
    Is there any other solutions to my problem? Please give me some advice if anyone
    has experience on it, Thank you very much.

  • Invoking a Remote Method

    The Question is ?
    Suppose there is a object running on system, Say A. Another Object/Client want to invoke a method of the object in the System A and that method returns some value. Now the problem is if the method invoked returns the values in more then, say 10 sec because of some network problem. Now we have to throw an Exception to the program if it takes more then, say 2 seconds. We can't touch the codes running on the Server A. We just have the interfaces to the object. We can think the server as Black Box. So this it.

    Is this a homework problem?

  • Unable to use Datasource.cfc in Admin API - The current user is not authorized to invoke this method

    Hi Everyone,
    I am having some issues accessing the methods in the datasource.cfc in the adminAPI.
    I can successfully load the administrator CFC and am told that I have successsfuly logged in;
    But when I try to subsequently load the datasource.cfc I get an error that the current user is unable to access the method.
    /* Create an Admin API object and call the login method */
                                                      var local = {};
                                                      local.adminObj = createObject("component", "cfide.adminapi.administrator");
                                                      /* Enter your password for the CF Admin */
      /* if you dump this - TRUE is returned */
                                                      local.adminObj.login(adminPassword="my_admin_user_password");
                                                      /* Create an object of datasource component */
                                                      local.dsnObj = createObject("component", "cfide.adminapi.datasource");
      writeDump(local.dsnObj.getDataSources());
    I tried creating separate admin users and passwords - yhinking that perhaps a revent hotfix had stopped the "admin" user from being allowed to use the adminAPI - but changing to a new adminuser yielded the same results.
    I could login to the admin API with the new username and passsword - but could not access the datasource.cfc after that.
    Here is the debug output from the error...
    The current user is not authorized to invoke this method.
    The error occurred in accessmanager.cfc: line 48
    Called from datasource.cfc: line 52
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 155
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 52
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 45
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 1
    -1 : Unable to display error's location in a CFML template.
    Resources:
    Check the ColdFusion documentation to verify that you are using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser 
    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
    Remote Address 
    127.0.0.1
    Referrer 
    Date/Time 
    22-Apr-13 01:09 PM
    Stack Trace
    at cfaccessmanager2ecfc974154242$funcCHECKADMINROLES.runFunction(E:/cf10_final/cfusion/wwwro ot/CFIDE/adminapi/accessmanager.cfc:48) at cfdatasource2ecfc1679861966$funcGETDATASOURCES.runFunction(E:/cf10_final/cfusion/wwwroot/ CFIDE/adminapi/datasource.cfc:52) at cfApplication2ecfc498167235$funcPREREQUISITESTART.runFunction(C:/inetpub/wwwroot/projectD ir/trunk/Application.cfc:155) at cfApplication2ecfc498167235$funcINIT.runFunction(C:/inetpub/wwwroot/projectDir/trunk/Appl ication.cfc:52) at cfApplication2ecfc498167235._factor5(C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: 45) at cfApplication2ecfc498167235.runPage(C:/inetpub/wwwroot/projectDir/trunk/Application.cfc:1 )
    coldfusion.runtime.CustomException: The current user is not authorized to invoke this method. at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2799) at cfaccessmanager2ecfc974154242$funcCHECKADMINROLES.runFunction(E:\cf10_final\cfusion\wwwroot\CFIDE\adminapi\accessmanager.cfc:48) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432) at cfdatasource2ecfc1679861966$funcGETDATASOURCES.runFunction(E:\cf10_final\cfusion\wwwroot\CFIDE\adminapi\datasource.cfc:52) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432) at cfApplication2ecfc498167235$funcPREREQUISITESTART.runFunction(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:155) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2659) at cfApplication2ecfc498167235$funcINIT.runFunction(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:52) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2659) at cfApplication2ecfc498167235._factor5(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:45) at cfApplication2ecfc498167235.runPage(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:538) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:234) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:159) at coldfusion.runtime.TemplateProxyFactory.resolveFile(TemplateProxyFactory.java:120) at coldfusion.cfc.CFCProxy.<init>(CFCProxy.java:138) at coldfusion.cfc.CFCProxy.<init>(CFCProxy.java:84) at coldfusion.runtime.AppEventInvoker.<init>(AppEventInvoker.java:64) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:232) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:219) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:204) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298) 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:662)
    And here is the listed exceptions, beneath the stack trace;
    13:09:56.056 - cfadminapiSecurityError Exception - in E:/cf10_final/cfusion/wwwroot/CFIDE/adminapi/accessmanager.cfc : line 48
             The current user is not authorized to invoke this method.
    13:09:56.056 - cfadminapiSecurityError Exception - in E:/cf10_final/cfusion/wwwroot/CFIDE/adminapi/accessmanager.cfc : line 48
             The current user is not authorized to invoke this method.
    13:09:56.056 - java.io.FileNotFoundException - in C:/ColdFusion10/cfusion/wwwroot/WEB-INF/exception/errorcontext.cfm : line 44
             E:/cf10_final/cfusion/wwwroot/CFIDE/adminapi/accessmanager.cfc (The system cannot find the path specified)
    This perspn seems to be having the same issue;
    http://forums.adobe.com/message/5051892
    and I agree I don't have "E" drive either!

    I've found a solution to my plight - I don't know if it'll work for you or help you try something that MAY fix it.
    I use a common code set which includes the Application.cfc from a CF Mapping - So, in the application.cfc in the actual website I do this:-
    <cfinclude template="/UberDirectory/Application.cfc">
    Then, in the /UberDirectory/Application.cfc, I was initialising a CFC which checks if the datasource was created for the website. The datasource checking code attempts to log into the Admin API and check & create if necessary the datasource.
    This has previously worked without fail for me - But in this instance it failed!! I was doing two things wrong - Firstly, the CFC should only be called in the Application.cfc in the onRequestStart section as the Application had to be initialised first - This is maybe because I've invoked the application.cfc in a "non-standard" manner.
    Secondly, once I'd moved the CFC invocation into oNRequestStart I saw the following error:-
    The string COOKIE.CFAUTHORIZATION_uber-directory is not a valid ColdFusion variable name.
    I had this as the app name .... <cfset this.name = 'uber-directory'>
    Changedthe dash to an underscore and I was away and could once again check the datasources
    Hope it helps
    Martin

  • Multithread remote method invocation problem

    Hello all
    I have simple method that is entry point of CORBA remote invocation method
    Inside it I have some kind of Logic I need to perform the this logic is inside method and I like
    That each method that performs logic will be executed in its own thread ( from thread pool )
    this method also returns parameters by reference back to the server .
    here is example:
    public boolean RemothMethod(Object obj1,Object obj2){
         //this is where I allocate thread from thread pool to invoke the logic method
         ThreadPool.getTask(LogicMethod(Object obj1,Object obj2));
    }But the problem I have here that I can get several "RemothMethod" calls
    And the returned Parameters can be from the wrong thread call .
    My question is how can I force the right thread to return the right parameters to the "RemothMethod" call

    I have simple method that is entry point of CORBA
    remote invocation method
    Inside it I have some kind of Logic I need to perform
    the this logic is inside method and I like
    That each method that performs logic will be executed
    in its own thread ( from thread pool )Why? Each remote method is already being executed in its own thread.
    //this is where I allocate thread from thread pool
    l to invoke the logic method
    ThreadPool.getTask(LogicMethod(Object obj1,Object obj2));What are these APIs?
    But the problem I have here that I can get several
    "RemothMethod" calls
    And the returned Parameters can be from the wrong
    thread call . Something wrong with the ThreadPool API you seem to have written.
    My question is how can I force the right thread to
    return the right parameters to the "RemothMethod" callGet rid of it and execute whatever you need to execute directly in the remote method body. There is no advantage to what you're trying to do. You already have a thread per concurrent client executing the remote method; you're trying to stall those threads and create yet more threads from an evidently non-working ThreadPool. This seems quite pointless.

  • AccessControl Exception when invoking remote ejb from portlet class

    Hi,
    From Portlet class, I am invoking Remote EJB which is deployed in weblogic application server.
    After EJB call it not requst Dispathcer not allowed to include the request ..
    Exception as follows ..
    java.security.AccessControlException: access denied (java.security.SecurityPermission getHttpRequestBase)
    X      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    X      at java.security.AccessController.checkPermission(AccessController.java:427)
    X      at org.apache.catalina.connector.HttpRequestFacade.getHttpRequestBase(HttpRequestFacade.java:257)
    X      at org.apache.catalina.core.ApplicationDispatcher.getRequestBase(ApplicationDispatcher.java:1115)
    X      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:759)
    X      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:628)
    X      at org.apache.catalina.core.ApplicationDispatcher.access$100(ApplicationDispatcher.java:123)
    X      at org.apache.catalina.core.ApplicationDispatcher$PrivilegedInclude.run(ApplicationDispatcher.java:154)
    X      at java.security.AccessController.doPrivileged(Native Method)
    X      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:528)
    X      at com.sun.portal.portlet.impl.RequestDispatcherImpl.include(RequestDispatcherImpl.java:95)
    X      at com.gm.gc.sample.SamplePortlet.doView(Unknown Source)
    X      at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
    X      at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
    X      at com.sun.portal.portletappengine.PortletAppEngineServlet.service(PortletAppEngineServlet.java:271)
    X      at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    X      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:772)
    X      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:628)
    X      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:539)
    X      at com.sun.portal.container.portlet.impl.PortletContainer.invokePAE(PortletContainer.java:409)
    X      at com.sun.portal.container.portlet.impl.PortletContainer.getMarkup(PortletContainer.java:180)
    X      at com.sun.portal.providers.window.WindowProvider.getPortletContent(WindowProvider.java:386)
    X      at com.sun.portal.providers.window.WindowProvider.getContentInternal(WindowProvider.java:239)
    X      at com.sun.portal.providers.window.WindowProvider.getContent(WindowProvider.java:204)
    X      at com.sun.portal.desktop.context.ReusableProviderCaller.run(ReusableProviderCaller.java:160)
    Source Code
    ===========
    SamplePortlet Class
    protected void doView(RenderRequest request, RenderResponse response)
                   throws PortletException, IOException {
              PortletRequestDispatcher prDispatcher = null;
              String helloString=null;
              SamplePortletHandler spHandler=null;
              response.setContentType(request.getResponseContentType());
              try {
                   spHandler=new SamplePortletHandler();               
                   prDispatcher = pContext.getRequestDispatcher("/jsp/SampleView.jsp");                         
                   helloString=spHandler.getHelloString();
                   prDispatcher.include(request, response);
              } catch (Exception e) {
                   e.printStackTrace();
                   request.setAttribute("ERROR_MSG", e.getMessage());
                   prDispatcher = pContext.getRequestDispatcher("/jsp/Error.jsp");
                   prDispatcher.include(request, response);
    Handler Class
    is there any solution?
    Thanks in Advance ...

    Hi,
    I didn't configure the JNDI stuff in WLS per se. I created a simple session bean and the meta data in the jar of this determined the JNDI setup.
    Once this is deployed on either WLS it can then be seen in Weblogic Console by clicking on View JNDI Tree. The full JNDI name is present and correct on both WLS to which it is deployed.
    Does that answer your questions or are you asking how I configured the SOA Suite composite? In which case I selected the EJB in the Partner Link swimlane. Viewed the properties and added
    java.naming.provider.url
    t3://myremotehost:7001

  • Can i invoke a method of a different class?

    I want to tell my method that if a certain event occurs, to invoke a method thats located in a different class but in the same package. But neither inherit each other.
    I also want the original method to pass parameters to the remote method so it can perform actions on them.
    Is this possible somehow, or am I barking up the wrong tree?
    I've included an example to illustate.
    edu.example;
    public class one extends bank{
    protected void count (){
    If i>100{
    spend(5); // method thats in the two class
    else break;
    edu.example;
    public class two extends bank{
    protected void spend (int x){
    i = i - x;

    either the method you want to invoke will have to be static, or you will need an instance of the class that contains the method you want to invoke.
    If your not in school, its probably best you buy a Java book. It will speed things along considerably.
    I have always bought books by Ivor Horton. "Beginning Java" is a good one. Wrox publisher I think. Once you pass that book you will not need any other books unless you go deep into a particular subject such as encryption.

  • Remote method HELP!

    Hi,
    I'm obviously missing some basic concept on how to handle
    response and return values from remote methods...
    Lets say i'm using the following on the server:
    Client.prototype.GetNumOfMessages = function(uid)
    _NumOfMessages = _ws.GetNumOfMessages(uid);
    _NumOfMessages.onResult = function(res)
    // HERE IS MY PROBLEM. How can I return the "res" value to
    the client function that invoked?
    The _ws.GetNumOfMessages(uid); is a call to a webservice,
    which works fine. If I trace the "res" I get the correct value.
    So, how can I return this value?
    The client code is:
    nc.some_function = function()
    nc.call("GetNumOfMessages",new retVal(),objUser.uid);
    function retVal()
    this.onResult(res)
    trace(res); // I Get "undefined" here...
    Please advise,
    Thanks in advance,
    Guy

    Properties properties = new Properties();
    properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "your factory");
         properties.setProperty(Context.PROVIDER_URL, "your server url");
         properties.setProperty(Context.SECURITY_PRINCIPAL, "morad");
         properties.setProperty(Context.SECURITY_CREDENTIALS, "morad");
    Context ctx = new InitialContext(properties);
    Object objref = ctx.lookup("the name of your bean);
    yourbean = (yourbean) PortableRemoteObject.narrow(objref,serviceClass);
    Also make sure you include your credentials in the deploy.properties file in your deploy directory.

  • AbstractMethodError calling remote method

    Java student and rank RMI newbie here; please go easy on me. My subinterface, remote class, and client app all compile fine, but when I run the client app I get an error:
    Exception in thread "main" java.lang.AbstractMethodError: DatabaseUpdater_Stub.i
    nitCourseList()Lcom/sun/rowset/CachedRowSetImpl;
            at EnrollPanel.<init>(Enroll3.java:99)
            at Enroll3.main(Enroll3.java:25)Here is my subinterface:
    import com.sun.rowset.CachedRowSetImpl;
    import java.rmi.*;
    import java.sql.*;
    import javax.sql.*;
    public interface DbUpdaterInterface extends Remote
         public abstract CachedRowSetImpl initCourseList() throws RemoteException, SQLException;
         public abstract CachedRowSetImpl initStudentList() throws RemoteException, SQLException;
         public abstract CachedRowSetImpl initEnrollmentList() throws RemoteException, SQLException;
         public abstract void addNewCourseInDb() throws RemoteException;
         public abstract void addStudentToCourseInDb() throws RemoteException;
         public abstract void addNewStudentInDb() throws RemoteException;
         public abstract void enrollStudentInCourseInDb() throws RemoteException;
    }and the remote class that implements the interface:
    import com.sun.rowset.CachedRowSetImpl;
    import java.net.*;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.sql.*;
    import javax.sql.*;
    public class DatabaseUpdater extends UnicastRemoteObject implements DbUpdaterInterface
         Connection dbConnection;
         public DatabaseUpdater(Connection dbConnection) throws RemoteException
              this.dbConnection = dbConnection;
         public CachedRowSetImpl initCourseList() throws RemoteException, SQLException
              CachedRowSetImpl rset = new CachedRowSetImpl();
              Statement courseStatement = dbConnection.createStatement();
              String courseQuery = "SELECT CourseID, MaxEnrollment, CurrentEnrollment FROM Courses";
              ResultSet courseResults = courseStatement.executeQuery(courseQuery);
              rset.populate(courseResults);
              courseStatement.close();
              return rset;
    // ... some more methods ...
         public static void main(String []args)
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection dbConnection = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=project3.mdb");
                   DatabaseUpdater x = new DatabaseUpdater(dbConnection);   // a remote object
                   Naming.rebind("DatabaseUpdater", x);   // the remote object is named as "DatabaseUpdater"
                   System.out.println("Database updater is running....");
              catch (Exception e)
                   System.err.println(e);
    }In my client app, here is the problem code, with the last line being the one that throws the error:
                   // invoke remote DatabaseUpdater object
                   DbUpdaterInterface dbUpdater = (DbUpdaterInterface) Naming.lookup("DatabaseUpdater");
                   // call remote object to get result set of all courses, students, enrollments
                   CachedRowSetImpl courseResults = dbUpdater.initCourseList();Any ideas? AbstractMethodError refers to trying to call an abstract method, but I have my subinterface's initCourseList() method implemented in my remote class just fine. I'd greatly appreciate some help!

    Oops, my mistake. I had made changes since last running rmic on my remote class. Nothing to see here, move along!

  • NullPointerException while calling a Remote Method

    I have got the following exception wh�le calling a remote method,
    do you have any idea?
    java.lang.NullPointerException
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
         at distributedchess.server.ChessGameImpl_Stub.applyAction(ChessGameImpl_Stub.java:53)

    Looks to me like your server has a bug in a remote method.

  • Hashtables and remote methods

    If
    public Hashtable remoteMethod (MyClass lattice [][], int x, double y, ...) How do I assure a proper call to and return from the former remote method ? I believe that "Hashtable"s are Serializable. Do I have to make "MyClass" extend/implement the Serializable interface to accomplish a sucessful call and return ?

    Now I know why the method failed to get invoked !
    Not only does "MyClass" have to implement the Serializable interface, but all its dependent classes have to implement the interface as well .

Maybe you are looking for

  • How do I get an iPhone contact to appear in iCloud?

    I have a contact that shows up on my iPhone, but not in my iCloud (viewed from a MacBook).  How do I get the contact to appear in in both? iPhone version 7.1.1 MacBook OS X version 10.9.4

  • Oracle VM 3.1.1 server install hangs

    OVM 3.1.1 64 bit i7 cpu Hi, I'm trying to instal OVM on n server. But it hangs at different stages. I have searched the web and came across guys that had similar issues and and went ovm 2.2 and passing kernel parameters before the install. http://som

  • Hibernate child object creation problem

    hi, i have two java classes named "user" and "writer" writer is subclass of user. with hibernate mapping files , i 'm mapping objects with table-per-subclass strategy... here is my mapping code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibern

  • SCOM 2012 SP1 Update Rollups

    Hi All, I am planning to deploy patches on SCOM server. We are on SCOM 2012 SP1 as of now. As you know Microsoft has been released UR1, UR2, UR3, UR4, UR5 and UR6 for SCOM 2012 SP1. Do I need to deploy each UR one by one on SCOM server or UR6 will ha

  • Beginning OS X development: How to?

    Hello community, I´d really like to start developping for OS X and I was wondering if you´ve got soe tips for me. Sincerely, Panagiotis B.