File Operation(Urgent)

I am a student. I have hand on project. This is handling File.
Now i am in the experiment 3. In experiment 1, I finish my lab.
Experiment 3 is on Inheritance and Polymorphism.
1. customer( Super class )
2. Account1, Account2, Account3 ( Subclass )
3.Bank_Customer(main)
I have two problems. one is Bank_Customer do not know Subclass.
second is my Super class is abstract. So can't instiation object.
//customer.java
public abstract class customer{
private int accId;
private String accName;
private String accAddr;
private String accDob;
private String accPhone;
private double accBal;
private String accType;
public customer(int ids, String names, String addrs, String dobs,
String phones, double bals, String type){
accId=ids; accName=names; accAddr=addrs;
accDob=dobs; accPhone=phones; accBal=bals; accType=type;
public int getId() { return accId; }
public String getName() { return accName; }
public String getAddr() { return accAddr; }
public String getDob() { return accDob; }
public String getPhone() { return accPhone; }
public double getBal() { return accBal; }
public String getType() { return accType; }
public void setId(int ids){ accId = ids; }
public void setName(String names) { accName = names; }
public void setAddr(String addrs) { accAddr = addrs; }
public void setDob(String dobs) { accDob = dobs; }
public void setPhone(String phones) { accPhone = phones; }
public void setBal(double bals) { accBal = bals; }
public void setType( String type ) { accType = type; }
public abstract double final_balance();
//Account1.java
public final class Account1 extends customer{
     private double balance;
     private double saving_interest;
     public Account1( int ids, String names, String addrs, String dobs,
String phones, double bals, String type, double interest){
super( ids, names, addrs, dobs, phones, bals, type );
setInterest( interest );
public void setInterest( double interest ){
     saving_interest = interest;
public double final_balance(){
     for( int i=0; i < 30; i++ ){
          balance = super.getBal();
          balance += balance*saving_interest;
     return balance;
//Account2.java
public class Account2 extends customer{
     private double balance;
     public Account2( int ids, String name, String addrs, String dobs,
String phones, double bals, String type, double interest){
super( ids, name, addrs, dobs, phones, bals, type );
public void setInterest( double interest ){
     interest = 0;
     balance = super.getBal();
public double final_balance(){
     return balance;
//Account3.java
public class Account3 extends customer{
     private double balance;
     private double fix_interest;
     public Account3( int ids, String name, String addrs, String dobs,
String phones, double bals, String type, double interest){
super( ids, name, addrs, dobs, phones, bals, type );
setInterest( interest );
public void setInterest( double interest ){
     fix_interest = interest;
public double final_balance(){
     balance = super.getBal();
     balance = balance + ( fix_interest*30);     
     return balance;
//Bank_Customer.java
import java.io.*;
import javax.swing.*;
import java.util.StringTokenizer;
import java.text.*;
import java.text.DecimalFormat;
import java.util.*;
import java.util.Scanner;
public class Bank_Customer {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static public void displayRecords(int records, customer c1[]){
for(int j=0; j<records; j++){
System.out.println("\nAccunt Id = " + c1[j].getId());
System.out.println("Accunt Name = " + c1[j].getName());
System.out.println("Address = " + c1[j].getAddr());
System.out.println("DOB = " + c1[j].getDob());
System.out.println("Phone Number = " + c1[j].getPhone());
System.out.println("Accunt Balance = " + c1[j].getBal());
System.out.println("Account Type = " + c1[j].getType());
System.out.println("\nNo. of Records Found: " + records);
// static public void deleteRecord( int records, customer c1[] )
static public void updateRecord( int records, customer c1[], double Interest){
     for(int i=0; i<records; i++){
               customer cus;
               int Id = c1.getId();
     String AccName = c1[i].getName();
     String AccAdd = c1[i].getAddr();
     String dob = c1[i].getDob();
     int phone = Integer.parseInt(c1[i].getPhone());
     double accbal = c1[i].getBal();
     String acctype = c1[i].getType();
          //     Account1 acc = new Account1( Id, AccName, AccAdd, dob, phone, accbal, acctype, Interest );
               //Account1 acc = new Account1();
               //cus = acc;
          acc.setInterest(Interest);
          System.out.println("The updated balance are :");
          System.out.println("Name =" + acc.getName() );
          System.out.print("Balance =" + acc.final_balance() );
public static void main(String[] args){
customer c1[]; //= new customer[100];
//for(int k=0; k<100; k++){
// c1[] = new customer(0, " ", " ", " ", " ", 0, "");
Account1 acc1[] = new Account1(0,"","","","",0,"");
//Account2 acc2[] = new Account2(0,"","","","",0,"");
//Account3 acc3[] = new Account3(0,"","","","",0,"");
c1[] = acc1[];
String strr;
char charArray[] = new char[1];
int records=0;
try {
for (;;) {
System.out.println("\n\n==================================");
System.out.println("\nEnter 1 to get customers Input Data");
System.out.println("Enter 2 to Display the customers Data");
System.out.println("Enter 3 to Output the customers Data");
System.out.println("Enter 4 to Delete the customers Data");
System.out.println("Enter 5 to Update the Interest rate in Saving and Fix Deposit Account");
System.out.println("Enter q(or Q) to Quit\n");
System.out.println("==================================");
strr = br.readLine();
if (strr == null)
break;
strr.getChars(0,1,charArray,0);
// System.out.println(charArray[0]);
switch (charArray[0]){
case '1':
System.out.print("\nEnter File Name: ");
/* Get input file name */
try{
for(;;){
strr = br.readLine();
if (strr == null)
break;
break;
catch (IOException ex) {
System.out.println(ex);
records = 0;
int mCount = 0;
/* Check file exists */
File name = new File(strr);
if (name.exists()){
System.out.println("\nFile exists.\n");
else{
System.out.println("\nFile does not exist.\n");
BufferedReader input = new BufferedReader( new FileReader(name));
String text;
StringTokenizer st;
int tCount;
String rdTokens = new String();
int rdAccno;
String rdName = new String();
String rdAddr = new String();
String rdDob = new String();
String rdPhone = new String();
String rdType = new String();
double rdBal = 0;
for(;;){
text = input.readLine();
if (text == null){
System.out.println("No. of Valid Records Found: " + records);
break;
st = new StringTokenizer(text);
tCount = st.countTokens();
if(tCount != 0){
rdTokens = st.nextToken();
if(rdTokens.equals("Id")){
rdTokens = st.nextToken();
if (rdTokens.equals("Id")){
rdTokens = st.nextToken(); /* rdTokens = "=" */
rdTokens = st.nextToken();
rdAccno = Integer.parseInt(rdTokens);
text = input.readLine(); /* reading -- Name */
st = new StringTokenizer(text);
tCount = st.countTokens();
rdTokens = st.nextToken();
if(rdTokens.equals("Name")){
rdTokens = st.nextToken(); /* rdTokens = "=" */
for(int l2=2; l2<tCount; l2++){
rdTokens = st.nextToken();
rdTokens = rdTokens.toUpperCase();
if(l2 == 2){
rdName = rdTokens;
else{
rdName = rdName+" "+rdTokens;
if(l2 == (tCount-1)){
rdName = rdName;
} /* end for */
} /* "Name" if */
else{
//System.out.println("\nInput file format error.");
} /* Name else */
text = input.readLine(); /* reading -- Address */
st = new StringTokenizer(text);
tCount = st.countTokens();
rdTokens = st.nextToken();
if(rdTokens.equals("Address")){
rdTokens = st.nextToken(); /* rdTokens = "=" */
for(int l3=2; l3<tCount; l3++){
rdTokens = st.nextToken();
if(l3 == 2){
rdAddr = rdTokens;
else{
rdAddr = rdAddr+" "+rdTokens;
if(l3 == (tCount-1)){
rdAddr = rdAddr;
} /* end if */
} /* end for */
} /* "Address" if */
else{
//System.out.println("\nInput file format error.");
} /* "Address" else */
text = input.readLine(); /* reading -- DOB */
st = new StringTokenizer(text);
tCount = st.countTokens();
rdTokens = st.nextToken();
if(rdTokens.equals("DOB")){
rdTokens = st.nextToken();
rdDob = st.nextToken();
else{
//System.out.println("\nInput file format error.");
text = input.readLine(); /* reading -- Phone Number */
st = new StringTokenizer(text);
tCount = st.countTokens();
rdTokens = st.nextToken();
if(rdTokens.equals("Phone")){
rdTokens = st.nextToken();
rdTokens = st.nextToken();
rdPhone = st.nextToken();
else{
//System.out.println("\nInput file format error.");
text = input.readLine(); /* reading -- Account Balance */
st = new StringTokenizer(text);
tCount = st.countTokens();
rdTokens = st.nextToken();
if(rdTokens.equals("Account")){
rdTokens = st.nextToken();
rdTokens = st.nextToken();
rdTokens = st.nextToken();
rdBal = Double.parseDouble(rdTokens);
else{
//System.out.println("\nInput file format error.");
text = input.readLine(); /* reading --- Account Type */
st = new StringTokenizer(text);
tCount = st.countTokens();
rdTokens = st.nextToken();
if(rdTokens.equals("Account Type")){
     rdTokens = st.nextToken();
     rdTokens = st.nextToken();
     rdTokens = st.nextToken();
     rdTokens = st.nextToken();
     rdType = st.nextToken();
//Debug point
//System.out.println(rdAccno);
//System.out.println(rdName);
//System.out.println(rdAddr);
//System.out.println(rdDob);
//System.out.println(rdPhone);
//System.out.println(rdBal);
if(records == 0){
c1[records].setId(rdAccno);
c1[records].setName(rdName);
c1[records].setAddr(rdAddr);
c1[records].setDob(rdDob);
c1[records].setPhone(rdPhone);
c1[records].setBal(rdBal);
c1[records].setType(rdType);
records++;
else{
for(int k=0; k<records; k++){
if(c1[k].getName().equals(rdName)){
mCount++;
if(mCount == 0){
c1[records].setId(rdAccno);
c1[records].setName(rdName);
c1[records].setAddr(rdAddr);
c1[records].setDob(rdDob);
c1[records].setPhone(rdPhone);
c1[records].setBal(rdBal);
c1[records].setType(rdType);
records++;
int NoSwitches;
do{
NoSwitches = 1;
for(int c=0; c<(records-1); c++){
int tempId1;
String tempName1, tempName2;
String tempAddr1;
String tempDob1;
String tempPhone1;
double tempBal1;
String tempType1;
tempName1 = c1[c].getName();
tempName2 = c1[c+1].getName();
if(tempName1.compareTo(tempName2) > 0){
tempId1 = c1[c].getId();
tempName1 = c1[c].getName();
tempAddr1 = c1[c].getAddr();
tempDob1 = c1[c].getDob();
tempPhone1 = c1[c].getPhone();
tempBal1 = c1[c].getBal();
tempType1 = c1[c].getType();
c1[c].setId(c1[c+1].getId());
c1[c].setName(c1[c+1].getName());
c1[c].setAddr(c1[c+1].getAddr());
c1[c].setDob(c1[c+1].getDob());
c1[c].setPhone(c1[c+1].getPhone());
c1[c].setBal(c1[c+1].getBal());
c1[c].setType(c1[c+1].getType());
c1[c+1].setId(tempId1);
c1[c+1].setName(tempName1);
c1[c+1].setAddr(tempAddr1);
c1[c+1].setDob(tempDob1);
c1[c+1].setPhone(tempPhone1);
c1[c+1].setBal(tempBal1);
c1[c+1].setType(tempType1);
NoSwitches = 0;
}while (NoSwitches == 0);
else{
//records++;
//records--;
} /* "Id" if */
else{ /* "Id" else */
//System.out.println("\nInput file format error.");
} /* "Account" if */
else{ /* "Account" else */
//System.out.println("\nInput file format error.");
} /* tCount if */
else{ /* tCount else */
/* Empty line. */
} /* end infinite for */
System.out.println("\n" + mCount + " same accounts info found.");
System.out.println("\nNeglecting duplicate entries.......");
break;
case '2':
displayRecords(records, c1);
break;
case '3':
/* writeFile();*/
File inputFile = new File("customers.txt");
File outputFile = new File("customers_out.txt");
FileReader in = new FileReader(inputFile);
FileWriter out = new FileWriter(outputFile);
int c;
while ((c = in.read()) != -1)
out.write(c);
in.close();
out.close();
               case '5' :
               String interest = new String();
               try{
for(;;){
interest = br.readLine();
if (strr == null)
break;
break;
catch (IOException ex) {
System.out.println(ex);
               double Interest = Double.parseDouble(interest);
               updateRecord( records, c1, Interest);
               break;
case 'q':
case 'Q':
/* System.out.println("Q"); */
System.exit(0);
break;
default:
System.out.println("\nTry again.");
break;
} /* swith end */
} /* for end */
} /* try end */
catch (IOException ex) {
System.out.println(ex);
(a) Re-declare Customer as a super class with 3 sub-classes, Account1, Account2 and Account3. Account1 is a saving account that receives daily interest. Account2 is a checking account that gets no interest. Account3 is a fixed deposit account with a fixed daily interest rate. One example of the input file is illustrated in Appendix A.
(b) Write a method deleteRecord that removes a customer record from the ordered array (or arrays). When removing an existing record, a void (empty) slot will result.
(c) Write a method update that computes the balance of each account at end of a month (assuming current month has 30 days). The interest should be computed in compound interest manner (i.e. at the end of each day, compute daily interest on capital and the accumulated interest so far). Make use of polymorphism here to have one update method that can work for all different types of accounts.
(d) Write a method menu that displays all the methods for test run. The lab markers can select method 1, 2, 3, 4, 5 or Q to input data, display data, output data, delete record, update and quit in any order such that it is possible for the markers to input or output data more than once. For command 4, the program should prompt and read in the account id to be deleted. For command 5, the program should prompt for the current interest rate for the saving account.
I am a student. I am not lazy man. I try it. As you see in my coding.
Please send me suggestion.

account is a subclass of customer?
an account IS-A customer? Sounds like composition and HAS-A is more appropriate to me. a customer HAS one or more accounts.
who wrote this assignment?
can't tell what your real problem is, but it looks like there's too much code, with little of it pertaining to customers and accounts.
whenever I see case statements, i think somebody ought to do a better job of using polymorphism. but then you're a student.
%

Similar Messages

  • URGENT: File Adapter List Files operation Issue

    Hi All,
    we are using List files operation in one of the SOA composite which lists all files available in the directory. what we observed files are not listing as for the timestamps.
    is there any property to list all files ascending or descending based on time stamp?. we tried with ListSorter property which is suggested by Oracle,but it works for only INBOUND operations. [http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm#BABBIJCJ]
    Any suggestions will be greatly appreciated.

    Hi,
    You can try 2 options:
    1. You would need to capture/collect all the file names, you might have to use BPM and create a separate interface.
    2. You can also pick up those files from the archive directory using FTP and push them using mail adapter.
    Regards,
    Pavan

  • Saving master page in search template throws error "UserAgent not available, file operations may not be optimized"

    Hi Folks,
    I was trying to save basic search template master page "seattle.master" after making change to the template.
    I have added just "CompanyName" folder and update the line below in seattle.master.
    Change is this : <SharePoint:CssRegistration Name="Themable/CompanyName/corev15.css" runat="server"/>
    When I save it, and refresh page on browser, it shows "Something went wrong" error.
    ULS says the following error : "UserAgent not Available, file operation may not be optimized"
    Pls let us know if there is a solution.
    Any help Much appreciated !
    Thanks,
    Sal
    

    Hi Salman,
    Thanks for posting this issue, 
    Just remove this below given tag and check out. It might be happened that your control is conflicting with others. 
    Also, browse the below mentioned URL for more details
    http://social.msdn.microsoft.com/Forums/office/en-US/b32d1968-81f1-42cd-8f45-798406896335/how-apply-custom-master-page-to-performance-point-dashboard-useragent-not-available-file?forum=sharepointcustomization
    I hope this is helpful to you. If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • ACS v5.2 - Unable to update User integer attributes through File Operations

    Hi,
         I have created some internal users on ACS v5.2 and added some Unsigned Integer attributes for each user. I am trying to do a bulk update of these integer attributes using the File Operation facility. However no matter what number I put on the import template it doesn't get updated and displays a "0" in the user config.
    The import template is validated successfully with no errors and also the string attributes are updated correctly.
    There is a sort of work around of deleting the users and adding them back in with the updated values. But this is not feasible as it would reset their passwords. I have also tried saving the csv file in Open Ofifce instead of Excel
    Has any one else come across this problem?
    (I am unable to see this issue in the Release notes or Bug tool kit although there is a similar issue when updating devices in CSCth68051)

    Hi,
         Thanks for the reply. I have managed to recreate the problem to show you but it is a bit more complicated than I first thought. The problem only occurs when the integer attributes are added after the user is created.
    I created a dummy user. The MTL and TLS attributes were present before the user was added. I then added the XXX and ZZZ attributes afterwards and assigned them default values. The default values show up in the GUI config.
    However when I export the database to a csv file only the values of the MTL and TLS attributes show up in the export file:
    I then downloaded an import template and updated the integer values for TLS,MTL, XXX and ZZZ for the dummy user:
    The file imports successfully with no errors. However, when I display the user config only the MTL and TLS attributes have changed. The XXX and ZZZ attributes have stayed the same.
    I thought it might be because I was assigning a default value of 0 to the new attributes but I assigned ZZZ a default value of 1 and the same thing occurred.

  • USB Drive Resets during file copy, interrupting file operations

    Fresh Arch Linux install, working USB thumb drive (Windows, previous Arch Linux setups, etc.), formatted FAT32.
    Seems to randomly reset, eject, and auto-re-mount during extensive file operations (i.e. copying 4gb worth of 800 files from the USB thumb drive to disk).
    I've tried various USB ports to no avail; no external hub being used.
    Thoughts? Not sure where to begin diagnosing:
    dmesg:
    usb 1-1: configuration #1 chosen from 1 choice
    scsi17 : SCSI emulation for USB Mass Storage devices
    usb-storage: device found at 15
    usb-storage: waiting for device to settle before scanning
    scsi 17:0:0:0: Direct-Access OCZ RALLY2 1100 PQ: 0 ANSI: 0 CCS
    sd 17:0:0:0: Attached scsi generic sg2 type 0
    usb-storage: device scan complete
    sd 17:0:0:0: [sdb] 31326208 512-byte logical blocks: (16.0 GB/14.9 GiB)
    sd 17:0:0:0: [sdb] Write Protect is off
    sd 17:0:0:0: [sdb] Mode Sense: 43 00 00 00
    sd 17:0:0:0: [sdb] Assuming drive cache: write through
    sd 17:0:0:0: [sdb] Assuming drive cache: write through
    sdb: sdb1
    sd 17:0:0:0: [sdb] Assuming drive cache: write through
    sd 17:0:0:0: [sdb] Attached SCSI removable disk
    usb 1-1: reset high speed USB device using ehci_hcd and address 15
    sd 17:0:0:0: [sdb] Unhandled error code
    sd 17:0:0:0: [sdb] Result: hostbyte=0x07 driverbyte=0x00
    end_request: I/O error, dev sdb, sector 7589504
    sd 17:0:0:0: [sdb] Unhandled error code
    sd 17:0:0:0: [sdb] Result: hostbyte=0x07 driverbyte=0x00
    end_request: I/O error, dev sdb, sector 7589744
    sd 17:0:0:0: [sdb] Unhandled error code
    sd 17:0:0:0: [sdb] Result: hostbyte=0x07 driverbyte=0x00
    end_request: I/O error, dev sdb, sector 7589776
    usb 1-1: USB disconnect, address 15
    FAT: bread failed in fat_clusters_flush
    FAT: FAT read failed (blocknr 3805)
    FAT: Directory bread(block 24147944) failed
    FAT: FAT read failed (blocknr 3818)
    <snip lots of repeats>
    FAT: FAT read failed (blocknr 4032)
    FAT: bread failed in fat_clusters_flush
    FAT: bread failed in fat_clusters_flush
    FAT: bread failed in fat_clusters_flush
    usb 1-1: new high speed USB device using ehci_hcd and address 16
    usb 1-1: configuration #1 chosen from 1 choice
    scsi18 : SCSI emulation for USB Mass Storage devices
    usb-storage: device found at 16
    usb-storage: waiting for device to settle before scanning
    scsi 18:0:0:0: Direct-Access OCZ RALLY2 1100 PQ: 0 ANSI: 0 CCS
    sd 18:0:0:0: Attached scsi generic sg2 type 0
    usb-storage: device scan complete
    sd 18:0:0:0: [sdb] 31326208 512-byte logical blocks: (16.0 GB/14.9 GiB)
    sd 18:0:0:0: [sdb] Write Protect is off
    sd 18:0:0:0: [sdb] Mode Sense: 43 00 00 00
    sd 18:0:0:0: [sdb] Assuming drive cache: write through
    sd 18:0:0:0: [sdb] Assuming drive cache: write through
    sdb: sdb1
    sd 18:0:0:0: [sdb] Assuming drive cache: write through
    sd 18:0:0:0: [sdb] Attached SCSI removable disk
    lsusb -v for the drive:
    Bus 001 Device 016: ID 0325:ac02 OCZ Technology Inc ATV Turbo / Rally2 Dual Channel USB 2.0 Flash Drive
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.00
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x0325 OCZ Technology Inc
    idProduct 0xac02 ATV Turbo / Rally2 Dual Channel USB 2.0 Flash Drive
    bcdDevice 11.00
    iManufacturer 1 OCZ Technology
    iProduct 2 RALLY2
    iSerial 3 AA04012700275633
    bNumConfigurations 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 32
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0x80
    (Bus Powered)
    MaxPower 300mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 8 Mass Storage
    bInterfaceSubClass 6 SCSI
    bInterfaceProtocol 80 Bulk (Zip)
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 255
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x02 EP 2 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 255
    Device Qualifier (for other device speed):
    bLength 10
    bDescriptorType 6
    bcdUSB 2.00
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    bNumConfigurations 1
    Device Status: 0x0000
    (Bus Powered)
    Last edited by lieut_data (2009-12-26 17:39:56)

    Jithin wrote:
    When ever I copy some files or create a file in my external USB drive which is a FAT32 one. file permissions are not preserved.
    From <http://support.apple.com/kb/HT3764>:
    "The MS-DOS (FAT32) file system format does not support permissions, file owners, and groups. Such permissions are synthesized on Mac OS X with some default permissions. Because of this all files will have the same permissions […]"
    So it's not "how it work in mac", but it's a limitation of the FAT32 file system.

  • Unable to run a Batch File Operating System Command

    Using XI 3.0, I am unable to run a Batch File Operating System Command After Message Processing.
    My Batch file:
    gpg -se -r BOA3RSKY --armor --passphrase-fd 0 %1 < C:\Progra~1\GNU\GnuPG\gpgin
    My Command Line (ID scenario)
    exec "cmd.exe /c C:\Progra~1\GNU\GnuPG\boagpg.bat %F"
    If I execute
    exec "cmd.exe /c type C:\Progra~1\GNU\GnuPG\boagpg.bat >xis.txt"
    It displays the contents of boagpg.bat file in xis.txt.
    I just don't understand why when I run the batch file, I would expect an %F.asc encrypted file in the same directory as the %F unencrypted file.
    Any ideas?
    or will I need Basis to create commands that will allow me to run GPG from XI Command Line?

    Check this links if its helpful
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/c7423347dc488097ab705f7185c88f/frameset.htm
    /people/sap.user72/blog/2004/01/30/command-line-help-utility
    Check this thread a similar problem
    Process Integration (PI) & SOA Middleware
    Note 841704 - XI File & JDBC Adapter: Operating system command
    http://service.sap.com/sap/support/notes/841704
    Try to see the below links
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    OS Command on FTP
    OS command line script - Need help
    FTP - Run OS Command before file processing
    Note: reward points if solution found helpfull
    Regards
    Chandrakanth.k

  • ORA-29283 invalid file operation

    NLSRTL      10.2.0.5.0     Production
    Oracle Database 10g Enterprise Edition      10.2.0.5.0     64bi
    PL/SQL      10.2.0.5.0     Production
    TNS for IBM/AIX RISC System/6000:      10.2.0.5.0     Productio
    I am trying to get the content of a trace file generated for me.
    Because I don't have privileges to log on the server and copy the trace file for me directly with some os user, I am doing the following:
    1. I alter my session trace identifier to easier identify the trace file
    ALTER SESSION SET TRACEFILE_IDENTIFIER = 'Func01';2. I invoke DBMS_MONITOR
    3. I run the procedure I want to monitor.
    4. I disable the monitoring by calling DBMS_MONITOR
    5. At this point I run the following query to identify my trace file:
    select u_dump.value || '/' || instance.value || '_ora_' || v$process.spid || nvl2(v$process.traceid, '_' || v$process.traceid, null ) || '.trc'"Trace File"
    from V$PARAMETER u_dump
    cross join V$PARAMETER instance
    cross join V$PROCESS
    join V$SESSION on v$process.addr = V$SESSION.paddr
    where 1=1
       and u_dump.name = 'user_dump_dest'
       and instance.name = 'instance_name'
       and V$SESSION.audsid=sys_context('userenv','sessionid');It gives me: /ORACLE/MYDB/trace/MYDB_ora_3616822_Func01.trc
    I have created directory in advanced on the path where the traces are stored:
    CREATE OR REPLACE DIRECTORY trace_dir AS '/ORACLE/MYDB/trace/';
    SELECT * FROM dba_directories WHERE directory_name = 'TRACE_DIR';
    Output:
    OWNER DIRECTORY_NAME DIRECTORY_PATH
    SYS     TRACE_DIR      /ORACLE/MYDB/trace/I don't have rights to grant read, write on TRACE_DIR to my user, as I am not logged with SYS.
    I created a table to store in it the lines from the trace file:
    CREATE TABLE tmp_traces_tab
      callnum NUMBER,
      line NUMBER,
      fileline CLOB
    );Then I run the following PL/SQL block to retrieve the content of the trace and store it in the table T:
    DECLARE
      l_file            UTL_FILE.file_type;
      l_location     VARCHAR2 (100) := 'TRACE_DIR';
      l_filename    VARCHAR2 (255) := 'MYDB_ora_3616822_Func01.trc';
      l_text           VARCHAR2 (32767);
      l_line           NUMBER := 1;
      l_call           NUMBER := 1;
    BEGIN
      -- Open file.
      l_file := UTL_FILE.fopen (l_location, l_filename, 'r', 32767);
      -- Read and output first line.
      UTL_FILE.get_line (l_file, l_text, 32767);
      INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
      l_line := l_line + 1;
      BEGIN
        LOOP
          UTL_FILE.get_line (l_file, l_text, 32767);
           INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
           l_line := l_line + 1;
        END LOOP;
      EXCEPTION
        WHEN NO_DATA_FOUND THEN
          NULL;
      END;
      INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
      l_line := l_line + 1;
      UTL_FILE.fclose (l_file);
    END;
    /And when I run the code I get the error: ORA-29283 invalid file operation.
    Is it possible to a role my user to be able to get the content of the trace files in the directory TRACE_DIR without having explicit READ , WRITE privileges on it?
    My user currently has these roles:
    select * from dba_role_privs where grantee = USER;
    Output:
    U1     OPR_ROLE_LOSS_SNAPSHOT_READER     YES     YES
    U1     RESOURCE     NO     YES
    U1     CONNECT     NO     YES
    U1     DBA     NO     YES
    U1     OPR_ROLE_SUPPORT_USER     YES     YESI know that on another db with different user I hit no errors when doing completely the same (of course the program unit I monitor is different).
    That other user with which I have NO issues has these roles:
    select * from dba_role_privs where grantee = USER;
    Output:
    U2    DBA    NO    YES
    U2    EXEC_SYS_PACKAGES_ROLE    NO    YES
    U2    EXECUTE_CATALOG_ROLE    NO    YES
    U2    CONNECT    NO    YES

    Verdi wrote:
    NLSRTL      10.2.0.5.0     Production
    Oracle Database 10g Enterprise Edition      10.2.0.5.0     64bi
    PL/SQL      10.2.0.5.0     Production
    TNS for IBM/AIX RISC System/6000:      10.2.0.5.0     Productio
    And when I run the code I get the error: ORA-29283 invalid file operation.
    Is it possible to a role my user to be able to get the content of the trace files in the directory TRACE_DIR without having explicit READ , WRITE privileges on it?
    My user currently has these roles:
    select * from dba_role_privs where grantee = USER;
    Output:
    U1     OPR_ROLE_LOSS_SNAPSHOT_READER     YES     YES
    U1     RESOURCE     NO     YES
    U1     CONNECT     NO     YES
    U1     DBA     NO     YES
    U1     OPR_ROLE_SUPPORT_USER     YES     YESI know that on another db with different user I hit no errors when doing completely the same (of course the program unit I monitor is different).
    Thanks for posting version alongwith other details.
    TO my knowledge, No you cannot.
    Privileges acquired via a Role are not valid in PL/SQL. You need to have explicit privileges.

  • I cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    i cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    Chester31,
    Thank you very much for sharing your file with us!  Now that we are able to reproduce the problem at our end, you may stop sharing the file on Acrobat.com.
    Do you know when this problem (for not being able to add new highlight/strikeout/underline) has started?  Did you update your iOS from 7.x to 8.0 recently?
    We will continue investigating the problem and let you know what we find.
    Thank you again for your help.

  • Laggy file operations windows 7 clients with windows server 2008 R2

    Hope this is posted in the right place..
    Ok so this is driving me insane...
    I have a DNS/file server running Windows Server 2008 R2, and 5 client pc's running windows 7 x64 and x86.
    All the client PC's have extremely laggy file operations when for example right clicking to create a new folder or opening certain files (AutoCAD). Talking about 3-10 second lag for a response.
    However if I do a straight file transfer to test the transfer speed its all normal. Everything is connected @ gigabit network speeds.
    This just seemed to happen one day a few months ago, and has remained ever since. Before that (couple years) it was not doing this...
    Anyone have any ideas, I'm at a loss... I've checked the performance monitor on the server nothing seems abnormal when this happens.
    Thank you,

    Hi, 
    Please test to disable all third party applications on file server to see if that is the cause. Sometimes such kind of issues are caused by antivirus program, firewall etc.
    A quick step is to boot into Clean Boot mode as provided in following article:
    http://support.microsoft.com/kb/929135
    If you have any feedback on our support, please send to [email protected]

  • Filestream Creation Unable to Open Physical File Operating System Error 259

    Hey Everybody,
    I have run out of options supporting a customer that is having an error when creating a database with a file stream.  The error displayed is unable to open physical file operating system error 259 (No more data is available).  We're using a pretty
    standard creation SQL script that we aren't having issues with other customers:
    -- We are going to create our data paths for the filestreams.  
    DECLARE @data_path nvarchar(256);
    SET @data_path = (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1)
                      FROM master.sys.master_files
                      WHERE database_id = 1 AND file_id = 1);
    -- At this point, we should be able to create our database.  
    EXECUTE ('CREATE DATABASE AllTables
    ON PRIMARY
        NAME = AllTables_data
        ,FILENAME = ''' + @data_path + 'AllTables_data.mdf''
        ,SIZE = 10MB
        ,FILEGROWTH = 15%
    FILEGROUP FileStreamAll CONTAINS FILESTREAM DEFAULT
        NAME = FSAllTables
        ,FILENAME = ''' + @data_path + 'AllTablesFS''
    LOG ON
        NAME = AllTables_log
        ,FILENAME = ''' + @data_path + 'AllTables_log.ldf''
        ,SIZE = 5MB
        ,FILEGROWTH = 5MB
    GO
    We are using SQL Server 2014 Express.  File streams were enabled on the installation SQL Server.  The instance was created successfully and we are able to connect to the database through SSMS. The user is using an encrypted Sophos. 
    We have tried the following:
    1. Increasing the permissions of the SQL Server server to have full access to the folders.
    2. Attempted a restore of a blank database and it failed.
    There doesn't seem to be any knowledge base articles on this particular error and I am not sure what else I can do to resolve this.  Thanks in advance for any help!

    Hi Ryan,
    1)SQL Server(any version) can't be installed on encrypted drives. Please see a similar scenario in the following link
    https://ask.sqlservercentral.com/questions/115761/filestream-and-encrypted-drives.html
    2)I don't think there is any problem with permissions on the folder, if the user can create a database in the same folder. Am not too sure. Also see the article by
    Jacob on configuring the FILESTREAM for SQL Server that describes how to configure FILESTREAM access level & creating a FILESTREAM enabled database
    Hope this helps,
    Thanks
    Bhanu 

  • Build a tool for controlling a copy file operation base on its file size in any folder of Window Explorer

    Hi all,
    We are developing a tool which will control a copy file operation in any folder of Window Explorer base on file size limit.
    If these copied files are not satisfied the file size condition (its size is larger than a predefined value), the copy/move operation must not be executed.
    My question is that: "Are there any availability support of Windows API/tool for implementing this feature?"
    BR,
    Mr_Le

    Hi Mr_Le,
    Thank you for posting in the MSDN forum.
    Based on your description, I’m afraid that it is not the correct forum for this issue, since this forum is to discuss:
    Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
    To help you find the correct development forum for this issue, please tell me the real project type (Winforms or others) and the real development language (C#, VB or others) you want to use.
    If you are not very sure that which kind of project fulfils this requirement, maybe the language development forum would be better for this issue:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=vslanguages&filter=alltypes&sort=lastpostdesc
    If there's any concern, please feel free to let me know.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to install File Operations components in Data Integrator

    Hello Endeca Forum,
    I'm interested in using the File Operations components in Data Integrator, but getting and installing them is surprisingly obscure.
    I'm talking about...
    http://doc.cloveretl.com/documentation/UserGuide/index.jsp?topic=/com.cloveretl.gui.docs/docs/file-operations.html
    The Clover documentation (http://doc.cloveretl.com/documentation/UserGuide/index.jsp?topic=/com.cloveretl.gui.docs/docs/components.html) states...
    "+Note if you cannot see this component category, navigate to Window → Preferences → CloverETL → Components in Palette and tick both checkboxes next to File Operations+"
    However, when I go to Window --> Preferences --> CloverETL --> Components in Palette, I don't even see File Operations. This tells me that the version of Clover packaged with OEID doesn't have the components installed.
    Going to Help --> Check for Updates also didn't yield anything that looked like the File Operations components.
    I'm hoping someone here is familiar with the necessary steps to get these components installed...
    Thanks,
    Jerome

    I see what you're saying Purvesh, thanks for the clarification.
    Again, it's a little challenging to find this out, but there's a Clover support team member who mentions here...
    http://forum.cloveretl.com/viewtopic.php?f=4&t=6428&view=previous
    ... that the File Operations were introduced in the 3.3.0 M3 release.
    Guess this means we're out of luck, which is unfortunate.
    I'm fully aware that the SystemExecute component is an option for file management, but it's not the best fit for what I need to do. In any case, my question has been answered.
    Thanks!
    Jerome

  • Very, very slow file operations

    I needed to make a specific change to an exif field of some images. So what I did was to move identify the files that I needed to change in Lightroom (they were in various folders on my disk) and move them to other folders so they would be easy to operate on. Then I used exiftool to change the field in these files, and then I thought it would be easy to read in the changed data and move them back to their original folders in Lightroom. What I found included:
    I tried to Synchronize Metadata on the folders after changing the exif field. One folder had about 500 images in it, the other about 2,000. After 3 hours, the progress bar had barely moved, and I aborted.
    When I tried to quit Lightroom it said that it was "writing metadata", even tho the synchronization had changed the external data and it should only have been reading metadata. I quit anyways and rebooted.
    After rebooting, and relaunching Lightroom I looked at the "metadata status" column in Grid view. It was (as always, it seems) completely wrong about which files were up to date.
    I was able to "read metadata" on these 2,500 images in "only" about an hour or two. Note that I didn't ask Lightroom to update the cached images, only to read the metadata. Reading metadata at 1,000-2,000 images an hour seems exceptionally slow.
    Now I am trying to move the files back to their correct folders. I dragged about 1,000 raw images (CR2 + xmp) from one folder to another in Lightroom. Three hours later it is about 50% finished according to the progress bar. I'm going to bed and hope it will finish by the morning. I have to move all the other images as well, but because Lightroom won't update the filter bars in Grid View while moving files, I can't start these moves until Lightroom finishes the first.
    Do other people fine absolutely absurd speeds for file operations in Lightroom? Is there any solution other than quitting and rebooting (which doesn't always work)? I hate to quit in the middle of a synchronize, read metadata, or move files operation even when it seems to be barely chugging along, because I am afraid that when I abort the operation, I will somehow leave a file orphaned, or it's metadata out of sync (which happens to me all the time, but I never know why).
    When I am doing other operations I also find that I can use Lightroom for only a few hours before it gets so slow that I quit and reboot, after which operations speed up considerably. This doesn't seem like it should be necessary for a "modern" program and operating system, but in my experience it is.
    I'm using a Macintosh (4 core i7, 16 GB of RAM), Mavericks latest, Lightroom 5.5, and a RAID disk, so hardware shouldn't be limiting. During this last interminable copy operation, it appears that Lightroom is pegged at 100% of a processor (core).

    Sorry, but I don't think your workaround works. I am moving a bunch of files from one folder to various folders (using Lightroom to discriminate between files based on their exif/iptc values), then I change them using an outside program (exiftool), then I put them back in their original folders. This involves having Lightroom read in the new data in the files, which is what is so slow. Reconnecting, if I understand it, is for when you move a folder of files to another location, and Lightroom needs to be informed of that move.
    As I pointed out, the problem is that Lightroom gets progressively and painfully slower the more you use it. But quitting and restarting can be annoying if you are in the middle of an operation because you can lose context (especially if you restart your computer, which seems to help).
    And I do optimize my database nearly daily when using Lightroom.
    I would spend the time to fully document this problem and report it as a bug, but my experience is that Adobe shows no evidence of actually reading my bug reports, let alone responding to them.

  • Invoke a FTP "Get File" operation throws java.lang.ClassCastException:

    Hi there,
    I am working on a very simple sample project that will pull the file from a ftp site. I create a partner link with FTP adpater with "Get File" operation.
    When I deploy and run the SIMPLE project, it throws the following exception.
    I am wondering if any of you experienced the same problem and how to resolve the issue. Your help will be greatly appreciated.
    Here is the error message:
    <messages><input><Invoke_1_Get_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Root-Element"><Root-Element xmlns="http://TargetNamespace.com/ftp_service"/>
    </part></Invoke_1_Get_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_FTPProcess2_1.0_709914d835a81c407ed668866e080b9e.tmp/ftp_service.wsdl [ Get_ptt::Get(Root-Element) ] - WSIF JCA Execute of operation 'Get' failed due to: Could not instantiate InteractionSpec oracle.tip.adapter.ftp.inbound.FTPActivationSpec due to: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
         java.lang.ClassCastException: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Could not instantiate InteractionSpec oracle.tip.adapter.ftp.inbound.FTPActivationSpec due to: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
         java.lang.ClassCastException: oracle.tip.adapter.ftp.inbound.FTPActivationSpec</summary>
    </part><part name="detail"><detail>org.collaxa.thirdparty.apache.wsif.WSIFException: Could not instantiate InteractionSpec oracle.tip.adapter.ftp.inbound.FTPActivationSpec due to: oracle.tip.adapter.ftp.inbound.FTPActivationSpec; nested exception is:
         java.lang.ClassCastException: oracle.tip.adapter.ftp.inbound.FTPActivationSpec</detail>
    </part></bindingFault></fault></messages>

    Take a look at the stack trace, it shows you exactly where the error is coming from:
    java.lang.ClassCastException: org.theclass.candidate.view.SearchForm
    org.theclass.candidate.view.CandidateListAction.execute(CandidateListAction.java:41)Line 41 in your CandidateListAction.
    Probably it is failing on a cast of your action form.
    Taking a closer look at your struts-config, you are "chaining" actions.
    Your AddCandidateAction uses the candidateForm, and forwards to CandidateListAction.do
    Your CandidateListAction uses the searchForm.
    That will be the cause of your class cast exception.
    <action path="/Add"
      name="candidateForm"
      type="org.theclass.candidate.view.AddCandidateAction"
      validate ="true"
      input="/jsp/addcandidate.jsp">
      <forward name="success" path="/CandidateList.do"/>
    </action>
    <action path="/CandidateList"
    type="org.theclass.candidate.view.CandidateListAction"
    name="searchForm"
    scope="request" >
    <forward name="failure" path="/jsp/list.jsp"/>
    <forward name="success" path="/jsp/candidatelist.jsp"/>
    </action>Check out: http://struts.apache.org/1.x/faqs/newbie.html#chaining
    Solutions?
    - don't chain actions ;-)
    - use the same action form for both actions (possible?)
    - make the actionForward a "redirect" one. That means a new request, and losing any request parameters/attributes but should prevent this class cast exception.
    Hope this helps,
    evnafets

  • Cisco SSL VPN "The following error occurred while attempting the file operation: Unable to view the contents of the Domain/Workgroup. "

    Hey People, 
    Ive set up an SSL Clientless VPN on the Cisco 2821. Ive set up WINS, and the NBNS entries in the VPN config. When i log onto the VPN , i can access the file servers by typing in their names in the network fi
    le box, but when i click browse network and select the network name i get the following message
    "The following error occurred while attempting the file operation:
    Unable to view the contents of the Domain/Workgroup. "
    Has anyone come accross this before?
    Im using Windows Server 2008R2 for the DC, Windows Server 2003 R2 For WINS and File Sharing. 
    The connection goes WAN->BROADBANDROUTER>CISCO2821
    Any helo would be much greatly appreciated. 
    Thanks in advance! 

    Please see old threads which discuss the same topic -- http://forums.oracle.com/forums/search.jspa?threadID=&q=An+error+occurred+while+attempting+to+establish+an+Applications+File+Server+connection+with+the+node&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

Maybe you are looking for