How to access data in the remote system
Hi everybody,
I have developed four classes.
FileInterface.java:-
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface FileInterface extends Remote {
public byte[] downloadFile(String fileName) throws
RemoteException;
FileServer.java:-
import java.io.*;
import java.rmi.*;
public class FileServer {
public static void main(String argv[]) {
if(System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
try {
FileInterface fi = new FileImpl("FileServer");
Naming.rebind("//10.161.15.219/FileServer", fi);
} catch(Exception e) {
System.out.println("FileServer: "+e.getMessage());
e.printStackTrace();
FileImpl.java:-
import java.io.*;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class FileImpl extends UnicastRemoteObject
implements FileInterface {
private String name;
public FileImpl(String s) throws RemoteException{
super();
name = s;
public byte[] downloadFile(String fileName){
try {
File file = new File(fileName);
byte buffer[] = new byte[(int)file.length()];
BufferedInputStream input = new
BufferedInputStream(new FileInputStream(fileName));
input.read(buffer,0,buffer.length);
input.close();
return(buffer);
} catch(Exception e){
System.out.println("FileImpl: "+e.getMessage());
e.printStackTrace();
return(null);
FileClient.java:-
import java.io.*;
import java.rmi.*;
public class FileClient{
public static void main(String argv[]) {
if(argv.length != 2) {
System.out.println("Usage: java FileClient fileName machineName");
System.exit(0);
try {
String name = "//" + argv[1] + "/FileServer";
FileInterface fi = (FileInterface) Naming.lookup(name);
byte[] filedata = fi.downloadFile(argv[0]);
File file = new File(argv[0]);
BufferedOutputStream output = new
BufferedOutputStream(new FileOutputStream(file.getName()));
output.write(filedata,0,filedata.length);
output.flush();
output.close();
} catch(Exception e) {
System.err.println("FileServer exception: "+ e.getMessage());
e.printStackTrace();
After that when i compile classes when i give the command as
rmic FileImpl
in command prompt error is coming like this.
error: Class FileImpl not found.
1 error
Can anyone help me please,urgent.
It is generating stub and skeleton classes but when iam running FileClient after starting rmiregistry,it is coming something like
FileServer exception: FileServer
java.rmi.NotBoundException: FileServer
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:375)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
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:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
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:343)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at FileClient.main(FileClient.java:9)
Can u help me
Similar Messages
-
How to get data in the remote system from local system.
Hi everybody,
I have developed four classes.
FileInterface.java:-
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface FileInterface extends Remote {
public byte[] downloadFile(String fileName) throws
RemoteException;
FileServer.java:-
import java.io.*;
import java.rmi.*;
public class FileServer {
public static void main(String argv[]) {
if(System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
try {
FileInterface fi = new FileImpl("FileServer");
Naming.rebind("//10.161.15.219/FileServer", fi);
} catch(Exception e) {
System.out.println("FileServer: "+e.getMessage());
e.printStackTrace();
FileImpl.java:-
import java.io.*;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class FileImpl extends UnicastRemoteObject
implements FileInterface {
private String name;
public FileImpl(String s) throws RemoteException{
super();
name = s;
public byte[] downloadFile(String fileName){
try {
File file = new File(fileName);
byte buffer[] = new byte[(int)file.length()];
BufferedInputStream input = new
BufferedInputStream(new FileInputStream(fileName));
input.read(buffer,0,buffer.length);
input.close();
return(buffer);
} catch(Exception e){
System.out.println("FileImpl: "+e.getMessage());
e.printStackTrace();
return(null);
FileClient.java:-
import java.io.*;
import java.rmi.*;
public class FileClient{
public static void main(String argv[]) {
if(argv.length != 2) {
System.out.println("Usage: java FileClient fileName machineName");
System.exit(0);
try {
String name = "//" + argv[1] + "/FileServer";
FileInterface fi = (FileInterface) Naming.lookup(name);
byte[] filedata = fi.downloadFile(argv[0]);
File file = new File(argv[0]);
BufferedOutputStream output = new
BufferedOutputStream(new FileOutputStream(file.getName()));
output.write(filedata,0,filedata.length);
output.flush();
output.close();
} catch(Exception e) {
System.err.println("FileServer exception: "+ e.getMessage());
e.printStackTrace();
After that when i compile classes when i give the command as
rmic FileImpl
in command prompt error is coming like this.
error: Class FileImpl not found.
*1 error*
Can anyone help me please,urgent.It is generating stub and skeleton classes but when iam running FileClient after starting rmiregistry,it is coming something like
FileServer exception: FileServer
java.rmi.NotBoundException: FileServer
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:375)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
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:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
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:343)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at FileClient.main(FileClient.java:9)
Can u help me -
How to extract data from a remote system
Hi,
I want to extract data from another system and map it with a target table in my local machine. what is the procedure to do that?
I tried to create another module specifying location of that remote system I could extract the table but when I am mapping with the target table I am getting this error
ORA-04052: error occurred when looking up remote object [email protected]@ORACLE_LOCATION_UBN_15
ORA-00604: error occurred at recursive SQL level 1
ORA-01017: invalid username/password; logon denied
ORA-02063: preceding line from UBNDW@ORACLE_LOCATION_UBN_15
here ORACLE_LOCATION_UBN_15 is the location and UBNDW is the SID for that system
SCOTT is the username I have provided while creating the module
Please help me out with this..
ThanksHi Roberto,
thank you for the fast answer. I have read this before but i don't understand the needed steps on the Oracle-System.
Hope anyone can help me...
Thanks
Muammer
Message was edited by:
Muammer Kizilaslan -
How to create a jar file which is in the remote system?
Hi,
I have a set of files that resides in a remote system,which have to be "jar"red. I have a firewall in between. I want to create a jar file out of the files situated in the remote system.How do i go about this process.?Hi,
You can't do that in a simple way. You need to have a port open in the firewall, and you need to have a server process on the remote machine.
Kaj -
I just got my iPhone 4 finger tip (CDMA) How do I know if the operating system is up to date?
Check Settings > General > About. Latest version for the CDMA phone is 4.2.10
Stedman -
How to know last access date for the schema's
Dear all,
could u plz tell me How to know last access date for the schema’s
Regards,
Srinivasa rao.PSrinivas,
could u plz tell me How to know last access date for the schema’s
In Oracle, we don't access schemas but schema objects.And this informationis not kept anywhere persistantly.As Amit also mentioned,if you do need it,you have to enable Auditing.
Aman.... -
i am tryin to access old macbookpro harddisk on macbook air,when i connect it via usb i see the folders,but i dont see any files e.g. my saved photos,movies,docs are not there,its shows that 220gb is used,but no data is visible...all folder are empty.......can someone pls adv how to access data?
i am tryin to access old macbookpro harddisk on macbook air,when i connect it via usb i see the folders,but i dont see any files e.g. my saved photos,movies,docs are not there,its shows that 220gb is used,but no data is visible...all folder are empty.......can someone pls adv how to access data?
-
How do I fix my macbook pro from displaying the wrong dates across the entire system?
Hello, for a while now my MacBook Pro has started to display the dates across the whole system weidly. The dates can go above 300/MM/YYYY. Is it the PRAM battery that could have run out or is it something else? Here is an example that I took today in the Calander application. As you can see it displays the 17 May, 2013 as 137 May 2013.
If there is a solution for this i would really want to know because this is starting to anoy me a little.
Here is an other example from skype
Edit: Ironicaly I found the solution right after posting this, no help is needed any more. Everything is fixed nowHave you looked at System Preferences>Date & Time?
Ciao. -
Accessing data from other SAP system
Hi experts
I need to access data from one SAP system from other. My requirement is , perform applications (programs) in some SAP system, but using/accessing data from other SAP system .
For example, when we press F4 we get the match code (search help) for the field ; that window is alredy created by SAP and it shows the data for that field . Of course the application (ike any other program/application) read the data from the SAP system is being executing ; well i need execute that match code but show (taking) the data from other SAP system; i not refer to other MANDT in same system but other SAP system.
The communication between SAP1 system and SAP2 system is already created from BASIS.
My doubt is how can i execute that standard application (search help) but 'invoke' to standard application this take data from other system ?
I guess i can create Z search help wich call a Z Function (RFC) to get the data required from the other system ;
or maybe enhance the standar search help to call that Z RFC ; but standard application search help is already created and this access the data in several ways or places of code , and this has severals sub-windows and search features ; and i just need execute exactly same search help but accesing data from the other SAP system ; so my doubt is, is there some way to indicate to SAP the applications always (wherever) these applications acces the data do it but from other SAP system,
like if we 'redirect' the Data Base to other SAP system.
SAP1 applications are being executing -
> but all data (records) are taking from SAP2
Maybe the first suggestion is simply why do not we execute applications in SAP2 instead SAP1 , that's because the version package in SAP2 system (where we have the data) does not support some (non SAP) applications we need to use.
Excuse the long thread. Does somebody can help, any idea ?
Best Regards
FrankHi Frank,
Below are my thoughts, these are only conceptual and haven't had an opportunity to try these possibilities, also not sure if this is the right thing.
1) Create an entry in DBCON using TCode: DBCO for the Database of system SAP2. Now in the application of SAP1 use the "SET CONNECTION" construct as the very first statement, so that consecutive SQL statements will point at the DB of SAP2.
2) I have read somewhere that the Work Processes are connected to the Default database and i am not sure if you can change this setting, but if you can and provided you have have multiple application servers in your SAP1 landscape, then pick one of the application servers and change the settings on the WP to point at the DB of SAP2, you have the end users login to this particualr app server.
3) If there are multiple app servers in SAP1 landscape, then choose one of the app servers and change the default database setting to point at DB of SAP2.
Regards,
Chen -
Error 1256 The remote system is not avilable - REPL summary
Hi all
For the past 3 days I am getting the below error while checking the AD replication. our present setup is
RDC and ADC was available in the same site. and DR ADC was configured in remote site. we have P2P link connectivity for OUR AD and Exchange 2010 DAG Replication. Kindly help me to solve this issue.
C:\>repadmin /replsummary
Replication Summary Start Time: 2015-01-05 18:39:15
Beginning data collection for replication summary, this may take awhile:
Source DSA largest delta fails/total %% error
DRADC 02m:39s 0 / 5 0
RDC 02d.02h:03m:27s 5 / 10 50 (1256) The remote system is
not available. For information about network troubleshooting, see Windows Help.
ADC 17m:39s 0 / 10 0
Destination DSA largest delta fails/total %% error
DRADC 02d.02h:03m:18s 5 / 10 50 (1256) The remote system is
not available. For information about network troubleshooting, see Windows Help.
RDC 17m:31s 0 / 10 0
ADC 04m:49s 0 / 5 0
C:\>repadmin /showrepl
Repadmin: running command /showrepl against full DC localhost
Default-First-Site-Name\ADC
DSA Options: IS_GC
Site Options: (none)
DSA object GUID: 5ddb9663-7c5b-4f2e-97b9-82a29e2c5955
DSA invocationID: 8d939f8e-fe0a-4bce-b260-e546e41e86d4
==== INBOUND NEIGHBORS ======================================
DC=ifmr,DC=co,DC=in
Default-First-Site-Name\RDC via RPC
DSA object GUID: 4988b352-e60b-4425-aac2-dd903d85eb2a
Last attempt @ 2015-01-05 18:34:30 was successful.
CN=Configuration,DC=ifmr,DC=co,DC=in
Default-First-Site-Name\RDC via RPC
DSA object GUID: 4988b352-e60b-4425-aac2-dd903d85eb2a
Last attempt @ 2015-01-05 18:39:22 was successful.
CN=Schema,CN=Configuration,DC=ifmr,DC=co,DC=in
Default-First-Site-Name\RDC via RPC
DSA object GUID: 4988b352-e60b-4425-aac2-dd903d85eb2a
Last attempt @ 2015-01-05 18:34:26 was successful.
DC=DomainDnsZones,DC=ifmr,DC=co,DC=in
Default-First-Site-Name\RDC via RPC
DSA object GUID: 4988b352-e60b-4425-aac2-dd903d85eb2a
Last attempt @ 2015-01-05 18:54:39 was successful.
DC=ForestDnsZones,DC=ifmr,DC=co,DC=in
Default-First-Site-Name\RDC via RPC
DSA object GUID: 4988b352-e60b-4425-aac2-dd903d85eb2a
Last attempt @ 2015-01-05 18:40:04 was successful.
DsReplicaGetInfo() failed with status 8453 (0x2105):
Replication access was denied.
DsReplicaGetInfo() failed with status 8453 (0x2105):
Replication access was denied.
JagsAs an addition to what Frank shared, I would recommend that you read that too:
Active Directory Replication Issues – Basic Troubleshooting Steps (Single AD Domain in a Single AD Forest): http://social.technet.microsoft.com/wiki/contents/articles/18513.active-directory-replication-issues-basic-troubleshooting-steps-single-ad-domain-in-a-single-ad-forest.aspx
This posting is provided AS IS with no warranties or guarantees , and confers no rights.
Ahmed MALEK
My Website Link
My Linkedin Profile
My MVP Profile -
ORA-28150 when accessing data from a remote database
Portal Version: Portal 3.0.9.8.0
RDBMS Version: 8.1.6.3.0
OS/Vers. Where Portal is Installed:: Solaris 2.6
Error Number(s):: ORA-28150
I have a problem with using a database link to access a table in
a remote database. So long as the dblink uses explicit logins
then everything works correctly. When the dblink does not have a
username then I get the ORA-28150 message. The database link is
always public. A synonym is created locally that points to a
synonym in the remote database. I am using the same Oracle user
in both databases. The Oracle portal lightweight user has this
same Oracle user as its default schema. The contents of the
remote table are always visible to sqlplus, both when the link
has a username and when it doesn't have a username.
All the databases involved are on the same version of Oracle.
I'm not sure which Oracle login is being used to access the
remote database, if my lightweight user has a database schema
of 'xyz' then does portal use 'xyz' to access the remote
database? I would be very grateful for any help or pointers that
might help to solve this problem.
James
To further clarify this, both my local and remote databases
schemas are owned by the same login.
The remote table has a public synonym.
The link is public but uses default rather than explicit logins.
The local table has a public synonym that points to the remote
synonym via the database link.
If I change the link to have an explicit login then everything
works correctly.
I can view the data in the remote database with TOAD and with
sqlplus even when the database link has default login rather
than explicit login.
This seems to point to Portal as being the culprit. Can anyone
tell me whether default logins can be used across database links
with portal?
TIA
James832019 wrote:
One way to do this is by creating a database link and joining the two tables directly. But this option is ruled out. So please suggest me some way of doing this.Thus you MUST use two connection strings.
Thus you are going to be either constructing some intricate SQL dynamically or you are going to be dragging a lot of data over the wire and doing an in memory search.
Although realistically that is what the database link table would have done as well.
Might be better to look at moving the table data from one database to the other. Depends on size of course. -
Error while extracting data from a remote system
Hi,
I am facing problem while extracting data from a remote system. The connection is alright I can extract the table required from the remote system,but when I deploy it I get this error
ORA-04052: error occurred when looking up remote object [email protected]@ORACLE_UBN_15_LOCATION1
ORA-00604: error occurred at recursive SQL level 1
ORA-28000: the account is locked
ORA-02063: preceding line from UBNDW@ORACLE_UBN_15_LOCATION1
here Scott.demo1 is the table and UBNDW is the sid of the remote system and ORACLE_UBN_15_LOCATION1 is the location. Please help me out with this
ThanksHi,
IDOC's need to be processed manually either in OLTp or in BW depending on the failure. Error msg in monitor status will take u to either BW or OLTP whernever there is a prob. Process IDOC's , this will start the left over packets and will finish the load.
we hav to check IDOC in WE05(t-code) and know the status these are WE51,WE52,WE53 AND GOTO WE19 there we hav to execute the exist Idoc will succesfully loaded Idoc
Goto St22 see the short dump error msg..
post if there any inf..
Thanks,
Shreya -
How do we determine if the BW system is running slow?
Dear BWers,
How do we determine if the BW system is running slow? I have a situation where it is taking about 1 hr 30 min to load 700,000 records from the application server with direct mapping and no major transformations. How do i conclude if my BW system is running slow? Is there any documentation on this or benchmarks to analyze this? All and any help is appreciated.
Thanks
RajThe time taken to load depends on a few factors like the following:
1. network bandwidth
2. system memory on the application server.
3. available processes in the application server to start the job
Make sure to load the master data, activate them and also apply change run before you load the transaction data. If you have secondary indexes, make sure you delete them before laoding data. I will suggest to have sequential load and put all the processes in a process chain. Where ever you can, try to split the package size. But in your case, the no of records is not that much and so you should be fine with one info package.
Ravi Thothadri -
How to access Data Guard option in Oracle 10g OEM
Hi All,
I have Oracle 10g ENTERPRISE EDITION on Unix envoirement. I want to setup logical standby Database through Data Guard technology. But when I brows through OEM I do not find Link for DATA GUARD????
1) How to access Data Guard option from oracle 10g OEM.
2) Does It come with Enterprise Edition OR I have to install it separately.
Regards,
DarshanI am managing almost everything through EM Grid Control. It is easy to setup and configure.
Anyways, if you have read the documentation on
Oracle® Data Guard Concepts and Administration and setup your environment accordingly then you should not have any problems. Atleast I can assure you that your production database will not be affected by it.
Just make sure that you follow each step and read thoroughly. If you have spare machines then you can test and record your configuration before performing it on your production db. This link will provide you with the information on DataGuard.
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/concepts.htm
If you think that way then you will never be able to do any new stuff since you will always fear that something might go wrong. Go ahead pal, try it on test machines and you will know that it is not that difficult.
There are real experts who help people like us in this forum and I know that they are doing a pretty good job.
All the best.
Rgds
Adnan -
How does IDOC data transfer happensbetween two system?
Hi,
If there are data in system A and I need to transfer to system B using IDoc.
What are the key things which will enable data transfer from system A to system.
It would be great if someone can explain how does IDOC data gets transferred from system A to sytemB.
Regards,
Rachel
Moderator Message : Search for available information or Read SAP documentation. Thread locked
Edited by: Vinod Kumar on Apr 26, 2011 12:37 PMthanks for all your replies...
let me write down what i have understood ..plz correct me if i have not followed properly..
1) Once IDocs successfully reach R3 , a function module specific to the Idoc type is called "<b>automatically</b>" and updates database...
2) this function module we specify in the process code while creating partner profiles
basically all we need to do is to specify correct function module, right?
the rest of the process ie . updation in the tables(database) is done automatically..
Once database is updated, where can i see the added/updated records in database?
also how do we find this function module?
I am using MATMAS05...
Regards,
Roshani
Maybe you are looking for
-
How do I down load photoshop onto my Mac book 5.2?
How do I down load photoshop onto my Mac book 5.2?
-
Is it possible to take photos with the iphone when the flashlight is on?
Is it possible to take photos with the iphone when the flashlight is on? When the light is on, it would be great to take photos without flash in dark areas or in macromode. How is this possible?
-
Hi Gurus, I have to print a bar code in production order ..i have arranged the data to print in bar code format . But the bar code is not visible in print preview and in print . I have assigned a char type of bar code BC_CD39 and assigned to the data
-
I am having trouble downloading the creative suite package.
Downloading, Installing, Setting Up
-
No interface Idoc in Business system Receiver
Hello, I have one question concerning my interface for receiver. My scenarion is File to Idoc and when I configure my receiver determination, and I choose my business system receiver 'BS_ER6CLNT001' I don't find my interface 'CREMAS.CREMAS05' insinde