Difference in information sent / received using externalisable classes

I am a little unsure whether this is the right place to post, I am relatively new to Java but trying hard to learn it well. However this is quite a specific problem with a personal (for fun) project I have been undertaking and it is driving me slowly insane.
This is a bit complicated for me to simple post swathes of code so I will attempt to explain. Any help is appreciated as this has been infuriating me for 2-days now.
Essentially I have made a small game for multiple clients connecting to a server. The client can send a request to move from a position to another to the server and the server responds by moving them and sending them a list of other players at that location, however for some reason at certain points the server will write out what I believe is the correct information to the client but the client will read in something completely different.
Here is the code which sends the "node" (containing the list of players as well as other information).
Packet packet = Packet.factoryCreateMovementArrived(publicNode);
server.sendPacketToClient(playerID, otherPacket);
public void sendPacketToClient(int playerID, Packet packet) throws IOException
     synchronized(playerIDToOutput)
          ObjectOutputStream obOut = (ObjectOutputStream)playerIDToOutput.get(playerID);
          obOut.writeObject(packet);
}I wrote my own "packet" class for this which implements the externalizable interface, I factory a certain type of packet and when writing out use a switch to decide what information will be sent. Below is the code for that type of packet (note: the node is also externalisable with a similar method, also included).
case TYPE_MOVEMENT_ARRIVED:
     out.writeObject(locationNode);
     break;
case TYPE_PUBLIC_NODE_UNDOCKED:               
     out.writeInt(type);
     out.writeObject(nodeID);
     out.writeObject(shipsSpace);I have examined the packets I am sending out from the server and they contain what I expect however what the client reads in, seems completely different at times and I cannot for the life of me figure out why.
Here for example are the methods to read in the packet and the node:
case TYPE_MOVEMENT_ARRIVED:
     this.locationNode = (Node)in.readObject();
        break;
case TYPE_PUBLIC_NODE_UNDOCKED:                    
     this.type = in.readInt();
     this.nodeID = (String)in.readObject();
     this.shipsSpace = (Vector)in.readObject();And this is used by this method to read in the packet when received from the server:
while(true)
     try
          Packet messagePacket = (Packet)obIn.readObject();                         
          dealWithPacket(messagePacket);                         
private void dealWithPacket(Packet packet)
     if (packet.getType() == Packet.TYPE_MOVEMENT_ARRIVED)
          Node toNode = packet.getLocationNode();
          active.arrivedAtLocation(toNode);
     }However by the time it gets to there the data is wrong, the list of people at that node seems to be similar to when the client first logs on. I have debugged my way through the code numerous times and although the server seems to be creating packets containing the correct and current list of players when received at the other end it is simply the list for that node at the beginning of the game. I do not know whether it is possible that although the packet contains the correct list somehow I am sending a different one, but I cannot see how. The same for when constructing the packet with the read methods. .. whether somehow I am not actually reading in what I have sent..
It's hard for me to explain properly and I cannot exactly post all my code because there's a fair amount of it, however I have been over and over what I have written checking that I am not simply referencing something else, I even wrote the packets I was sending from the server into a file and read that in in another program I wrote and examined them, they were correct! It is infuriating.
Any help would be greatly appreciated, even simply ideas of how to test this further would be welcome.
Look forward to your responses and apologise for any obvious errors :)

So when I'm writing to a stream objects I have already written can essentially be referenced / reused and sent again? I didn't know that but if that's what is happening it explains alot.
So as I'm sending the same node when you move back to that position it's already in the stream so it simply uses that version? Sorry for asking further questions I just want to make sure I understand what's happening (I went and read the API.. just checking).
And no warnerja it wasn't a "please simply wave an magic wand and write the project for me", I've seen posts like that from other people. I have written alot of code around this and I simply did not want to post it all. If reseting my output stream solves the problem then someone clearly understood my dilema even if you did not. A more helpful post might have been "You haven't specified enough for me to understand the problem please specify the following ... a) .. b)" etc. Don't simply moan at me.
Thanks DrClap.

Similar Messages

  • Please give me the information when to use inner classes in applications

    HI,
    please give me when to use the innerclasses

    > HI,
    please give me when to use the innerclasses
    Use them when you want to create a class within another class.
    Now gimme all 'er Dukes!!!

  • Difference between F.35 Receivables amount and FBL5N report open items

    Hi All,
    There is an amount difference between f.35 receivables amount and fbl5n open items amount, I have observed that there are some changes to credit master like risk category and credit representative group, so I thought if we run f.28 it will be right but still difference exits.
    If anybody has come across similar issue or if you have any idea on this on how to analyze, please let me know.
    Regards,
    RK.

    Hi ,
    Please check the time horizon in credit check used. then compare it with FBL5n.
    May be there will be difference in comparison period.
    Program RFDKLI20 or F.28 is to run when there is changes in Assignment from company code, entry in customer master data, entry in sales area data, user exit., currency of credit control area , Assignment of customers to credit accounts.
    And
    Program RVKRED09.--> only the risk class was changed it is sufficient to run
    Regards
    Atul

  • Needs help.....Please about using different classes

    I don't know how to use differenet classes.
    Please tell me how to write class to suit Start. This stuff me up. Please .... help me
    <<My program>>
    //Start
    public class Start
    {  private Artist[] Artists;
    private Record[] records;
    private Person[] Manager;
    private TextMenu makeMenu = new TextMenu();
    public static void main(String[] args)
         Start studio = new Start();
    studio.menu();
    public Start()
    {  //Person.Manager(ManagerName,HouseNumber,StreetNumber,PhoneNumber)
         Manager = new Person[1];
         Manager[0] = new Person("Yangfan",88,"Young ST",11118888);
         //Artist(GroupID,ArtistName,HouseNumber,StreetNumber,PhoneNumber)
         Artists = new Artist[5];
    Artists[0] = new Artist(1,"Backstreet Boys",58,"Music ST",99998888);
    Artists[1] = new Artist(2,"Santana",68,"Music ST",99998899);
    Artists[2] = new Artist(3,"Macy Gray",78,"Music ST",55558888);
    Artists[3] = new Artist(4,"Ricky Martin",88,"Music AVE",77778888);
    Artists[4] = new Artist(5,"Did Rock",55,"Music Road",66667777);
    //Record(RecordingID,RecordName,Artist,StartTime,FinishTime,RecordingDate,GuestArtist1,GuestArtist2)
    records = new Record[6];
    records[0] = new Record(1,"I want it that way",Artists[0],11,12,"05/08/2001",Artists[1],Artists[3]);
    records[1] = new Record(2,"Smooth",Artists[1],11,12,"05/08/2001",Artists[1],"");
    records[2] = new Record(3,"Do something",Artists[2],11,"05/08/2001",Artists[3],"");
    records[3] = new Record(4,"Livin La Vida Loca",Artists[3],11,12,"05/08/2001",Artists[1],Artists[3]);
    records[4] = new Record(5,"Bawitdaba",Artists[4],11,13,"05/08/2001",Artists[1],"");
    records[5] = new Record(6,"The one",Artists[0],11,14,"05/08/2001",Artists[1],"");
    public void menu()
    {  String[] choices = {">>>List Manager Details",">>>List All Artist Names",">>>List An Artist Telephone-Number",">>>Show Details For One Recording",">>>Add A New Recording",">>>List The Recording Costs For All Artists",">>>List Artist's Reocording",">>>Exit Program"};
    while (true)
    {  switch (makeMenu.getChoice(choices))
    {  case 1: showAllArtists();
    break;
    case 2: showAllRecords();
    break;
    case 3: System.exit(0);
    break;
    case 4: System.exit(0);
    break;
    case 5: System.exit(0);
    break;
    case 6: System.exit(0);
    break;
    case 7: System.exit(0);
    break;
    case 8: System.exit(0);
    break;
    default:
    public void showAllArtists()
    {  int numArtists = Artists.length;
    for(int i = 0; i < numArtists; i++)
    {  Artists[i].displayArtistDetails();
    public void showAllRecords()
    {  for (int i = 0; i < records.length; i++)
    {  System.out.println();
    records.printRecordDetails();
    <<Assignment>>
    Due - midnight, Wednesday August 22nd
    This assignment will test your knowledge of Java programming using classes, encapsulation and javadoc.
    The base requirements
    Write a complete Java class to manage a Digital Recording Studio. The studio wants to keep a list of all Artists that use the studio and also wishes to keep track of all Recordings that have been made. An important function of the program is to calculate the time spent making a recording and charge the Artist for the time used.
    You must create at least the following classes, Start, Studio, Person, Artist, Recording, Address. You may create other classes if needed as well
    Start will contain main(), create one instance of a Studio and execute a Menu of commands to test your code. Studio should contain a studio name, an array of Artist and an array of Recording plus the studio manager (a Person). Each Artist should contain the name of the group and an Address. Each Person will have a name and a home address. Each recording will have a Title (usually song title), an Artist (only one), and a list of guestArtist (they are Artist�s but will not receive royalties) the number of the CD the recording is stored on (numbers are numerical and recordings are saved on CD-R), plus the recording start and finish times for the recording session (suggest you use Java Date class � refer to the API). An Address will contain, house number (integers only), a street name and a telephone number. There is no need to store city and country.
    To enter a set of data for testing your program � main() should call a method in the Start class that will fill in a set of values by creating objects and filling in values by calling methods in each class. This is the ONLY method allowed to be longer than 1 page long � normally we would read the data from a file but there are no O-O principles that can be learnt with simply filling in data values. It is suggested to create say at least 4 Artist�s and 6 Recordings (at least one with 1 guest Artist and one with 2 guestArtist�s)
    A menu for testing your program should be provided (it is suggested to put the Menu into a separate class as you need at least 3 menus). While other commands are possible, only the following ones will receive marks.
    Menu commands needed are
    List the Managers name, address and telephone number
    List all Artist Names
    List an Artist telephone number (a sub menu showing valid Artist�s is required)
    Show all details for one Recording ( sub menu of valid Recordings will be needed and remember there can be more than one guestArtist)
    Add a new Recording, user will need to be prompted for all details.
    List the recording costs for all Artists � show each Artist on a separate line with their name and total amount, charge for using the studio is $1000 per hour or part thereof, example for a 1 hour and 10 minute recording the Artist will be billed for 2 hours.
    List all the Recording�s one Artist has worked on (sub menu of Artists needed), the list should show whether they were the Artist or a guestArtist
    Exit program
    Use fixed sizes for arrays, suggest 20 is suitable for all arrays. Java can handle dynamic data structures (where the number of elements can grow or shrink), but that is beyond a first assignment.
    Do NOT make ANY methods static - this defeats the Object Oriented approach and will result in ZERO marks for the entire assignment.
    Data MUST be encapsulated, this means that all the data relating to an object are to be stored INSIDE an object. None of the data detail is to be globally available within your program - hence do not store Artist names in either Studio or Recordings � just store a reference instead. Do NOT create ID numbers for Artists, you should use References instead � for many students this will be the hardest part as you have to use Objects, not program in a C style to solve the problem. Note that if there are any non-private data in classes then zero will given for marks for encapsulation.
    Good programming style is expected (see web page or lecture notes). In particular, you must use javadoc to generate a set of html pages for your classes. Make sure you use the special javadoc style comments in your source code. Marks will be granted for both using javadoc and also for including sensible javadoc comments on each class and each public method.
    What to Hand In
    Read the turnin page, basically the .java files, a readme.txt to tell the marker which file the program starts from plus the javadoc (html) files. Do NOT send .class files (if you do send these we will delete them and recompile your program), do NOT compress with gtar, tar, zip or use any other tool on your files. Turnin automatically compresses all your files into a single archive for us to mark.
    The simplest way to turnin all your files is to place all files in one directory then just use the *.* wildcard to turn in all files within that one directory.
    You must turnin all files that are not part of Java 1.3. In particular, you are allowed (actually encouraged) to use EasyIn or SavitchIn but should include the one you use in the files you submit. It is STRONGLY suggested that you copy all the files into another directory, test it works there by compiling and executing then turnin files from that directory. A common problem is students adding comments at the last minute then not testing if it still compiles. The assignment will be marked as submitted � no asking later for leniency because you added comments at the last minute and failed to check if it still worked.
    If the tutors are unable to compile your submission, they will mark the source code but you will lose all the execution marks. Sorry, but it is your responsibility to test then hand in all files.
    Comments
    For CS807 students, this program should be fairly easy if it was to be programmed in C (you would use several struct). The real art here is to change over to programming objects. Data is contained in an object and is not global. This idea is essential to using Java effectively and is termed encapsulation. Instead of using function(data), you use objectName.method( ). Effectively you switch the data and functions around, the data has a method (function) attached to it, not the other way around as in C (where you have a function and send data to it).
    While there will be some marks for execution, the majority of the marks will be given for how well you write your code (including comments and documentation) and for how well you used O-O principles. Programs written in a C style with most of the code in one class or using static will receive ZERO marks regardless of how well they work.
    You are responsible for checking your turnin by reading the messages turnin responds with. Failure to read these messages will not be an acceptable excuse for submitting an incorrect assignment. About 2% of assignments sent to turnin are unreadable (usually empty) and obtain 0.
    Late submissions
    Late submissions will only be accepted with valid reasons for being late. All requests for assignment extensions must be made via email to the lecturer. Replies for acceptance or refusal will made by email. Instant replies are unrealistic (there is usually a flood of queries into my mail box around assignment due dates) and the best advice is to ask at least 4 days in advance so that you will have a reasonable chance of getting a timely reply and allow yourself enough time to submit something on time if the extension is not granted.
    ALL late submissions will be marked LAST and will NOT be sent to tutors for marking until all other assignments have been marked. As an example, if you submit late and your assignment is not yet marked by the time assignment 2 is due then it will be pushed to the end of the marking pile as the assignments that were submitted on time for assignment 2 will take priority.
    If you make a second submission after the submission date, only the first submission will be marked. We will not mark assignments twice! You can update your submission BEFORE the submission date if you need to - this will just overwrite the first submission. The latest time for a late submission is 5pm on the Wednesday after the due date. This is because, either a solution will be handed out at that lecture or details of the assignment will be discussed at the lecture. I cannot accept any assignment submissions after that time for any reason at all including medical or other valid reasons. For those who are given permission to be later than the maximum submission time � a different assignment will be handed out. Remember, if you decide to submit late you are VERY UNLIKELY to receive feedback on your assignments during semester.
    Assignments will be removed from turnin and archived elsewhere then forwarded to tutors for marking on the morning after the assignment is due. A different tutor will mark each of your assignments � do not expect the tutor you see at the tutorials to be your marker.
    Marks will be returned via email to your computer science yallara account � ideally within 2 weeks. I will send marks out when I receive them so do not send email asking where your marks are just because a friend has theirs. If you want your email forwarded to an external account, then place a valid .forward file into your yallara account. The Help Desk on level 10 can assist you in setting this up if you do not know how to do it.

    I have seen other people who have blatantly asked for
    other people to do their homework for them, but you
    are the first person I've seen to actually cut and
    paste the entire assignment as it was handed to you.
    Amazing.
    Well, unlike some of the people you're talking about, it seems like zyangfan did at least take a stab at it himself, and does have a question that is somewhat more sepcific that "please do this homework for me."
    Zyangfan,
    marendoj is right, though. Posting the entire assignment is kind of tacky. If you want to post some of it to show us what you're trying to do, please trim it down to the essential points. We don't need to see all the instructor's policies and such.
    Anyway, let me see if I understand what you're asking. You said that you know how to write the code, but only by putting it all in one class, is that right? What part about using separate classes do you not understand? Do you not know how to make code in one class aware that the other class exists? Do you not know how code in class A can call a method in class B?
    Please be a bit more specifice about what you don't understand. And at least try using multiple classes, then when you can't figure out why something doesn't work, explain what you did, and what you think should have happened, and what did happen instead.
    To get you started on the basics (and this should have been covered in your course), you write the code for two classes just like for one class. That is, for class A, you create a file A.java and compile it to A.class. For class B, you create a file B.java and compile it to B.class. Given how rudimentary you question is, we'll skip packages for now. Just put all your class files in the same directory, and don't declare packages in the .java files.
    To call a method in class B from code that's in class A, you'll need an object of class B. You instantiate a B, and then call its methods.
    public class B {
      int count;
      public B() { // constructor
      public void increment() {
        count++;
    public class A {
      public static void main(String args[]) {
        B b = new B();
        b.increment();
    }Is this what you were asking?

  • How to use Object Class:orclDbServer in OID

    Not sure if i have posted in the correct forum, I am quite new to OID
    I am planning to use orclDbServer Object Class, but not sure how to use, i have searched in Google, and Oracle Documentation, there are so little information about this, there are only:
    Object Class: orclDbServer
    Description: Defines the attributes for database service entries
    Attributes: orclNetDescName, orclVersion
    Below is the ldif file i created for add one entry with object class orclDBServer:
    dn: cn=orclDBServer_test, cn=OracleContext, dc=ldapcdc, dc=lcom
    changetype: add
    objectclass: top
    objectclass: orclDBServer
    cn: orclDBServer_test
    orclNetDescName: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=10.182.114.121)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = oh112)))
    after i use below command to add this entry:
    ldapadd -h localhost -p 389 -D "cn=orcladmin" -w welcome1 -f test_add.ldif
    then use ldapsearch to search:
    ldapsearch -h localhost -p 389 -b "dc=lcom" "objectclass=orclDBServer"
    the result is like below:
    cn=orclDBServer_test, cn=OracleContext, dc=ldapcdc, dc=lcom
    cn=orclDBServer_test
    orclnetdescname=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=10.182.114.121)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = oh112)))
    objectclass=top
    objectclass=orclDBServer
    objectclass=orclService
    It seems it added a line for me:
    objectclass=orclService
    Is there anything wrong with my ldif file when i want to use orclDbServer?
    Edited by: ening on Jan 5, 2010 9:31 PM

    Hi,
    if you are having main controller and sub-controller then you may need to use below coding to use application class reference.
    *Data declaration
      DATA:  obj_cntrl        TYPE REF TO cl_bsp_controller2,
             obj_sub_cntrl   TYPE REF TO z_cl_sub_cntl,
             application TYPE REF TO z_cl_application.
    *Get the controller
      CALL METHOD obj_main_cntrl->get_controller   "obj_main_cntrl is the object of main controller
        EXPORTING
          controller_id       = 'SUB'   "Controller ID
        RECEIVING
          controller_instance = obj_cntrl  .
      obj_sub_cntrl ?= obj_cntrl  .
      application ?= obj_sub_cntrl ->application.
    or simply use below code in your controller method.
      application ?= me->application.
    Thnaks,
    Chandra

  • SOLVED: Duplicate Emails | Received Using: Unknown | Can't Reply to Emails | BIS

    I had an issue with my Bold 9900 where I was receiving duplicate emails.  I use BIS and not BES Enterprise Server.
    The first was Received Using: [my Emai Account] as normal.  Then a duplicate email would come in marked "Received Using: Unknown".  The first email I could reply to or forward as normal.  However, the "Unknown" one I could not.  The menu option for "send" after typing a reply did not appear.
    I searched the forums and google high and low for a solution, but to no avail.  I finally broke down and called paid Blackberry Official Support and spent two weeks troubleshooting the issue.   Finally the issue was solved.
    If the solutions shown below do not solve the problem for you, then this may.  It did for me.
    http://www.blackberry.com/btsc/KB13528
    http://www.blackberry.com/btsc/KB02567
    http://www.blackberry.com/btsc/KB12207
    I had 6 email accounts.  I was using a T-Mobile SIM Card.   Then I switched providers to Telenor Sweden and my SIM.  My email accounts continued to work normally.  Then I wanted to add 4 more email accounts.  However, when I went to create the first one, I was prompted that I no longer had ANY email accounts and had to recreate all 10 from scratch.   This is when the problem started.  The 6 email accounts I had originally set up were the ones receiving the duplicate emails.  The 4 new ones were behaving normally. 
    I tried all the usual fixes like deleting the accounts, deleting the service books, but to no avail.  I was not using any gmail or yahoo accounts or aliases.  I was not using Blackberry Enterprise Server.   So most of the solutions posted in the forums and knowledge base did not apply to me.
    When I called Blackberry Support, the representative asked if I had 6 email accounts.  I said no, I have 10 email accounts.  He then pulled up a separate system where he saw the 10 accounts.   The original 6 in one system, and the new 10 in another system.  It seems that the original 6 were not deleted out of the BIS system when I recreated them.  So they were still left there but without a service book attached to them because the service books were all attached to the 10 new ones.   Ultimately, the representative deleted the previous 6 email accounts from the BIS system manually, and then my problem was solved.   It seems that T-Mobile was still holding these accounts hostage and did not properly release them when they were recreated with Telenor.   So when an email came, the Telenor service book gave me a normal email, but the T-Mobile account gave me an Unknown because there was no service book attached to it - it existed only on the BIS, not on my Blackberry.
    I noted that this problem with T-Mobile had been reported on a couple other forums but they were able to log into their  T-Mobile account and solve the issue by deleting the email accounts from the T-Mobile system or by changing the passwords on the email accounts so that it didn't recognize them.  I no longer had any of my account information so I couldn't log into T-Mobile, and I had 10 accounts so didn't want to change all the passwords.  But Blackberry ultimately solved the problem for me.  I just wanted to share in case anyone else was as frustrated by this as I was.
    http://supportforums.blackberry.com/t5/BlackBerry-​Bold/Help-Duplicate-E-mail-new-issue-I-have-search​...
    If you ever have to call Blackberry to have them manually resolve this issue for you, give them ticket #27710221 to reference the solution.

    Hmmm, wouldn't think the Modem would make difference on that though!?
    Couple more things to try...
    In your home folder, try trashing this folder...
    Quit mail 1st.
    /Library/Caches/Mail
    reboot.
    http://www.hawkwings.net/2006/02/08/rebuild-your-database-and-speed-up-mailapp/

  • Is it safe to collect credit card information from donors using a fillable emailable form?

    I work for a nonprofit and would like to create a fillable pledge form that we would email to current donors.  Our pledge form (which is currently sent and recieved by mail) gives them the opportunity to say how much they'd like to donate and exactly how it should be done (check, credit card, installments, payroll deduction etc).   I know how to create the form and how to put an email / print button on the form.  What I can't seem to find on any threads is an answer regarding how safe the collected information that is EMAILED back to us would be.   Would we be putting our donors at risk by collecting that kind of data via email?  If so is there a way to make it safe - and that doesn't make it complicated for our less tech-savvy friends? Would there be any safety difference between creating the form using LiveCycle vs using the pdf form wizard?
    Any advice would be much appreciated.

    As you are using email as the vehichle for delivery the question isn't how safe is the form ...it is how safe is the email system that is being used.
    The form itself will be a PDF so by virtue of that anyone can open it (unless you employ an encryption strategy but that woudl be a nuisance to your clients). You coudl employ a password to open the PDF but again that is a nuisance for your clients. So secure email might be the easiest way.
    Normally this is done by posting the form to a web server using https protocols (secure and encypted) and not through email.
    Paul

  • Communication across different subnets using DatagramSocket class

    Hi All
    I've written a simple client-server program to send broadcast messages across the network and receive them back after some processing. The problem is that the messages sent by the program are not received across the subnets i.e. my program broadcasts messages only on the one subnet. I am using DatagramSocket class. Is there any way to communicate across the subnets using DatagramSocket class or will I've to use the some other class like MulticastSocket?
    Thanks in advance
    Neeraj

    neejain wrote:
    The problem is that the messages sent by the program are not received across the subnets
    Your router/gateway is probably set up to drop udp. This is usually done by network administrators to prevent things like broadcast storms across large networks. If you have admin access to the router, you should be able to change it to allow routing of udp.
    God bless,
    -Toby Reyelts

  • Uploading bitmapData using FileReference class ?

    Hi gurus ;)
    Question nr 1.
    Is it possibly to upload bitmapData to server using
    FileReference class ? How should i approach this issue, is there
    any ready classes available for this purpose. I'm generating
    bitmaps inside my Flash/Flex App and need to store them under users
    profile in server.
    Question nr 2.
    Can i upload files from remote server to another using
    FileReference class
    e.g Somehow like :
    uploadURL = new URLRequest();
    uploadURL.url = "
    http://www.[yourDomain
    fileURL.url = "
    http://www.myLocation.com/myfile.JPG";
    file = new FileReference(fileURL.url);
    file.upload(uploadURL);
    This is just an idea, sure not working ;)
    Any ideas are helpful
    Thx
    iquaaani

    I did a small application that uploads a file to the server
    every hour. If the server response that a login is required to
    upload the file, it goes to a login page to do the login and
    retried to upload the file.
    I got the server response in order to know if the file did
    upload correctly or not (I have to send more form data than just
    the file). I didn't try the mime type since it's not relevant for
    my application and usualy this information is not very trust worthy
    anyways.
    I'm not sure what you mean with exceptions, if you are
    referring to HTTP errors, I think there is an event for that, but I
    used the IOError event for this, and it seems to work good
    also.

  • Customizing FD01 and FB70 using PS Class and Characteristics

    Hello SAP Experts
    I have the following issue:
    My client has a requirement where we need to customize the Customer Master  (FD01) screen and the Invoice Posting Screen (FB70). A few additional fields have to be added by creating a separate tab. I was intending to take Abaper's help and do this using user exits but I have been suggested by the cleint to use SAP PS Class and Characteristics feature to do this. Can someone please throw some light on this feature and how can i create custom fields on FD01 and FB70 screens. Is there a way we could customize these screens using PS class and characteristics. Your opinions would be much appreciated.
    Please kindly give your suggestions. Thanks in advance
    Regards,
    Nik

    Joao Paulo,
    Thank you for the response. I have tried to obtain some info from OSS but no luck. Tried all means but there is limited information available.
    Nik

  • How to use application class reference in the controller methods of BSP

    Hi,
    I have created a bsp application and also created an application class and assigned it to the application class. In the application class, I have created attribute TEXT type string(public and instance parameter).
    In the controller let's say main.do, I am trying to give a value to to the text by adding the following code.
    application->text = 'test'.
    I am getting syntax error saying field 'text' is unknown. It is not contained in one of the specified tables nor defined by DATA statement. 
    Please can someone let me know how to use the application class in the coding with an example. I couldn't find how exactly this has to be reference. Please help.
    Best regards
    Siva

    Hi,
    if you are having main controller and sub-controller then you may need to use below coding to use application class reference.
    *Data declaration
      DATA:  obj_cntrl        TYPE REF TO cl_bsp_controller2,
             obj_sub_cntrl   TYPE REF TO z_cl_sub_cntl,
             application TYPE REF TO z_cl_application.
    *Get the controller
      CALL METHOD obj_main_cntrl->get_controller   "obj_main_cntrl is the object of main controller
        EXPORTING
          controller_id       = 'SUB'   "Controller ID
        RECEIVING
          controller_instance = obj_cntrl  .
      obj_sub_cntrl ?= obj_cntrl  .
      application ?= obj_sub_cntrl ->application.
    or simply use below code in your controller method.
      application ?= me->application.
    Thnaks,
    Chandra

  • How can I make server use single class loader for several applications

    I have several web/ejb applications. These applications use some common libraries and should share instances of classes from those libraries.
    But applications are being deployed independently thus packaging all them to EAR is not acceptable.
    I suppose the problem is that each application uses separate class loader.
    How can I make AS use single class loader for a set of applications?
    Different applications depend on different libraries so I need a way that will not share library for all applications on the domain but only for some exact applications.
    When I placed common jar to *%domain%/lib* - all works. But that jar is shared between all applications on the domain.
    When I tried to place common jar to *%domain%/lib/applibs* and specified --libraries* attribute on deploying I got exception
    java.lang.ClassCastException: a.FirstDao cannot be cast to a.FirstDaoHere http://download.oracle.com/docs/cd/E19879-01/820-4336/6nfqd2b1t/index.html I read:
    If multiple applications or modules refer to the same libraries, classes in those libraries are automatically shared.
    This can reduce the memory footprint and allow sharing of static information.Does it mean that classes should be able to be casted ?

    You didn't specify which version of the application server you are using, but the config is similar as long as you know what to look for. Basically, you need to change the classloader delegation. Here's how it is done in 8.2
    http://download.oracle.com/docs/cd/E19830-01/819-4721/beagb/index.html

  • Creation of Disctribution Model view using Distribution using object classe

    Hi All ,
             Can anybody tell me how to create distribution model through  Distribution using object classes option in SALE transaction(Path : SALE - > Modelling and implementing Business processes - > master data Distribution - > Distribution using object classes).What is the difference between normal distribution model creation through BD64 and creating in the above way?
    Please help me its urgent.Thanks in advance.
    Regards,
    Rakesh.

    Hi All ,
             Can anybody tell me how to create distribution model through  Distribution using object classes option in SALE transaction(Path : SALE - > Modelling and implementing Business processes - > master data Distribution - > Distribution using object classes).What is the difference between normal distribution model creation through BD64 and creating in the above way?
    Please help me its urgent.Thanks in advance.
    Regards,
    Rakesh.

  • How to calculate the number of sent/received emails of a certain domain

    Thank you for what you have helped me with!
    How to calculate the number of sent/received emails of a certain domain in a certain period? It is Messaging Server 5.2, Directory Server 4.2. Is there a log option for this?
    Thank you.

    Not sure where you find, "LOG_MESSSAGE_ADD". I don't actually find this option in the documentation.
    The domains that mails are coming from and being sent to are certainly logged in the normal mail.log, so why mess with additional logging options? If you're talking about "LOG_CONNECTION", I actually see no additional data that is useful to you.
    If you decide to change the option.dat, you do indeed need to
    imsimta cnbuild (note, it's not cnrebuild)
    imsimta restart
    If I were facing the same issue, I'd be looking at the log parsing perl script, and simply modifying it to do what I wanted.

  • Using normal classes in a JSP

    I have written a library of classes for use in a standard application. In a completely separate project I need to use these classes in a JSP page. Under %tomcat/webapps/myproject is the JSP file. Where do I place the "normal" class files and how do I reference them in the JSP page? Do I need to import them or add them to the classpath and should they be pre-compiled ?
    All help most appreciated
    Thanks
    Bob

    Where do I place the "normal" class files and how do
    I reference them in the JSP page?Just like you use any other class in a JSP.
    Do I need to import them or add them to the classpath and should they be pre-compiled ?Yes, yes and yes. The first thing is something you need to do for your stuff to compile (technically, you don't need to do it, but it's better than always using the fully qualified class names in the code). The second is something the servlet container will do for you when you deploy your WAR. The this is something you need to do with classes anyway. You don't need to do it for JSPs because the container will do it later, but that's all the difference there is.

Maybe you are looking for

  • 5.1 mix broken in CC 2014.2 (V8.1)?

    Has anybody experienced the same with the most recent version of Premiere (V8.1)? The audio hardware only shows L/R but I certainly can send something out to front L/R and center. The same applies for Windows WDM setup. Only two channels show up but

  • Request dispatcher null

              The forward code we have is like           public void forward(String url, HttpServletRequest request,           HttpServletResponse response)           throws ServletException, IOException           RequestDispatcher dispatcher = getServle

  • Configuration Wizard-NW:BI-AS ABAP(Connectivity of BI and Source System): M

    Hi friends, I´m configuring the (NW: BI - AS ABAP (Connectivity of BI and Source System): Maintain) in NWA using Configuration Wizard. But there is the error in step (NW: BI - AS ABAP (Connectivity of BI and Source System): Maintain > Scenario UI: NW

  • Sync SmartGroups to iPhone script

    I need to sync SmartGroups to the iPhone but only regular groups are synced, so I thought about having a script that copies all contacts from a SmartGroup to a group everyday at 22:00. (Deleting every contact from the target group before if it exists

  • Cannot open map file / CXXFLAGS

    I've been trying to compile a program, and all seems to work well until i get the following error after a while. +/opt/sun/sunstudioceres/prod/lib/ld: cannot open map file -R/opt/sun/sunstudioceres/lib/rw7:/opt/sun/sunstudioceres/lib:/opt/sun/sunstud