Java Code Examples for java.rmi.RemoteException.printStackTrace()

The following are Jave code examples for showing how to use printStackTrace() of the java.rmi.RemoteException class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: MaximoForgeViewerPlugin   File: ModelLink.java   View Source Code Vote up 6 votes
@Override
  public void add() 
throws RemoteException, 
       MXException
  {
  	super.add();
MboRemote owner = getOwner();
if( owner != null && owner instanceof ModelRemote )
{
	try
          {
           setValue( FIELD_PARENTMODELID, owner.getString( Model.FIELD_BIMLMVMODELID ) );
           setValue( FIELD_BUCKETKEYFULL, owner.getString( Model.FIELD_BUCKETKEYFULL ) );
           setValue( FIELD_ORGID, owner.getString( Model.FIELD_ORGID ) );
           setValue( FIELD_SITEID, owner.getString( Model.FIELD_SITEID ) );
          }
          catch( RemoteException e )
          {
           e.printStackTrace();
          }
}
  }
 
Example 2
Project: jdk8u-jdk   File: FilterUSRTest.java   View Source Code Vote up 6 votes
@Test(dataProvider = "bindData")
public void UnicastServerRef(String name, Object obj, int expectedFilterCount) throws RemoteException {
    try {
        RemoteImpl impl = RemoteImpl.create();
        UnicastServerRef ref = new UnicastServerRef(new LiveRef(0), impl.checker);

        Echo client = (Echo) ref.exportObject(impl, null, false);

        int count = client.filterCount(obj);
        System.out.printf("count: %d, obj: %s%n", count, obj);
        Assert.assertEquals(count, expectedFilterCount, "wrong number of filter calls");
    } catch (RemoteException rex) {
        if (expectedFilterCount == -1 &&
                UnmarshalException.class.equals(rex.getCause().getClass()) &&
                InvalidClassException.class.equals(rex.getCause().getCause().getClass())) {
            return; // normal expected exception
        }
        rex.printStackTrace();
        Assert.fail("unexpected remote exception", rex);
    } catch (Exception ex) {
        Assert.fail("unexpected exception", ex);
    }
}
 
Example 3
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canUpdateElement(long elementId, long attributeId) {
    try {
        return deligate.canUpdateElement(elementId, attributeId);
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 4
Project: MaximoForgeViewerPlugin   File: ModelUploadLogger.java   View Source Code Vote up 5 votes
@Override
protected String getStartMsg()
{
	try
       {
		return _logSet.getMessage( Messages.BUNDLE_MSG, Messages.MSG_UPLOADING_MODEL );
       }
       catch( RemoteException e )
       {
       	e.printStackTrace();
		return "Uploading model file";
       }
}
 
Example 5
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canUpdateAttribute(long qualifierId, long attributeId) {
    try {
        return deligate.canUpdateAttribute(qualifierId, attributeId);
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 6
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canUpdateQualifier(long qualifierId) {
    try {
        return deligate.canUpdateQualifier(qualifierId);
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 7
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canCreateStript() {
    try {
        return deligate.canCreateScript();
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 8
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canUpdateStream(String path) {
    try {
        return deligate.canUpdateStream(path);
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 9
Project: ramus   File: TcpClientEngine.java   View Source Code Vote up 5 votes
@Override
public byte[] getStream(String path) {
    try {
        return (byte[]) invocker.invoke(new CallParameters("getStream",
                new Object[]{path})).result;
    } catch (RemoteException e) {
        e.printStackTrace();
        remoteException(e);
    }
    return null;
}
 
Example 10
Project: ramus   File: TcpClientEngine.java   View Source Code Vote up 5 votes
@Override
public void setStream(String path, byte[] bytes) {
    try {
        invocker.invoke(new CallParameters("setStream", new Object[]{
                path, bytes}));
    } catch (RemoteException e) {
        e.printStackTrace();
        remoteException(e);
    }
}
 
Example 11
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canCreateAttribute() {
    try {
        return deligate.canCreateAttribute();
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 12
Project: openNaEF   File: GetDtoChanegs.java   View Source Code Vote up 5 votes
@Override
public DtoChanges execute(Long time, TransactionId.W version) {
    try {
        return DtoChangesUtil.getDtoChanges(time, version);
    } catch (RemoteException e) {
        e.printStackTrace();
    }
    throw new IllegalStateException();
}
 
Example 13
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canCreateQualifier() {
    try {
        return deligate.canCreateQualifier();
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 14
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canDeleteAttribute(long attributeId) {
    try {
        return deligate.canDeleteAttribute(attributeId);
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 15
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canDeleteElements(long[] elementIds) {
    try {
        return deligate.canDeleteElements(elementIds);
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 16
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canDeleteQualifier(long qualifierId) {
    try {
        return deligate.canDeleteQualifier(qualifierId);
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 17
Project: openNaEF   File: Webhooks.java   View Source Code Vote up 5 votes
private Webhooks() {
    EntityManagerFactory factory = Persistence.createEntityManagerFactory("db");
    _em = factory.createEntityManager();
    HOOK_ALL = _em.createNamedQuery("hook.all", Hook.class);
    Logs.hook.info("db connected.");

    try {
        NaefSubscriber.instance().addListener(new Listener());
        Logs.common.info("CommitNotifier installed.");
    } catch (RemoteException e) {
        e.printStackTrace();
    }
}
 
Example 18
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canReadElement(long elementId, long attributeId) {
    try {
        return deligate.canReadElement(elementId, attributeId);
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 19
Project: ramus   File: RMIClientAccessRules.java   View Source Code Vote up 5 votes
@Override
public boolean canUpdateAttribute(long attribueId) {
    try {
        return deligate.canUpdateAttribute(attribueId);
    } catch (RemoteException e) {
        remoteException(e);
        e.printStackTrace();
        throw new ClientException(e);
    }
}
 
Example 20
Project: openjdk-jdk10   File: MapNullValuesTest.java   View Source Code Vote up 4 votes
public static void main(String[] args) throws Exception {

        int errorCount = 0;

        MapNullValuesTest test = new MapNullValuesTest();

        // Create an RMI registry
        //
        echo("");
        echo(dashedMessage("Start RMI registry"));
        Registry reg = null;
        port = 7500;
        while (port++ < 7550) {
            try {
                reg = LocateRegistry.createRegistry(port);
                echo("\nRMI registry running on port " + port);
                break;
            } catch (RemoteException e) {
                // Failed to create RMI registry...
                //
                echo("\nFailed to create RMI registry on port " + port);
                e.printStackTrace(System.out);
            }
        }
        if (reg == null) {
            System.exit(1);
        }

        // Run tests
        //
        errorCount += test.mapToHashtableTests();
        errorCount += test.jmxConnectorServerFactoryTests();
        errorCount += test.jmxConnectorFactoryTests();
        errorCount += test.nullKeyFactoryTests();

        if (errorCount == 0) {
            echo("\nNull values for key/value pairs in Map Tests PASSED!");
        } else {
            echo("\nNull values for key/value pairs in Map Tests FAILED!");
            System.exit(1);
        }
    }