Null reference

hi guys..!
plz can anyone explain the output of the code below...
public class AQuestion
public void method(Object o)
System.out.println("Object Version");
public void method(String s)
System.out.println("String Version");
public static void main(String args[])
AQuestion question = new AQuestion();
question.method(null);
thanx in advance....
regards,
j-c

In case over overloaded methods, Java wil try to find the best, and most excplicitly defined method. String is more explicit than Object, so that one is chosen. It is valid, since a String object CAN be null.
Following WILL print "object version", since int cannot be null:
public class AQuestion {
   public void method(Object o) {
      System.out.println("Object Version");
   public void method(int i) {
      System.out.println("int Version");
   public static void main(String args[]) {
      AQuestion question = new AQuestion();
      question.method(null);
}

Similar Messages

  • Dereferencing the NULL reference while saving a Survey

    While saving a survey first time, I am getting an error message "Dereferencing the NULL reference".
    More details as follows:
    Exception: Class CX_SY_REF_IS_INITIAL
    Program: CL_SVY_H_SVYDETAIL_IMPL=======CP
    Include: CL_SVY_H_SVYDETAIL_IMPL=======CM001
    ABAP Class: CL_SVY_H_SVYDETAIL_IMPL
    Method: DO_PREPARE_OUTPUT
    Line: 26 
    Long text: An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object.
    I opened the Survey creation page in crm ui, and filled in the ID, Application as Marketing and  selected CSS Style Sheet as CRM_SVY_OPP_WINLOSS.CSS
    I am very new to CRM module.
    Regards,
    Harsh

    Are you using internal CATT Server? If yes then you might need to turn on the CATT server again, see below:
    JTS based internal CATServer:
    Execute method SET_CATSERVER_JTS of class CL_SURVEY_CATSERVER. Leave parameter USER empty.
    ABAP based internal CATServer:
    Execute method SET_CATSERVER_ABAP of class CL_SURVEY_CATSERVER. Leave parameter USER empty.
    Cherrs,
    Ankur

  • Problem with null reference

    Hey,
    I have a "Window" class wich extends JFrame and then creates a tabbedPane. In each of the tabs it's necessary to access to another class (Code).
    Each of the tabs follows something like this:
    public class Tab1 extends JPanel {
       private Code code;
       public Tab1 ( Code c ) {
          code = c;
    }When the tabs are created they receive the Code object.
    The Code object declared in the main class and passed into the "Window" class (still a null reference) and then to each of the tabs (null). The instantiation of the Code object is done in one of the tabs. The Other tabs need it to set some values.
    The problem is the tab that instantiates the Code object is doing so, however the other tabs don't get the new instance (it's always null). Although it's always the same reference.
    Any ideas?
    Thanks.

    It looks like setting the Code is something the Window object will
    have to help with.//in Window (assuming Tab is a superclass of Tab1 Tab2
    Tab[] tabArr = {new Tab1(null, this), new Tab2(null, this)};
    void setCode(Code c) {
        for(Tab tab :tabArr) tab.setCode(c);
    //then the Tabs look like
    public class Tab1 extends Tab { // or extends JPanel implements Tab
        private Code code;
        private Window wind
        public Tab1( Code c, Window w ) {
            code = c;
            wind = w;
        void setCode(Code c) {
            code = c;
        void someEventPerformed() {
            Code c = null;
                // figure out what flavour of Code the user wants
            switch ( userOption ) {
                case 0:
                    code = new Code1 ();
                    break;
                case 1:
                    code = new CodeY ();
                    break;
                // and have the Window tell all the Tabs to use it
            wind.setCode(c);
    }

  • Enum type is retrieving me a null reference

    Hi, i have a very strange bug in my code that is messing me up.
    I defined two enum types in separated files like this:
    public enum Section {
         SectionA, SectionN;
    public enum Subsection {
        SubA(1, SectionA), SubN(2, SectionN);
        private Section sec;
        private int num;
        Subsection (int num, Section sec) {
            this.num = num;
            this.sec = sec;    // Here is the problem
    }Well, the problem is that in the line with the comment I'm recieving a null reference and I think that is not possible. Is that a compiler bug?

    I'm no getting any error message, let me show you my code:
    The problematic enum type.
    public enum Subseccion {
        ALUMNOS_ALTA(1, AltaAlumnos.class, "Alta", Privilegio.ALTA_ALUMNOS, Seccion.ALUMNOS),
        ALUMNOS_BUSCAR(2, BuscarAlumno.class, "Buscar", Privilegio.BUSCAR_ALUMNOS, Seccion.ALUMNOS),
        ALUMNOS_EDITAR(3, EditarAlumno.class, "Editar", Privilegio.EDITAR_ALUMNOS, Seccion.ALUMNOS),
        PERSONAL_ALTA(1, AltaPersonal.class, "Alta", Privilegio.ALTA_PROFESORES, Seccion.PERSONAL),
        PERSONAL_BUSCAR(2, BuscarPersonal.class, "Buscar", Privilegio.PERSONAL_BUSCAR, Seccion.PERSONAL),
        PERSONAL_EDITAR(3, EditarPersonal.class, "Editar", Privilegio.PERSONAL_EDITAR, Seccion.PERSONAL),
        MATERIAS(1, Materias.class, "Materias", Privilegio.ASIGNATURAS, Seccion.CURSOS),
        CURSOS(2, Cursos.class, "Cursos", Privilegio.CURSOS, Seccion.CURSOS),
        GRUPOS(3, Grupos.class, "Grupos", Privilegio.GRUPOS, Seccion.CURSOS),
        ASIGNAR_GRUPOS(4, AlumnosSalones.class, "Asignar Grupos", Privilegio.ASIGNAR_GRUPOS, Seccion.CURSOS);
        private final Class<? extends JPanel> panel;
        private final String texto;
        private final Seccion pa;  // La secci�n a la que pertenece
        private final Privilegio priv;   
        private final int importancia;
        Subseccion(int importa, Class<? extends JPanel> panel, String texto, Privilegio priv, Seccion fad) {
            this.panel = panel;
            this.texto = texto;
            if (fad == null)
                System.err.println("A NULL REFERENCE");   // Always happen
            pa = fad;
            this.priv = priv;
            this.importancia = importa;
        public int getImportancia() {
            return importancia;
         * Regresa el Panel construido que corresponde a la secci�n.
         * @param d El Objeto de base de datos que se usar� para crear el Panel.
         * @param ven El Objeto de ventana que se usar� para crear el Panel.
        public JPanel getPanelInstance(BaseDeDatosE d, VentanaPrincipal ven)
            throws InstantiationException, NoSuchMethodException, IllegalAccessException,
                    java.lang.reflect.InvocationTargetException {
            // Construyo el panel si es que hay uno asociado
            Constructor<? extends JPanel> cons = panel.getConstructor(BaseDeDatosE.class, VentanaPrincipal.class);
            JPanel panel = cons.newInstance(d, ven);
            return panel;
         * Devuelve el privilegio asociado a esta secci�n.
        public Privilegio getPrivilegio() {
            return priv;
         * Pone el "bot�n" en RollOver.
         * @param btn El "bot�n"
        public void setEstadoRollOver(JPanel btn) {
         * Pone el "bot�n" en estado presionado.
         * @param btn El "bot�n"
        public void setEstadoPresionado(JPanel btn) {
         * Devuelve la secci�n a la que pertenece.
        public Seccion getSec() {
            return pa;
         * Pone el "bot�n" en estado normal.
         * @param btn El "bot�n"
        public void setEstadoNormal(JPanel btn) {
    The enum type that is getting null.
    public enum Seccion {
        ALUMNOS(null, "/alumno", "Alumnos",
                new Subseccion[] {Subseccion.ALUMNOS_BUSCAR, Subseccion.ALUMNOS_ALTA, Subseccion.ALUMNOS_EDITAR},
                null),
        PERSONAL(null, "/profesor", "Personal",
                 new Subseccion[] {Subseccion.PERSONAL_BUSCAR, Subseccion.PERSONAL_ALTA, Subseccion.PERSONAL_EDITAR},
                 null),
        CURSOS(null, "/cursos", "Cursos",
               new Subseccion[] {Subseccion.CURSOS, Subseccion.GRUPOS, Subseccion.MATERIAS, Subseccion.ASIGNAR_GRUPOS},
               null),
        CURSOS_CALIFICAR(CalificarCursos.class, "/default", "Calificar Cursos", null, Privilegio.CALIFICAR_CURSOS),
        ASISTENCIA(Asistencia.class, "/default", "Asistencia", null, Privilegio.ASISTENCIA);
        private final Class<? extends JPanel> panel;
        private final String prefijoImagen;
        private final Subseccion[] subs;  // Las subseciones de esta secci�n
        private final String etiqueta;  // El texto que va a llevar el icono
        private final Privilegio priv;
        Seccion (Class<? extends JPanel> panel, String prefijoImagen, String etiqueta, Subseccion[] subs, Privilegio priv) {
            this.panel = panel;
            this.prefijoImagen = prefijoImagen;
            this.subs = subs;
            this.etiqueta = etiqueta;
            this.priv = priv;
         * Regresa el Panel construido que corresponde a la secci�n.
         * @param d El Objeto de base de datos que se usar� para crear el Panel.
         * @param ven El Objeto de ventana que se usar� para crear el Panel.
         * @return <code>null</code> Si no tiene un panel asociado.
        public JPanel getPanelInstance(BaseDeDatosE d, VentanaPrincipal ven)
            throws InstantiationException, NoSuchMethodException, IllegalAccessException,
                    java.lang.reflect.InvocationTargetException {
            if (panel != null) {
                // Construyo el panel si es que hay uno asociado
                Constructor<? extends JPanel> cons = panel.getConstructor(BaseDeDatosE.class, VentanaPrincipal.class);
                JPanel panel = cons.newInstance(d, ven);
                return panel;
            return null;
         * Devuelve el privilegio asociado a esta secci�n.
         * @return <code>null</code> Si no existe un privilegio asociado.
        public Privilegio getPrivilegio() {
            return priv;
         * Pone el icono de estado RollOver.
         * @param etiq El JLabel asociado a esta secci�n
        public void setIconoRollOver(JLabel etiq) {
            etiq.setIcon( new ImageIcon( getClass().getResource(prefijoImagen + "BtnOver.jpg") ) );
         * Pone el icono de estado Presionado.
         * @param etiq El JLabel asociado a esta secci�n
        public void setIconoPresionado(JLabel etiq) {
            etiq.setIcon( new ImageIcon( getClass().getResource(prefijoImagen + "Btn.jpg") ) );
         * Pone el icono de estado Normal.
         * @param etiq El JLabel asociado a esta secci�n
        public void setIconoNormal(JLabel etiq) {
            etiq.setIcon( new ImageIcon( getClass().getResource(prefijoImagen + "BtnBco.jpg") ) );           
         * Obtiene un arreglo con las subsecciones disponibles, en primer lugar la que
         * se deber�a mostrar por defecto.
         * @return <code>null</code> Si no tiene subsecciones asociadas.
        public Subseccion[] getSubsecciones() {
            return subs;
         * Le pone el texto a la etiqueta que muestra el icono de la secci�n.
        public void setTextoIcono(JLabel etiq) {
            etiq.setText(etiqueta);
    }And if you do
    Subseccion.ALUMNOS_ALTA;The message "NULL REFERENCE" is printed.

  • Why are static methods called with null references,valid ?

    This is my code :
    package inheritance;
    public class inh6{
         public static void method(){
         System.out.println("Called");
         public static void main(String[] args){
              inh6 t4 = null;
         t4.method();
    O/P :
    CalledHere t4 is a null reference and yet we are able to call a method on it,why is null pointerexception not thrown.Why are we able to call static methods using null references ?
    t4 is null means it doesnot refer to any memeory address,hence how is method() called correctly.
    I hope i am clear. :)
    Thank you for your consideration.

    punter wrote:
    jverd wrote:
    Memory addresses have nothing to do with it. I doubt memory addresses are even mentioned once in the JLS.
    By memory address i mean the memory location the reference is pointing to.I know what you mean. But if you think it's relevant, can you show me where in the JLS it says anything about memory locations?
    >
    You can do that because a) t4's type is "reference to inh6" and b) method() is declared static, which means that you don't need an object to call it, just the class. That class comes from the compile time type of t4. The fact that t4 is null at runtime is irrelevant.
    So at compile time the type of t4 is inh6 and hence the method is called.Is it ? Had method() not been static a NullPointerException would have been thrown.Correct.
    With non-static, non-private, non-final methods, which implementation of the method gets called is determined at runtime, buy the class of the object on which it's being called. If any one of those "non"s goes away, then the method is entirely determined at compile time, and in the case of static methods, there's no instance necessary to call the method in the first place.

  • Workflow issue- Dereferencing of the NULL reference

    Hello All,
    I have an issue with sending mails to external e-mail ids through a workflow process. I am using the FM SO_DOCUMENT_SEND_API1 for sending mails. However, because of the latest Basis version I need to call this FM in a seperate task when the process is in BACKGROUND mode.
    The current scenario is, my workflow will trigger a method, which internally call this FM in a seperate TASK. When I run the workflow/process I get an error in the method, which triggers this FM. The erro says "Dereferencing of the NULL reference"
    Is this because of calling the FM in a seperate task, as the workflow already has a pre-defined TASK? if yes, how do we go about this?
    Thanks,
    Anil

    Hello Anil,
    I am facing a similar message when i am running the SAP standard workflow 18900044 for leave encashment. I am calling a class CL_HRPBSIN_HANDLE_LEREQ_WF and the method CALL_WORKFLOW.
    Can you please tell me how you managed to solve your issue.
    Regards,
    Ritwik

  • Error: Dereferencing of the NULL reference

    Dear Friends,
    one of our user is running a report on web bex  and he is getting following error.
    com.sap.ip.bi.base.application.exceptions.AbortMessageRuntimeException:
    Termination message sent ABEND RS_EXCEPTION (000): Dereferencing of the NULL reference 
    MSGV1: Dereferencing of the NULL reference
    But when we run this with our user we are not getting any error.
    if we run this report using RSRT usin user's user id it is not giving any error.
    only genrating error when we try to run using Web Bex .
    Any help hightly Appicated.
    Malik

    Thanks friends,
    i already check the given sap note but that note is for support pack till17 and we have already 19 support level.
    thats why this is not the solution.
    second i check it publishing. its working fine with all the users except 3 of our users. i dont know why the error is
    comming with them only.
    and i also check the url  no specific variable values.
    any other idea.
    regards
    Naeem

  • Dereferencing of the NULL reference

    Hi,
    I have created an a form view with a value node "ZINVOICE" , i have written few lines of code to set the collection,
    create object lr_col
        type
          cl_crm_bol_bo_col.
       create data lr_tabline.
       ls_favs-PROCESS = 'mahe'.
       ls_favs-SERTYPE = 'SRVR'.
       create object lr_valuenode
          exporting
            iv_data_ref = lr_tabline.
      lr_valuenode->set_properties( ls_favs ).
      lr_col->add( lr_valuenode ).
    set collection
      me->zinvoice->set_collection( lr_col ).
    After this the node "ZINVOICE" has the collection ref and entity list shows the entity as well,
    But still wen i try to test the view it gives errors saying
    Cannot display view ZCNODE_INST/ZWASL of UI Component ZCNODE_INST
    An exception has occurred Exception Class  CX_SY_REF_IS_INITIAL - Dereferencing of the NULL reference 
    BSP Application:  ZCNODE_INST 
    View Layout:  ZWASL.htm 
    Method:  CL_O2D8A1MNCT9O5WAN3TF3CDQNNQY=>_ONLAYOUT 
    Source Text Row:  42
    can somebody help me with this,

    Hi Mannif,
    I am not including this view in any component as an AB, when i include in any other standard component it does work fine. The problem is when i try to run it as a stand alone component. I am trying to set the collection of the contect node. I tried the same for a model node with bol entity "BuilHeader". I set the collection using "CL_CRM_bol_query_services", and it worked fine.
    try.
    query ?= cl_crm_bol_dquery_service=>get_instance( iv_query_name = 'BuilHeaderAdvancedSearch' ).
    catch cx_sy_no_handler.
    endtry.
    CALL METHOD QUERY->add_selection_param
    EXPORTING
    iv_attr_name = 'PARTNER'
    iv_sign = 'I'
    iv_option = 'EQ'
    iv_low = '*'.
    *get query result*
    col = QUERY->get_query_result( ).
    CALL METHOD me->BP->SET_COLLECTION
      EXPORTING
        COLLECTION                    = col
    By the same logic is not working for a value node.

  • Access via NULL reference object not possible

    Hi friends,
      I have created an wda application which uses the table popin to display data.
      So that i have created a view with two of the  fields as link to action UI element.
      In the Events/Actions of the link to action element i implemented the following logic.
      data wd_table_cell_editor type ref to cl_Wd_view_element.
      data wd_table_column      type ref to cl_wd_table_column.
      data wd_popin             type ref to cl_wd_table_popin.
      data id type string.
    <b> wd_table_cell_editor ?= wd_this->m_view->get_element( id ).</b>
      wd_table_column ?= wd_table_cell_editor->get__parent( ).
      wd_popin = wd_table_column->get_popin( ).
      context_element->set_attribute( name = 'SELECTED_POPIN' value =
    wd_popin->id ).
    So when i click on the link to action in the table column of the field am getting the following error
    <b>Access via NULL reference object not possible.</b>
    While debugging i have noticed that this error was coming at the below step of the code.
    <b>wd_table_cell_editor ?= wd_this->m_view->get_element( id )</b>
    in the m_view->get_element( id ) does not contan any value , its showing as table , as null value cannnot be assigned may be its throwing the above error.
    But i didnt understand why the view is not getting UI element id ....
    Can one please suggest me where might be the wrong....
    Regards
    Sireesha.

    Hi nithya,
      Could you please calrify the doubts for the following q's.
    1. As u said in the above post, i have changed the code to the below.
         data: lr_table type ref to cl_wd_table,
    lr_table_col type ref to cl_wd_table_column.
    lr_table ?= wd_this->m_view->get_element( 'TABLE' ).
    lr_table_col = lr_table->get_column( ID = 'TABLE_CONNECTID' ).
      <b>wd_popin = lr_table_col->get_popin( ).</b>
    (At the above step which is in bold , eventhough there is value in lr_table_col->get_popin , its not assigning a value to the wd_popin, throwing same error NULL etc.,)
      context_element->set_attribute( name = 'SELECTED_POPIN' value =
    wd_popin->id ).
    2. Before changing the code suggested by u, the follwoing was the code from standard example.Its working fine in the application wdr_test_table.I have debugged the code.The value is getting assigned into wd_table_cell_editor.
    The same thing i have done but its failing to assign the value. thats y its throwing null reference error. Here i have a confusion how its assigning a value and y not in the z application.am giving the code below which is in standard and my application.Please clarify these.
    data wd_table_cell_editor type ref to cl_Wd_view_element.
      data wd_table_column      type ref to cl_wd_table_column.
      data wd_popin             type ref to cl_wd_table_popin.
      <b>wd_table_cell_editor ?= wd_this->m_view->get_element( id ).</b>
    ( Note :  wd_this->m_view->get_element contains value but not assigning it to the wd_table_cell_editor and same code in the standard behaving correctly like assigning the view value to the cell editor. Y this behavior, please advice me)
      wd_table_column ?= wd_table_cell_editor->get__parent( ).
      wd_popin = wd_table_column->get_popin( ).
      context_element->set_attribute( name = 'SELECTED_POPIN' value = wd_popin->id )
    Regards
    Sireesha.

  • Size of null reference

    Hi All,
    If we assign 'null' to any object reference, this object reference itself also taes up some space.
    I wanted to know what is the size of this null reference (2 bytes/ 4 bytes) or if it is machine dependent how can I determine the size being taken up by one object reference (to be more specific size of an null reference...)
    Please help.
    Rgds

    The size of a null reference is the same as the size of any non-null reference.
    That's not the same thing as the size of the thing being referred to, of course. In that case, the size is zero, because it doesn't exist.

  • Null reference converted to a String

    I read somewhere that when a null reference is converted to a string, the result is the String "null", hence a null reference can be used freely within any string concatenation expression.
    for example:
    String str1 = null;
    String str2 = null;
    System.out.println(str1+=str2);//outputs "nullnull"
    Before I read about this, I would have thought that a NullPointerException would have been thrown.
    Can anyone explain the rationale behind this?

    This is not a property of String, its the property of
    the println method in the PrintStream class.No, that's not correct.
    Whenever Strings are concatenated, non-Strings are converted to Strings and null Strings are converted to the String "null". This is a property of the Java language itself.
    The expression a + b, where either a or b is a String, is converted into the expression:
    new StringBuffer().append(a).append(b).toString();
    It is the append method of StringBuffer that calls the toString method of non-String objects, calls String.valueOf on primitives, and converts null String references into the String "null". Even though it's an API call that technically produces this behavior, it is actually a feature of the Java language itself as is therefore explained in the JLS. See http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#39990 for details.

  • Null reference method call behaving oddly

    Hi all, and a very happy new year!!
    My question concerns the null reference; simply, why does the following code chooses to call any other method than the Object version (try it out). No matter what type i choose to replace the current String version with... I have not paid much thought to this, but i would have guessed the null reference calls the Object version in such a situation.
    If i leave only the Object method and comment out all others, the code compiles fine and calls the Object version at runtime - but in case there are sub class versions, those will be called. WHY?
    (im running jre 1.4.1).
    The code:
    public class NullTest {
         public void method(Object o) {
              System.out.println("Object Version");
         public void method(String s) {
              System.out.println("String Version");
         public static void main(String args[]) {
    NullTest nullTest = new NullTest();
              nullTest.method(null);
    }

    schapel, the question related specifically to
    null, in a context where no runtime type can be
    inferred. It wasn't about overloading in general.Yes, I understand that. But here is the rule from the JLS:
    "If more than one method declaration is both accessible and applicable to a method invocation, it is necessary to choose one to provide the descriptor for the run-time method dispatch. The Java programming language uses the rule that the most specific method is chosen."
    Note that it does not refer specifically to a null argument.
    The question is "why is the most specific method called?" The reason is that there are only a few possibilities for this rule:
    1. The least specific method should be called. In this case, overloaded methods with more specific types could not be called.
    2. If there is more than one method, it is a compile time error. Again, this would cause overloading to be useless.
    3. The most specific method is called. It is only with this rule that overloading works. That's why Java uses this rule.

  • Flexunit stage null reference

    I am trying to test some of my AS classes in flexunit.  Some of the methods reference the stage from components that are passed to it. When I set up the flexunit testing application I use the following code:
    core = new FlexUnitCore();
    core.visualDisplayRoot = this;
    core.addListener( new UIListener( uiListener ));
    However, I still get a null reference exception whenever the stage is referenced.  I was wonding if anyone knew what is going on or what I am doing wrong.
    Thanks!

    Okay, a few things.
    If you are using Flex, you don't need to set the visualDisplayRoot. That is for ActionScript only projects.
    Second, display objects in Flash don't have access to the stage until they are on the display list. So, saying
    new Image() won't add that item to the display list.
    I am not sure what Control.initApp() does, but in one of your unit tests, they way you get something on the display list is to use the UIImpersonator:
    UIImpersonator.addChild( someImage );
    After that someImage would have access to the stage. However, bigger problem. Unit tests are about isolation and if you components need to get out to the stage or if Control.initApp() somehow adds the item directly to the display list you are going to continue to have different issues as you won't be able to keep things in isolation to test.
    Hope that clarifies a little bit,
    Mike

  • EJB P.R.O.narrow method returns a null reference though object is valid

    All,
    I'm trying to deploy a simple stateless session bean to SUN server. The client code keeps failing because PortableRemoteObject.narrow returns null, even though the reference is located in JNDI tree.
    I read somewhere that turning on RMI stub generation might help, but it didn't do it in my case.
    This is a local server (SUN App Server, as downloaded from java.sun site).
    JNDI tree contains the following entries:
    UserTransaction
    test.Dummy
    jdbc
    ejb
    test.Server
    Neither test.Dummy nor test.Server (the beans I deployed) want to load.
    Any help would be appreciated.
    Thanks!
    Mark

    Never mind. For some reason changing initial context creation from:
    Properties p=new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,"whatever factory");
    p.put(Context.PROVIDER_URL,"whatever url");
    InitialContext context=new InitialContext(p);
    to:
    InitialContext context=new InitialContext();
    fixed the problem. Which is strange, since JNDI tree was listing both objects, and they both could be resolved when using the first code snippet. Only the actual object creation was failing.
    If anyone knows why this is so, please explain.
    Cheers,
    Mark

  • TypeError: Error #1009 - (Null reference error) With Flash.

    I am not an expert in flash, but i do work with AS and tweak Flash projects , though not having deep expertise in it. Currently i need to revamp a flash website done by one another guy, and the code base given to me, upon execution is throwing the following error.
    "--- TypeError: Error #1009: Cannot access a property or method of a null object reference. at NewSite_fla::MainTimeline/__setProp_ContactOutP1_ContactOut_Contents_0() at NewSite_fla::MainTimeline/frame1() --"
    The structure of the project is like, it has the different sections split into different movie clips. There is no single main timeline, but click actions on different areas of seperate movie clips will take them between one another. All the AS logic of event handling are written inline in FLA , no seperate Document class exists.
    Preloader Movie clip is the first one getting loaded. As i understood the error is getting thrown initially itself, and it is not happening due to any Action script logic written inline, because it is throwing error even before hitting the first inline AS code.
    I am not able to figure Out what exactly it causing the problem, or where to resolve it. I setup the stuff online, for reference if anybody want to take a look at it, and here is the link.You need to have flash debugger turned ON in your browser, if need to see the exception getting triggered.
    http://tinyurl.com/2alvlfx
    I really got stuck at this point. Any help will be great.I had not seen the particular solution i am looking for anywhere yet, though Error #1009 is common.

    Thanks, for putting effort in helping me. I debugged the movie.The line of code being shown is this >>
    if(__setPropDict[ContactOutP1]== undefined ||  ! ((int(__setPropDict[ContactOutP1]) >= 1 && int(__setPropDict[ContactOutP1]) <=5))){
          __setPropDict[ContactOutP1] = currentFrame;
         __setProp_ContactOutP1_ContactOut_Contents_0();
    And i think this third line of code is where the exception is being thrown. But as i understood, this code is not written by the developer. I had nto seen this code, anywhere in the actions. Hopefully this will give you hint about what is exactly causing the issue and what can be done to resolve it.

  • Storing null reference as 0

    I'm working with a schema that I cannot change and it doesn't allow nulls in id columns, they must be stored as 0. So there's an issue when I have a class A with a reference to class B, a.b. The table persisting A has a column bId, which would store the primary key of B if a.b exists, or 0 if it is null. What would be the best way to do this?
    I have a solution if B is readonly: I can add a new attribute to A, a.bId, and make a.b readonly. When the accessor to a.bId is called I can check if a.b exists and return it's id.
    However, there are cases where I need the instance of B referenced by A.b to persist. I'm thinking of doing this through a DescriptorEvenListener, changing the query when the abouttoinsert and abouttoupdate events fire. Is there a way to do this though custom indirection, or perhaps a custom DatabaseMapping?
    Any help would be appreciated.
    Thanks,
    Jon

    So I've created a DescriptorEventListener that gets the DatabaseRow from the descriptorevent and modifies the value for the field. This does what I want, changes the value stored to the database and not affect the object in memory.

Maybe you are looking for

  • Can we take print of PR like PO?

    Hi Techies , Can we take print of PR like PO ? How ?Pl suggest . Thanks a ton Regrads

  • I need to view the photo number.

    Anybody can help, I need to know the photo number. How to view the photo number in iPhoto for iOS version.?

  • VAT code change in NL on 1-JAN-2001

    The highest VAT code changes from 18 to 19% in the Netherlands on the first of January. We have put all you need to do in a short checklist in Dutch below. BTW hoog wordt 19% in 2001 CONSEQUENTIES IN ORACLE FINANCIALS Per 1 januari 2001 aanstaande ve

  • Im having trouble with my ipad wifi connection my mac air has no issues but ipad not working

    hello, Im having trouble with my wifi connection. Ive reset the router, reset all my connections, still no good. It keeps spinning when trying to connect my mac air and other apple products are fine on same internet connection the cellular connection

  • Java Certification Doubt

    Hi, I want to do a java certification SCJP, but I read online the exam is called OCPJP now. I have purchased a book 'SCJP Sun Certified Programmer for Java 6 Exam 310-065' for it. I want to know if SCJP and OCPJP mean the same so that the book I ment