RemoteObject does not making a cast to the correct type

Hello

I have a Flex/Java project which has 47 of DTO Java and ActionScript 47 VO all, except one of them classified can be passed between flex and java with a problem. I see no significant difference between the problem classes and others. I get this error message: flex.messaging.io.amf.ASObject cannot be cast to com.fujitsu.ad.services.db.dto.UserRole. I note during debugging in java, objects that were received from flex are of type ASObject and Flex side objects that were on a pass from java were of type Object. I've included the two class below in the hope that someone migt be able to see something obvious.

Thank you

JJ

package

com Fujitsu.ad.services.db.VO

{

Import mx.utils.ObjectUtil;

[

Bindable ]

[RemoteClass(alias=)

"com.fujitsu.ad.services.db.dto.UserRole" )]

public class UserRole

{

public var : number;

public var name: String;

public var description: String;

public function UserRole()

{

}

public function clone(): UserRole

{

return ObjectUtil.copy ( this ( ) as Role of the ;

}

}

}

/**
* Copyright (c) 2010 Fujitsu Services Ltd.
*/
package com.fujitsu.ad.services.db.dto;

/**
The class applying.
*/
public class UserRole implements java.io.Serializable {}

/**
* serialVersionUID.
*/
private static final long serialVersionUID = 1 L;

/ * The ID. */
Private long id;

/ * The name. */
private String name;

/ * Description. */
description of the private channel;

/**
* Instantiates a new application.
*/
public UserRole() {}
}

/**
* Gets the ID.
*
* @return id
*/
{} public long getId()
return this.id;
}

/**
* Sets the id.
*
@param the new ID.
*/
public void setId (long id) {}
This.ID = id;
}

/**
* Gets the name.
*
* @return name
*/
public String getName() {}
Return myIdName;
}

/**
* Sets the name.
*
@param name new name
*/
public void setName (String name) {}
myIdName = name;
}

/**
* Gets the description.
*
* @return description
*/
public String getDescription() {}
return description;
}

/**
* Sets the description.
*
@param description description
*/
{} public void setDescription (description of the chain)
This.Description = description;
}

/**
* @see java.lang.Object #hashCode ().
* @return the hash code
*/
@Override
public int hashCode() {}
first final int = 31;
int result = 1;
first = result * result + (int) (id ^ (id > > > 32));
return the result;
}

/**
* @see java.lang.Object #equals (java.lang.Object).
@param obj
* @return true or false
*/
@Override
public boolean equals (Object obj) {}
If (this == obj) {}
Returns true;
}

If (obj == null) {}
Returns false;
}

{If (getClass()! = {obj.getClass ())}
Returns false;
}

UserRole final another obj = (UserRole);

If (id! = other.id) {}
Returns false;
}
Returns true;
}

}

Sometimes you meet it because the class has not been added to your swf file when it was compiled (because there no reference in the code!)

If you don't know that everything seems wise good code, try to add a reference to the class (in Flex) that is not strongly typed something like this:

role: UserRole var = object as UserRole;  (with the usual import, in fact just the import statement can be enough)

(Make sure to place it in a class that is certainly used, not the VO itself.)

Tags: Flex

Similar Questions

  • Media encode more than 7.0 does not recongnise SD images with the correct format of the pixels

    Hello

    I logged this bug with Adobe last year, but even through the last versions else bug and is a real problem for everyone editing in SD via first Pro CC.

    Effectvely when you create a PAL in sequence to breast of first Pro CC using SD 720 x 576 pixels (4:3) you have 2 options to export, the queue or export. If you export the images directly from the application of PP in MPEG2 SD, then the resulting files are perfect, however if you use the option queue and send to Media Encoder then the resulting files are misinterpreted and subsequently file looks like crushed. I suspect that the Media Encoder is defaulting to square pixels and not 1.09xx which is the default for PAL 4:3 SD

    The issue only began on Media Encoder version 7.1 but I also checked 7.2 and it still has the bug.

    I can't believe that's not making a lot of people and its takes so long to solve. Adobe at the time acknowledged the problem but did not provide a time scale to repair.

    If anyone has the words of wisdom, I'd love to hear from you. Maybe I'm missing a simple workaround solution? That could be just export and NO queue, but because I use the batch function a lot is not always viable.

    Thank you


    Steve

    And I already have a workaround for this one:

    1. open the preferences of SOUL

    2. turn off the power "import of the sequences in native mode.

    I don't know yet why the native path is ruin, but this will get you fixed up without having to re - interpret each source file.

    Tom

  • In Outlook Express, when I type in the first letter of an e-mail address that is in my contacts, the dropdown does not close when I click the right address.

    Original title:

    Under XP, when I type in the first letter of an e-mail address that is in my contacts, the dropdown does not close when I click the right address. What a nuisance! Also, when I go to create a new e-mail message, an address of my contacts appears in no particular place, making it impossible to complete the message.

    Hello

    I suggest you turn off Auto complete and then check if you face the same problem.

    a. open Outlook Express.

    b. click on Tools.

    c. click on Options.

    d. click the send tab.

    e. uncheck the e-mail address automatically complete when composing box.

    f. click OK.

    Turn Auto complete and test again to see if the behavior is better. To activate it again, follow the same steps as above, but put a check mark in the box.

  • Time Machine does not work after update of the Sierra

    The time function machine my Mackbook Air 2011 stopped working... it has not been saved since update for Sierra, it only take screenshots every hour, it will perform a backup is no longer on my external HD as before.

    There is no problem with the way it is implemented or the hard drive, it's me that my iMac is working perfectly since the update for Sierra and it's backup via the time machine on the same hard disk.

    It is a hard drive and put in place I was in use for about 5 years with no problems.

    Also since the update for Sierra I noticed that my MacBook Air gets hot and the fans go wild, although there was nothing or performance other than the system is auto.

    I lost the use of my built in camera after the update to El Capitan, and now I've lost the use of time machine... I was wondering if I should go back to Yosemite that everything worked well then!... is this possible?

    Thanks for any help with this!

    Update:-just so you know, time machine is to find the back up ok drive (external hard drive), it then goes to "preparing backup" and that's all, he remains in this preparation save the scene for centuries, after a while it just stops and it is saved all... nothing!

    Also noticed when I checked in Time Machine full backup I have before update for Sierra disappeared, he disappeared, been deleted... I don't know what is happening with it!

    Overall since the update for Sierra my MacBook Air did not work properly, in addition to all that Safari does not load, just to get the wheel spinning, and now (with the demise of my old back ups) it seems I can't go back to a previous state.

    My Mackbook Air took it!... the last update took the camera and really Sierra in... material not compatible with all new software, none of the new features work on my iMac or MacBook Air (only Siri), so a useless upgrade for me really, wish I didn't!

  • Why the highlighting of text in a PDF document does not work after you save the file

    Why the highlighting of text in a PDF document does not work after you save the file

    What application you use to highlight?

  • IPod 160 GB abruptly stopped, the search results display when connected to a PC. If any song name is typed into the search, it does not display this song while the song is in the Ipod.

    IPod 160 GB suddenly stopped, view the results of a search when it is connected to a PC. If any song name is typed into the search, it does not display this song while the song is in the Ipod. Simply, it displays "no record found".

    Click the magnifying glass in the search box and make sure the entire library search is not checked.

    TT2

  • Firefox crashes constantly. I have restart firefox. It does not work. I restart the pc and then reopen firefox. It's still freezing?

    Can anyone suggest a better browser than firefox?
    I'm pretty tired of my browser gel every day. I have restart firefox. It does not work.
    I restart the pc and re-open the browser. It does not work.
    I have uninstall Add ons does not help.
    I just can't keep every day. I show that firefox is updated. 34.0.5

    You can try disabling OMTC and leave hardware acceleration in active Firefox.

    • topic: config page: layers.offmainthreadcomposition.enabled = false

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

    Create a new profile as a test to see if your profile is the source of the problem.

    See "create a profile":

    If the new profile works then you can transfer files from a profile already used in the new profile, but be careful not to copy files corrupted to avoid transporting more problems.

  • Since the upgrade of my new tab does not work, I press on the + icon and nothing

    Since the upgrade of my new tab does not work, I press on the + icon and nothing

    Try Firefox Safe mode to see if the problem goes away. Firefox Safe mode is a troubleshooting mode that disables certain parameters, disables most Add-ons (extensions and themes).

    If Firefox is open, you can restart Firefox Safe mode in the Help menu:

    • In Firefox 29,0 and above, click on the menu button

      click Help

      then select restart with disabled modules.

    • In previous versions of Firefox, click on the Firefox button in the upper left of the Firefox window and click help (or click on help in the Menu bar, if you do not have a Firefox button) and click on restart with disabled modules.

    If Firefox is not running, you can start Firefox in Mode safe mode as follows:

    • On Windows: Hold down the SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • On Mac: Hold the option key during the startup of Firefox.
    • On Linux: Exit Firefox, go to your Terminal and run firefox-safe-mode
      (you may need to specify the installation path of Firefox for example/usr/lib/firefox)

    When the Firefox Safe Mode window appears, select "start mode safe."

    If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. Please follow the section Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems to find the cause.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

    When find you what is causing your problems, please let us know. This might help others with the same problem.

  • Firefox does not open, but is rather the error message "Unable to read the configuration file." He has worked in the past, but not now.

    Firefox does not open, but is rather the error message "Unable to read the configuration file." He has worked in the past, but not now.

    I REINSTALL 10 TIMES SO DON'T TELL ME THAT!
    I'm piss because I need firefox work again, so I can finish my reseaching in 5 days.


  • I just recently upgraded to OS El Capitan.  Now, none of my movies to quicktime does not work.  I have the old version of Quick time 7 and it does not work either.  They do not convert.  Help?

    I just recently upgraded to OS El Capitan.  Now, none of my movies to quicktime does not work.  I have the old version of Quick time 7 and it does not work either.  They do not convert.  Help?

    VLC will play them?

    http://www.videolan.org/

  • Yahoo page does not work. It seems that java does not work, but I have the latest version installed. Yahoo email page has all scrambled together all left links

    Yahoo page does not work. It seems that java does not work, but I have the latest version installed. Yahoo email page has all the links scrambled together on the left side of the page. Same thing with face book page. All use them to work properly. 64 Waterfox win 7

    Do not use waterfox, it is not supported and is a non-official version of Firefox that often has known bugs. Downlaod Firefox from www.getfirefox.com, uninstall waterfox, then try again.

  • I want to record with < alt > < s > in the Exact program online. This function does not work. This is the first time I use this program with firefox.

    Question
    I want to record with < alt > < s > in the Exact program online. This function does not work. This is the first time I use this program with firefox.

    edit, escaped mod < s > in order to avoid the line through question

    A web page can be defined a "accesskey" for an item. Unlike IE/Chrome/Safari, who use the Alt key only, Firefox requires pressing Alt and Shift to activate the element. In other words, try

    ALT + SHIFT + S

    and see if it works.

    I don't know of any way to change this so that the change is not necessary. There may be an add-on?

  • Key on the keyboard does not work in firefox box when you type in the web site, but it works everywhere else?

    Key on the keyboard does not work in firefox box when you type in the web site, but it works everywhere else?

    Try Firefox SafeMode to see how it works there.

    A way of solving problems, which disables most of the modules.

    (If you use it, switch to the default theme).

    • You can open the mode without failure of Firefox 4.0 + by pressing the SHIFT key when you use the desktop Firefox or shortcut in the start menu.
    • Or use the Help menu option, click restart with the disabled... modules while Firefox is running.

    Do not choose anything at the moment, just use 'continue in safe mode.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before using the shortcut of Firefox (without the Shift key) to open it again.

    If it's good in Firefox Safe mode, your problem is probably caused by an extension, and you need to understand that one.

    http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+themes

    Can be caused by an add-on to the AVG.

    When find you what is causing that, please let us know. It might help others who have this problem.

  • The slider side does not move when I put the mouse on it, I need to click below or on the arrow down. Once he left the first place, it moves. Also some applications like changing the city the weather button won't change.

    The slider side does not move when I put the mouse on it, I need to click below or on the arrow down. Once he left the first place, it moves. Also some applications like changing the city the weather button won't change.

    The extension of the Yahoo! toolbar and the extension of Babylon have been reported to cause a problem like that. Disable or uninstall the modules.

       * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    
  • I have Firefox 5 and Reminderfox. But Reminderfox does not appear. What is the problem?

    I have Firefox 5 and Reminderfox. But Reminderfox does not appear. What is the problem?

    You probably Fox reminder set to display in your status bar which is no more. RF options have lots of display options, or you can restore your status by an extension bar-

    https://addons.Mozilla.org/en-us/Firefox/addon/status-4-EVAR/?src=API

Maybe you are looking for