The method clone() from the type Object is not visible

Hi,
This is my 1st post here for a few years, i have just returned to java.
I am working through a java gaming book, and the "The method clone() from the type Object is not visible" appears, preventing the program from running. I understand "clone" as making a new copy of an object, allowing multiple different copies to be made.
The error occurs here
public Object clone() {
        // use reflection to create the correct subclass
        Constructor constructor = getClass().getConstructors()[0];
        try {
            return constructor.newInstance(new Object[] {
                (Animation)left.clone(),
                (Animation)right.clone(),
                (Animation)deadLeft.clone(),
                (Animation)deadRight.clone()
        catch (Exception ex) {
            // should never happen
            ex.printStackTrace();
            return null;
    }The whole code for this class is here
package tilegame.sprites;
import java.lang.reflect.Constructor;
import graphics.*;
    A Creature is a Sprite that is affected by gravity and can
    die. It has four Animations: moving left, moving right,
    dying on the left, and dying on the right.
public abstract class Creature extends Sprite {
        Amount of time to go from STATE_DYING to STATE_DEAD.
    private static final int DIE_TIME = 1000;
    public static final int STATE_NORMAL = 0;
    public static final int STATE_DYING = 1;
    public static final int STATE_DEAD = 2;
    private Animation left;
    private Animation right;
    private Animation deadLeft;
    private Animation deadRight;
    private int state;
    private long stateTime;
        Creates a new Creature with the specified Animations.
    public Creature(Animation left, Animation right,
        Animation deadLeft, Animation deadRight)
        super(right);
        this.left = left;
        this.right = right;
        this.deadLeft = deadLeft;
        this.deadRight = deadRight;
        state = STATE_NORMAL;
    public Object clone() {
        // use reflection to create the correct subclass
        Constructor constructor = getClass().getConstructors()[0];
        try {
            return constructor.newInstance(new Object[] {
                (Animation)left.clone(),
                (Animation)right.clone(),
                (Animation)deadLeft.clone(),
                (Animation)deadRight.clone()
        catch (Exception ex) {
            // should never happen
            ex.printStackTrace();
            return null;
        Gets the maximum speed of this Creature.
    public float getMaxSpeed() {
        return 0;
        Wakes up the creature when the Creature first appears
        on screen. Normally, the creature starts moving left.
    public void wakeUp() {
        if (getState() == STATE_NORMAL && getVelocityX() == 0) {
            setVelocityX(-getMaxSpeed());
        Gets the state of this Creature. The state is either
        STATE_NORMAL, STATE_DYING, or STATE_DEAD.
    public int getState() {
        return state;
        Sets the state of this Creature to STATE_NORMAL,
        STATE_DYING, or STATE_DEAD.
    public void setState(int state) {
        if (this.state != state) {
            this.state = state;
            stateTime = 0;
            if (state == STATE_DYING) {
                setVelocityX(0);
                setVelocityY(0);
        Checks if this creature is alive.
    public boolean isAlive() {
        return (state == STATE_NORMAL);
        Checks if this creature is flying.
    public boolean isFlying() {
        return false;
        Called before update() if the creature collided with a
        tile horizontally.
    public void collideHorizontal() {
        setVelocityX(-getVelocityX());
        Called before update() if the creature collided with a
        tile vertically.
    public void collideVertical() {
        setVelocityY(0);
        Updates the animaton for this creature.
    public void update(long elapsedTime) {
        // select the correct Animation
        Animation newAnim = anim;
        if (getVelocityX() < 0) {
            newAnim = left;
        else if (getVelocityX() > 0) {
            newAnim = right;
        if (state == STATE_DYING && newAnim == left) {
            newAnim = deadLeft;
        else if (state == STATE_DYING && newAnim == right) {
            newAnim = deadRight;
        // update the Animation
        if (anim != newAnim) {
            anim = newAnim;
            anim.start();
        else {
            anim.update(elapsedTime);
        // update to "dead" state
        stateTime += elapsedTime;
        if (state == STATE_DYING && stateTime >= DIE_TIME) {
            setState(STATE_DEAD);
}Any advice? Is it "protected"? Is the code out-of-date?
thankyou,
Lance 28

Lance28 wrote:
Any advice? Is it "protected"? Is the code out-of-date?Welcome to the wonderful world of Cloneable. In answer to your first question: Object's clone() method is protected.
A quote from Josh Bloch's "Effective Java" (Item 10):
"A class that implements Cloneable is expected to provide a properly functioning public clone() method. It is not, in general, possible to do so unless +all+ of the class's superclasses provide a well-behaved clone implementation, whether public or protected."
One way to check that would be to see if super.clone() works. Their method uses reflection to try and construct a valid Creature, but it relies on Animation's clone() method, which itself may be faulty. Bloch suggests the following pattern:public Object clone() throws CloneNotSupportedException {
   ThisClass copy = (ThisClass) super.clone();
   // do any additional initialization required...
   return copy
if that doesn't work, you +may+ be out of luck.
Another thing to note is that Object's clone() method returns a +shallow+ copy of the original object. If it contains any data structures (eg, Collections or arrays) that point to other objects, you may find that your cloned object is now sharing those with the original.
Good luck.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Searching for the methods applied to each type of object....

    Hi everybody...
    I want to find all the methods applied to each type of object in Swing/AWT java application.....
    for example in a text filed , there is
    jTextField1.setText('test')...
    in a combo box , there is
    jComboBox1.addItem("4")....
    Where can I find all which can be applied...????
    There is a url in on-line help
    http://java.sun.com/products/jfc/tsc/articles/component_gallery/
    which is invalid.....
    Thanks , a lot
    Simon

    Simon,
    all properties you see in the property palette are method calls in the code. So for a quick glance this will do it. Beside of this, there are books out there - e.g. from O'Reilly - that cover all components. If this isn't enough, you can get the JavaDocs from the SUN website
    Frank

  • Is there a way to get the correct order from the dependent types of a sche

    Hi ,
    I have a CT facing the following problem:
    When trying to built a SQL script to create all the object types within a schema using the DBMS_METADATA packages.
    Did insert in a table the names of the types that will be exported following a concrete order, next loop into the table and call the DBMS_METADATA package for each row.
    These type are depedent between them, there are some type attributes calling other types and here the issue
    First : try to generate the order by created column of dba_objects and when the generated SQL script is launched a lot of type appearing as incomplete state due to the order isn't correct.
    Second : try to insert the table ordering by object_id colums of dba_tables view, it appears incomplete types too.
    Currently want to insert the table using a recursive query with connect by against the dba_type_attrs starting with the rows when ATTR_TYPE_NAME is not null (the types that are called by other types), but this way has a issue dificult to resolve: the roots of hierarchy are the rows when ATTR_TYPE_NAME is not null and we've dependencies between roots nodes
    The question is is there a way to get the correct order from the dependent types of a schema?
    Platform: IBM SP AIX
    DB version: 9.2.0.7
    Any help will be appreciated .
    Thanks in advance.

    The xxx_dependencies view should give you the dependencies betwee nthe various types. I would look at something along the lines of:
    SELECT object_name, referenced_name
    FROM (SELECT o.object_name, d.referenced_name
          FROM user_objects o, user_dependencies d
          WHERE o.object_name = d.name(+) and
                o.object_type = d.type(+) and
                d.referenced_type(+) = 'TYPE' and
                o.object_type = 'TYPE')
    START WITH referenced_name IS NULL
    CONNECT BY PRIOR object_name = referenced_nameThe outer join between user_objects and user_dependencies is required to generate the names of types which are not dependent on other types, or do not have other types dependent on them.
    HTH
    John

  • 2013 Exchange, Can't connect to Exchange Management Shell. It cannot determine the content type of the HTTP response from the destination computer.

    The following error occurs.
             Welcome to the Exchange Management Shell!
    Full list of cmdlets: Get-Command
    Only Exchange cmdlets: Get-ExCommand
    Cmdlets that match a specific string: Help *<string>*
    Get general help: Help
    Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
    Show quick reference guide: QuickRef
    Exchange team blog: Get-ExBlog
    Show full output for a command: <command> | Format-List
    Tip of the day #0:
    Did you know that the Identity parameter is a "positional parameter"? That means you can use:
     Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
    It's a neat usability shortcut!
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
    At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
    +     $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.: mail1.dorothy.local
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Randy Cheek

    Good Morning,
    Log into the server with an account that has appropriate Exchange rights, not a local account.  
    Note: By default - Domain Admins don't have Exchange rights.
    Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
    My Technical Blog: http://thelifestrategist.wordpress.com
    Discipline is the Difference between Goals and Accomplishments
    If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer"

  • The value returned from the load function is not of type numeric  errors after migration to Coldfusion 11

    I am currently testing our website with CF11. It is currently working with CF8 however after migrating it to a new server running CF11 I have encountered the following error.
    The value returned from the load function is not of type numeric.
    The error occurred in
    D:/Applications/CFusion/CustomTags/nec/com/objects/address.cfc: line 263
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/contact.cfc: line 331
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 510
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 1675
    Called from D:/website/NECPhase2/action.validate.cfm: line 54
    261 : <cfif isNumeric(get.idCountry)>
    262 : <cfset rc = this.objCountry.setID(get.idCountry)>
    263 : <cfset rc = this.objCountry.load()>
    264 : </cfif>
    265 : <cfset this.sPostcode = get.sPostcode>
    Have there been any changes between CF8 and CF11 that could  cause this error?
    Does anyone have ideas?

    This is the code in file object file country.cfc (nec.com.objects.country):
    <cfcomponent displayname="Country object" hint="This is a Country object, it allows you to access and set values in the Country.">
    <!---
    // Construct this object
    --->
    <cfset this.objFunctions = CreateObject( 'component', 'nec.com.system.functions' )>
    <cfscript>
      this.idCountryID = 0;
      this.sCountryName = "";
      this.sISOCode = "";
      this.sDHLCode = "";
      this.iErrorID = "";
    </cfscript>
    <!---
    // The following functions are the setters and getters. offering us a better way to get
    // at the contents of the object
    --->
    <!---
    // Getters
    --->
    <cffunction name="getID" displayname="Get ID" returntype="numeric" output="false" hint="This returns the ID of the current item.">
      <cfreturn this.idCountryID>
    </cffunction>
    <cffunction name="getsCountryName" displayname="Get sCountryName" returntype="string" output="false" hint="This gets the sCountryName value of this item.">
      <cfreturn this.sCountryName>
    </cffunction>
    <cffunction name="getsISOCode" displayname="Get sISOCode" returntype="string" output="false" hint="This gets the sISOCode value of this item.">
      <cfreturn this.sISOCode>
    </cffunction>
    <cffunction name="getsDHLCode" displayname="Get sDHLCode" returntype="string" output="false" hint="This gets the sDHLCode value of this item.">
      <cfreturn this.sDHLCode>
    </cffunction>
    <cffunction name="iError" displayname="Get iError" returntype="numeric" output="false" hint="This returns the iError of the current item.">
      <cfreturn this.iError>
    </cffunction>
    <!---
    // Setters
    --->
    <cffunction name="setID" displayname="Set ID" returntype="boolean" output="false" hint="This sets the ID value of this item.">
      <cfargument name="idCountryID" required="true" type="numeric" displayname="ID" hint="The ID to use.">
      <cfset this.idCountryID = arguments.idCountryID>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsCountryName" displayname="Set sCountryName" returntype="boolean" output="false" hint="This sets the sCountryName value of this item.">
      <cfargument name="sCountryName" required="true" type="string" displayname="sCountryName" hint="The sCountryName to use.">
      <cfset this.sCountryName = arguments.sCountryName>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsISOCode" displayname="Set sISOCode" returntype="boolean" output="false" hint="This sets the sISOCode value of this item.">
      <cfargument name="sISOCode" required="true" type="string" displayname="sISOCode" hint="The sISOCode to use.">
      <cfset this.sISOCode = arguments.sISOCode>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsDHLCode" displayname="Set sDHLCode" returntype="boolean" output="false" hint="This sets the sDHLCode value of this item.">
      <cfargument name="sDHLCode" required="true" type="string" displayname="sDHLCode" hint="The sDHLCode to use.">
      <cfset this.sDHLCode = arguments.sDHLCode>
      <cfreturn true>
    </cffunction>
    <!---
    // Clear, to empty out the contents of this object
    --->
    <cffunction name="clear" displayname="Clear items Details" returntype="boolean" output="false" hint="Clears out all of the items details.">
      <cfscript>
       this.sCountryName = "";
       this.sISOCode = "";
       this.sDHLCode = "";
       this.iErrorID = "";
      </cfscript>
      <cfreturn true>
    </cffunction>
    <!---
    // The following functions deal with the load, save and deleting of objects
    --->
    <!---
    // Load
    --->
    <cffunction name="load" displayname="Load items details" returntype="numeric" output="false" hint="This loads in all the information about an item.">
      <cfset rc = this.clear()>
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Check to see if it exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("load: checkID: '#this.idCountryID#' #cfcatch.detail#");
        </cfscript>
        <cfset this.iErrorID = iErrorID>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif not checkID.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         if(isDefined("session.afr")){
          whichOne = "#session.afr.getsAFRNumber()#";
         } else {
          whichOne = "";
         iErrorID = objError.addError("A Country with that id doesn't exists.[#this.idCountryID#][#whichOne#]");
        </cfscript>
       <cfset this.iErrorID = iErrorID>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // If we got past all then then load in the details
      --->
      <cftry>
       <cfquery name="get" datasource="#sDatasource#">
        SELECT idCountryID, RTRIM(sCountryName) as sCountryName, RTRIM(sISOCode) as sISOCode, RTRIM(sDHLCode) as sDHLCode
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("load: get: #cfcatch.detail#");
        </cfscript>
        <cfset this.iErrorID = iErrorID>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfset this.idCountryID = get.idCountryID>
      <cfset this.sCountryName = get.sCountryName>
      <cfset this.sISOCode = get.sISOCode>
      <cfset this.sDHLCode = get.sDHLCode>
      <cfset this.iErrorID = "">
      <cfreturn true>
    </cffunction>
    <!---
    // Save
    --->
    <cffunction name="save" displayname="Save items Details" returntype="numeric" output="false" hint="Saves (to some source) the current details for the ID of the item.">
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Now check to see if ithat ID exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("save: checkID: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <!---
      // If it doesn't exist, then add the record, otherwise update the record
      --->
      <cfif not checkID.recordCount>
       <cfreturn this.add()>
      <cfelse>
       <cfreturn this.update()>
      </cfif>
    </cffunction>
    <!---
    // Add
    --->
    <cffunction name="add" displayname="Add Country" returntype="numeric" output="false" hint="This adds a Country.">
      <!---
      // Check to see if that a different item isn't already using the same unique details
      --->
      <cftry>
       <cfquery name="checkUnique" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
        OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#'
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("add: checkUnique: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkUnique.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("A Country with that name or ISO code already exists. idCountryID=#checkUnique.idCountryID#");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <cftry>
       <cfquery name="add" datasource="#sDatasource#">
        SET nocount on
        INSERT INTO tblCountry(sCountryName, sISOCode, sDHLCode)
        VALUES('#this.objFunctions.scrubText(this.sCountryName)#','#this.objFunctions.scrubText(t his.sISOCode)#','#this.objFunctions.scrubText(this.sDHLCode)#')
        SELECT @@identity as autoID
        SET nocount off  
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("add: add: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn add.autoID>
    </cffunction>
    <!---
    // Update
    --->
    <cffunction name="update" displayname="Update Country" returntype="numeric" output="false" hint="This updates a Country record.">
      <!---
      // Check to see if that a different item isn't already using the same unique details
      --->
      <cftry>
       <cfquery name="checkUnique" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE (sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
        OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#')
        AND idCountryID <> #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("update: checkUnique: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkUnique.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("Another Country with that name already exists. idCountryID=#checkUnique.idCountryID#");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Attempt to update the record to the datasource
      // if this fails for any reason then we submit an error message
      // to the error component and return the ID of the error
      --->
      <cftry>
       <cfquery name="update" datasource="#sDatasource#">
        UPDATE tblCountry
        SET sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#',
        sISOCode = '#this.objFunctions.scrubText(this.sISOCode)#',
        sDHLCode = '#this.objFunctions.scrubText(this.sDHLCode)#'
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("update: update: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn this.idCountryID> 
    </cffunction>
    <!---
    // Delete
    --->
    <cffunction name="delete" displayname="Delete Country" returntype="numeric" output="false" hint="This deletes a Country record.">
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Now check to see if ithat ID exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: checkID: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif not checkID.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("A Country with that id doesn't exists, delete failed.");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Now check to see if there are any dependancies, if so we can't delete the item
      --->
      <cftry>
       <cfquery name="checkDependancies" datasource="#sDatasource#">
        SELECT idCountry
        FROM tblAddress
        WHERE idCountry = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: checkDependancies: idCountry: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkDependancies.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("That Country is being used by an address, delete failed.");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Now attempt to remove the record.
      // if this fails for any reason then we submit an error message
      // to the error component and return the ID of the error
      --->
      <cftry>
       <cfquery name="delete" datasource="#sDatasource#">
        DELETE FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: delete: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn this.idCountryID>
    </cffunction>
    </cfcomponent>

  • Call of the method START_ROUTINE of the class LCL_TRANSFORM failed; wrong type for parameter SOURCE_PACKAGE

    Hi,
    My DTP load failed due to following error.
    Call of the method START_ROUTINE of the class LCL_TRANSFORM failed; wrong type for parameter SOURCE_PACKAGE
    I don't think anything wrong with the following code as data loads successfully every day. Can any one check?  What could be the issue?
    METHOD start_routine.
    *=== Segments ===
         FIELD-SYMBOLS:
           <SOURCE_FIELDS>    TYPE _ty_s_SC_1.
         DATA:
           MONITOR_REC     TYPE rstmonitor.
    *$*$ begin of routine - insert your code only below this line        *-*
    *   Fail safe which replaces DTP selection, just in case
         DELETE SOURCE_PACKAGE WHERE version EQ 'A'.
    *   Fill lookup table for the ISPG
         SELECT p~comp_code m~mat_plant m~/bic/zi_cpispg
           INTO TABLE tb_lookup
         FROM /bi0/pplant AS p INNER JOIN /bi0/pmat_plant AS m ON
           p~objvers EQ m~objvers AND
           p~plant   EQ m~plant
         FOR ALL ENTRIES IN SOURCE_PACKAGE
         WHERE p~objvers   EQ 'A' AND
               p~comp_code EQ SOURCE_PACKAGE-comp_code AND
               m~mat_plant EQ SOURCE_PACKAGE-material.
         SORT tb_lookup BY comp_code material.
    *$*$ end of routine - insert your code only before this line         *-*
       ENDMETHOD.     

    Hi,
    Compare the data types of the fields in your table tb_lookup with the data types in your datasource. Most probably there is an inconsistency with that. One thing that I realize is that
    I use the select statement in the format select ... from ... into... Maybe you need to change places of that, but I am not sure. You may put a break point and debug it with simulation.
    Hope it gives an idea.
    Yasemin...

  • My video i have successfully worked on for seven days now won't open at all.  It says there is no sequence of this type found... But in the very bottom bar I can see the whole project load.  But the only option from the error screen is exit out of Premier

    My video i have successfully worked on for seven days now won't open at all.  It says there is no sequence of this type found... But in the very bottom bar I can see the whole project load.  But the only option from the error screen is exit out of Premiere Pro CC.  I am on a PC withe Windows 8.1 and apps are up to date.  Thanks much for any help!!

    Hi Bryan,
    My video i have successfully worked on for seven days now won't open at all.  It says there is no sequence of this type found... But in the very bottom bar I can see the whole project load.  But the only option from the error screen is exit out of Premiere Pro CC.  I am on a PC withe Windows 8.1 and apps are up to date.  Thanks much for any help!!
    Sounds like an activation issue. Quite Premiere Pro. Sign out of Creative Cloud. Restart Premiere Pro. Sign back in: http://bit.ly/CC-sign-out
    Hope that works for you.
    Kevin

  • Calling a method in the view controller from the component controller

    Hi
    Is there anyway to call a method in the view implementation from the component controller??
    Thanks
    jack

    Thanks for all your replies. I want this kind of a functionality because Im trying to invove a DC (Child DC) from a Parent DC such that the Child DC's view is displayed onto the view container of the Parent DC. I have embedded using 'interface view of a component instance' in the Parent Window and am able to create the component and set usage though the onPlugDefault of the Child View.
    But I observe that when i make a call from the parent, the flow is like this:
    1. The wdDoInit of the Child Component Controller gets triggered first.
    2. Then the wdDoInit of the Child's <b>VIEW</b> gets triggered
    3. and <b>THEN</b> the onPlugDefault of the Child Component Interface View
    What I had actually wanted was to Fire onPlugDefault where Im calling a method LoadData(), after which the Child DC's view must be triggered so it can display the fetched data.
    What is actually happening is the view gets displayed, but no data is displayed in the view.
    Right now I have just given a work around where Im triggering <b>LoadData()</b> of the <b>COmponent COntroller</b> from the <b>wdDoInit</b> of the <b>VIEW</b>.
    Is there a better way to do this? I find it strange that I have to load the Data from the view.
    Thanks
    Jack

  • Issue on deployment: Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''

    Hi,
    I have the following issue when deploying:
    Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''
    The solution is a farm solution (was never sandbox) and it deploys fine.
    It was updated several times with success. We did not see this issue until recently when we had some other issue (unrelated) and looked at the logs. The solution is updated without problem and updates are available for the user. But we can see this error
    in the logs at the update time. 
    Any idea what might cause this?
    Pop Anisia

    Hi,
    This error is wide meaning, as it can come from differences between SP versions, variables types used, bad manifest file, WebConfiguration ...
    You can try to redeploy the solution.
    retracted the solution,removed all the previous ref, removed dll from GAC and folder from 14\features and reset the iis, deploying it again.
    Here are some similar issue post, you can use as a reference:
    https://social.technet.microsoft.com/Forums/office/en-US/72ac9a02-3a51-48b8-9e36-3b24a2d4da74/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-alertbdcwsp?forum=sharepointgeneralprevious
    https://social.technet.microsoft.com/Forums/office/en-US/331af288-5ba6-48a7-9e9d-ac4e4bc8f8fa/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-xxxwsp-assembly-?forum=sharepointdevelopmentprevious
    In additional, you can check the ULS log (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS) to get the detailed information.
    I hope this helpful.
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Finding the Message Category from Message Type ( TXN - NOTIF_CREATE )

    Dear All,
    According to my requirement , I need to find the Message Category , from the Message Type.
    As for Example :
    SLF1 is the Message Category for Message Type SLFN .
    I have got a F.M "SUP_STSUP_READ_PROCESS_TYPE" which gives the Message Type , now i need the Corresponding
    Message Category.
    We can also see the Message Type in Transaction : NOTIF_CREATE.
    Please Help.
    Thanking You All.

    Dear All,
    According to my requirement , I need to find the Message Category , from the Message Type.
    As for Example :
    SLF1 is the Message Category for Message Type SLFN .
    I have got a F.M "SUP_STSUP_READ_PROCESS_TYPE" which gives the Message Type , now i need the Corresponding
    Message Category.
    We can also see the Message Type in Transaction : NOTIF_CREATE.
    Please Help.
    Thanking You All.

  • Is there a method of deleting the developer key from the user?

    Is there a method of deleting the developer key from the user?
    Please help me.

    Hi Matt,
    Could you explain from which table should be deleted..?
    Thanks.
    Regards,
    Ramses Hutahaean

  • Accessing object of the main class from the thread

    Hi, I'm having problem accessing object of the main class from the thread. I have only one Thread and I'm calling log.append() from the Thread. Object log is defined and inicialized in the main class like this:
    public Text log;  // Text is SWT component
    log = new Text(...);Here is a Thread code:
    ...while((line = br.readLine())!=null) {
         try {
              log.append(line + "\r\n");
         } catch (SWTException swte) {
              ErrorMsg("SWT error: "+swte.getMessage());
    }Error is: org.eclipse.swt.SWTException: Invalid thread access
    When I replace log.append(...) with System.out.println(..) it works just fine, so my question is do the log.append(..) the right way.

    This is NOT a Java problem but a SWT specific issue.
    It is listed on the SWT FAQ page http://www.eclipse.org/swt/faq.php#uithread
    For more help with this you need to ask your question on a SWT specific forum, there is not a thing in these forums. This advice isn't just about SWT by the way but for all specific API exceptions/problems. You should take those questions to the forum or mailing list for that API. This forum is for general problems and exceptions arising from using the "core" Java libraries.

  • Scanner(Warning) : 027: Unable to read the sequence number from the Workstation object.

    Hi
    We are having trouble storing inventory scans from some workstations.
    We have a windows ONLY environment, with middle tier servers. (ZEN65SP1,
    W2KSP4).
    Some workstations are storing fine. The Storer function is working and we
    can see the storer functions for the 'good' workstations in the Inventory
    service window.
    However some workstations can't store to the inventory db, but DO populate
    eDir ZENworks inventory 'minimal information' but show "Scanner(Warning) :
    027: Unable to read the sequence number from the Workstation object." in
    the Scan Status...
    The Inventory service window shows no attempt by these workstations - it's
    almost as though the scan file is not arriving (though eDir knows/displays
    the scan file name)
    How does the workstation access the scandir in Windows only/middle tier
    environment? Does the scan xml stream get sent to the MT via http and then
    on to the scandir via CIFS?
    Any suggestions/explanations welcome!!
    Many thanks
    David

    David,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • 027: Unable to read the sequence number from the Workstation object

    Environment:
    NW 6.5 sp4
    Zen 6.5 sp1
    We had a problem with our inventory server processing .STR files a couple
    months ago - had to turn off inv. policies on workstations while we resolved
    it. Now it's resolved and we're running inventory again. We have a large
    number of workstations reporting this error:
    027: Unable to read the sequence number from the Workstation object
    They have no data in the DB, although they do have minimal scan info, and
    the last scan status date matches that of the sequence number error.
    I've seen this sporadically in the past and have been able to resolve it by
    initiating a full scan on the individual workstation. However, that does
    not seem to be making a difference this time.
    Novell's troubleshooting document basically says see if the server's
    running, and see if there's data for the workstation in the db. Then call
    tech support.
    Any other ideas?
    ~~~Nicoya...

    Jared wrote:
    > Nicoya Helm,
    >
    >> 027: Unable to read the sequence number from the Workstation object
    >
    > I am thinking that this can also mean a previous full scan was not
    > found. Or maybe the STR file name is bad.
    >
    > This information is stored here
    > HKEY_LOCAL_MACHINE\Software\Novell\Workstation
    > Manager\InvScanner\"STRFileName"
    The machines I'm troubleshooting have valid formats for their STR names,
    but that doesn't necessarily mean they are valid STR sequence numbers.
    Does removing the value in the reg key cause the STR file name to be
    recreated?
    >
    > Because imaging is used, it's possible that this information is matching
    > on some machines which could cause problems.
    I've verified that none of our images contain the c:\zenworks history
    folder, and we run a script that cleans up any zenworks items before
    sysprep (i.e. makes sure there's no registration info on the
    workstations, etc). Our imaging scripts also clear any ZIS info to
    avoid any duplication as well, so I don't think imaging would be causing
    this.
    > I believe 6x also has a hist.ini file like 3x inventory does, you might
    > delete the file also.
    Good tip about the hist.ini file, I didn't know about that. It does not
    solve the sequence number error, but it does seem to force a full scan
    of the system and cause the new scan to be stored in the DB, which was
    not happening before.
    Thanks!

  • The following error text was processed in the system IDS : Access via 'NULL' object reference not possible.

    Hi all ,
    Im getting the below error , actually recently i created my own custom table zstudent, later i wrote select query to fetch data from the same and dump at internal table and then bind this to the table node.
    But im getting below error, even i removed the select query still same error is occuring.
    Error when processing your request
      What has happened?
    The URL http://********00.*****b.com:8000/sap/bc/webdynpro/sap/zdemo_student/ was not called due to an error.
    Note
    The following error text was processed in the system IDS : Access via 'NULL' object reference not possible.
    The error occurred on the application server axsids00_IDS_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: WDDOINIT of program /1BCWDY/YUSM2Q74A826Y0JY1I4V==CP
    Method: IF_WDR_COMPONENT_DELEGATE~WD_DO_INIT of program /1BCWDY/YUSM2Q74A826Y0JY1I4V==CP
    Method: DO_INIT of program CL_WDR_DELEGATING_COMPONENT===CP
    Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
    Method: INIT_CONTROLLER of program CL_WDR_COMPONENT==============CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: INIT of program CL_WDR_CLIENT_COMPONENT=======CP
    Method: INIT of program CL_WDR_CLIENT_APPLICATION=====CP
    Method: IF_WDR_RUNTIME~CREATE of program CL_WDR_MAIN_TASK==============CP
    Method: HANDLE_REQUEST of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP

    Thanks Rama,
    Acutally i accidentally commented the lo_nd_student = wd_context ....etc
    this line was commented .
    i have one small requirement to fetch data from local customised table and fill the same to internal table and bind that to table node.
    my table node is student having attributes as name , city and number , all are of type strings.
    now i created one custom table zstudent having ID - char of length 10,
    name of type string
    city of type string
    num of type string
    i have inserted records
    but when i use select query to fill data from this zstudent to my internal table of type lt_student type wd_this->elements_student ,
    im getting same above error.

Maybe you are looking for

  • Report Server(rwmts60) memory utilization

    Please answer my below query.... 1) Which parameter rwmts60 use for its memory management(To handle and create new report engines rwrun60) 2) Does it use jvm parameter from Jserv setting. Regards,

  • What's the best way to run FrameMaker 8 on a Mac?

    What's my best bet for running FrameMaker 8 on a MacBook Macintosh laptop? Can I run FM 8 directly under OS X, since it's a Unix app? Any special tricks to making it go? Or will I need to run FM 8 under Linux or Windows? If so, I'll need to be able t

  • 10.3 Apps crash whenever trying to use the clipboard

    Hello all, My girlfriend recently got a B+W G3 350. We spent some time with it and have 10.3.3 up and running quite nicely. There is only one small problem: whenever you try and copy or paste text in any application (we've tried Safari, FireFox, Text

  • How to parse all the data of the particular tag in the xml file

    Hi All, I have a xml file, which have tags like, code,rev_num,type...volunteer.I want to parse the xml and save the all data(code,rev_num...) of the tag <type>unknown </type>in a text file. I tried to use a Match node vi but I not geting the output i

  • Boolean operators (and/or, etc.) in bridge spotlight search?

    Anyone know if boolean operators are possible in Bridge's spotlight search field in the upper right? I realize it's available through edit > find, and that smart collections can be saved, but looking for faster ways. Would be much obliged for any hel